mirror of
https://github.com/OpenAMP/open-amp.git
synced 2026-09-23 00:04:09 +08:00
rpmsg: buffers flush/invalidate
Do buffers flush and invalidate the same as with vrings and resource table: - add defines in header file; - call BUFFER_FLUSH/BUFFER_INVALIDATE where necessary. Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
This commit is contained in:
committed by
Arnaud Pouliquen
parent
ca0747ebec
commit
95a9038ca6
@@ -14,6 +14,7 @@
|
||||
|
||||
#include <metal/io.h>
|
||||
#include <metal/mutex.h>
|
||||
#include <metal/cache.h>
|
||||
#include <openamp/rpmsg.h>
|
||||
#include <openamp/virtio.h>
|
||||
|
||||
@@ -29,6 +30,14 @@ extern "C" {
|
||||
/* The feature bitmap for virtio rpmsg */
|
||||
#define VIRTIO_RPMSG_F_NS 0 /* RP supports name service notifications */
|
||||
|
||||
#ifdef VIRTIO_CACHED_BUFFERS
|
||||
#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)
|
||||
#endif /* VIRTIO_CACHED_BUFFERS */
|
||||
|
||||
/**
|
||||
* struct rpmsg_virtio_shm_pool - shared memory pool used for rpmsg buffers
|
||||
* @base: base address of the memory pool
|
||||
|
||||
Reference in New Issue
Block a user