From b42e8443b9c0496f0eed9ebcc10683f1745bcd17 Mon Sep 17 00:00:00 2001 From: Deep Chordia Date: Fri, 10 Oct 2025 10:52:17 +0530 Subject: [PATCH] lib: remove CACHE_* macros - removes CACHE_FLUSH macro clashing with internal QNX definition - also removes CACHE_INVALIDATE macro for consistency Signed-off-by: Deep Chordia --- lib/include/openamp/remoteproc_virtio.h | 4 ++-- lib/include/openamp/rpmsg_virtio.h | 4 ++-- lib/include/openamp/virtqueue.h | 8 ++------ 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/lib/include/openamp/remoteproc_virtio.h b/lib/include/openamp/remoteproc_virtio.h index 0b747ca..ef4c4a5 100644 --- a/lib/include/openamp/remoteproc_virtio.h +++ b/lib/include/openamp/remoteproc_virtio.h @@ -29,8 +29,8 @@ extern "C" { #warning "VIRTIO_CACHED_RSC_TABLE is deprecated, please use VIRTIO_USE_DCACHE" #endif #if defined(VIRTIO_CACHED_RSC_TABLE) || defined(VIRTIO_USE_DCACHE) -#define RSC_TABLE_FLUSH(x, s) CACHE_FLUSH(x, s) -#define RSC_TABLE_INVALIDATE(x, s) CACHE_INVALIDATE(x, s) +#define RSC_TABLE_FLUSH(x, s) metal_cache_flush(x, s) +#define RSC_TABLE_INVALIDATE(x, s) metal_cache_invalidate(x, s) #else #define RSC_TABLE_FLUSH(x, s) do { } while (0) #define RSC_TABLE_INVALIDATE(x, s) do { } while (0) diff --git a/lib/include/openamp/rpmsg_virtio.h b/lib/include/openamp/rpmsg_virtio.h index 44ac4c0..92e0f7a 100644 --- a/lib/include/openamp/rpmsg_virtio.h +++ b/lib/include/openamp/rpmsg_virtio.h @@ -34,8 +34,8 @@ extern "C" { #warning "VIRTIO_CACHED_BUFFERS is deprecated, please use VIRTIO_USE_DCACHE" #endif #if defined(VIRTIO_CACHED_BUFFERS) || defined(VIRTIO_USE_DCACHE) -#define BUFFER_FLUSH(x, s) CACHE_FLUSH(x, s) -#define BUFFER_INVALIDATE(x, s) CACHE_INVALIDATE(x, s) +#define BUFFER_FLUSH(x, s) metal_cache_flush(x, s) +#define BUFFER_INVALIDATE(x, s) metal_cache_invalidate(x, s) #else #define BUFFER_FLUSH(x, s) do { } while (0) #define BUFFER_INVALIDATE(x, s) do { } while (0) diff --git a/lib/include/openamp/virtqueue.h b/lib/include/openamp/virtqueue.h index ee5a9c1..3c99054 100644 --- a/lib/include/openamp/virtqueue.h +++ b/lib/include/openamp/virtqueue.h @@ -48,16 +48,12 @@ extern "C" { /* Support to suppress interrupt until specific index is reached. */ #define VIRTIO_RING_F_EVENT_IDX (1 << 29) -/* cache invalidation helpers */ -#define CACHE_FLUSH(x, s) metal_cache_flush(x, s) -#define CACHE_INVALIDATE(x, s) metal_cache_invalidate(x, s) - #ifdef VIRTIO_CACHED_VRINGS #warning "VIRTIO_CACHED_VRINGS is deprecated, please use VIRTIO_USE_DCACHE" #endif #if defined(VIRTIO_CACHED_VRINGS) || defined(VIRTIO_USE_DCACHE) -#define VRING_FLUSH(x, s) CACHE_FLUSH(x, s) -#define VRING_INVALIDATE(x, s) CACHE_INVALIDATE(x, s) +#define VRING_FLUSH(x, s) metal_cache_flush(x, s) +#define VRING_INVALIDATE(x, s) metal_cache_invalidate(x, s) #else #define VRING_FLUSH(x, s) do { } while (0) #define VRING_INVALIDATE(x, s) do { } while (0)