mirror of
https://github.com/OpenAMP/open-amp.git
synced 2026-09-26 12:28:32 +08:00
rpmsg: do cache_invalidate() when real data returned
This is a bugfix when open VIRTIO_CACHED_BUFFERS Signed-off-by: Guiding Li <liguiding1@xiaomi.com>
This commit is contained in:
committed by
Arnaud Pouliquen
parent
7513776e35
commit
246540f3d6
@@ -244,7 +244,8 @@ static void *rpmsg_virtio_get_rx_buffer(struct rpmsg_virtio_device *rvdev,
|
||||
|
||||
#ifdef VIRTIO_CACHED_BUFFERS
|
||||
/* Invalidate the buffer before returning it */
|
||||
metal_cache_invalidate(data, *len);
|
||||
if (data)
|
||||
metal_cache_invalidate(data, *len);
|
||||
#endif /* VIRTIO_CACHED_BUFFERS */
|
||||
|
||||
return data;
|
||||
|
||||
Reference in New Issue
Block a user