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

iio: temp: ltc2983: 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: f110f3188e56 ("iio: temperature: Add support for LTC2983")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Acked-by: Nuno Sá <nuno.sa@analog.com>
Link: https://lore.kernel.org/r/20220508175712.647246-91-jic23@kernel.org

+2 -2
+2 -2
drivers/iio/temperature/ltc2983.c
··· 204 204 u8 num_channels; 205 205 u8 iio_channels; 206 206 /* 207 - * DMA (thus cache coherency maintenance) requires the 207 + * DMA (thus cache coherency maintenance) may require the 208 208 * transfer buffers to live in their own cache lines. 209 209 * Holds the converted temperature 210 210 */ 211 - __be32 temp ____cacheline_aligned; 211 + __be32 temp __aligned(IIO_DMA_MINALIGN); 212 212 }; 213 213 214 214 struct ltc2983_sensor {