Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio: dac: ad7293: Fix alignment for DMA safety

____cacheline_aligned is an insufficient guarantee for non-coherent DMA
on platforms with 128 byte cachelines above L1. Switch to the updated
IIO_DMA_MINALIGN definition.

Fixes: 0bb12606c05f ("iio:dac:ad7293: add support for AD7293")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Antoniu Miclaus <antoniu.miclaus@analog.com>
Acked-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20220508175712.647246-57-jic23@kernel.org

+1 -1
+1 -1
drivers/iio/dac/ad7293.c
··· 144 144 struct regulator *reg_avdd; 145 145 struct regulator *reg_vdrive; 146 146 u8 page_select; 147 - u8 data[3] ____cacheline_aligned; 147 + u8 data[3] __aligned(IIO_DMA_MINALIGN); 148 148 }; 149 149 150 150 static int ad7293_page_select(struct ad7293_state *st, unsigned int reg)