diff options
| author | Michael S. Tsirkin <mst@redhat.com> | 2025-12-29 03:53:39 -0500 |
|---|---|---|
| committer | Michael S. Tsirkin <mst@redhat.com> | 2025-12-31 19:27:45 -0500 |
| commit | ca085faabb42c31ee204235facc5a430cb9e78a9 (patch) | |
| tree | 0f92f415a52b2b92cd2e2e7d6906f7cd266477eb /rust/alloc/collections/git@git.tavy.me:linux.git | |
| parent | f6a15d85498614baf121f7e207e6c55524f175a4 (diff) | |
dma-mapping: add __dma_from_device_group_begin()/end()
When a structure contains a buffer that DMA writes to alongside fields
that the CPU writes to, cache line sharing between the DMA buffer and
CPU-written fields can cause data corruption on non-cache-coherent
platforms.
Add __dma_from_device_group_begin()/end() annotations to ensure proper
alignment to prevent this:
struct my_device {
spinlock_t lock1;
__dma_from_device_group_begin();
char dma_buffer1[16];
char dma_buffer2[16];
__dma_from_device_group_end();
spinlock_t lock2;
};
Message-ID: <19163086d5e4704c316f18f6da06bc1c72968904.1767601130.git.mst@redhat.com>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Petr Tesarik <ptesarik@suse.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'rust/alloc/collections/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
