iio: frequency: admv1014: Fix alignment for DMA safety
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 8 May 2022 17:56:49 +0000 (18:56 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 14 Jun 2022 10:53:18 +0000 (11:53 +0100)
____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: f4eb9ac7842f ("iio: frequency: admv1014: add support for ADMV1014")
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-70-jic23@kernel.org
drivers/iio/frequency/admv1014.c

index a7994f8e6b9ba9d1c9a6dee7a332621bd7b1dd4f..d1ccaa7ed5feee097c20d26e43c54543de032564 100644 (file)
@@ -127,7 +127,7 @@ struct admv1014_state {
        unsigned int                    quad_se_mode;
        unsigned int                    p1db_comp;
        bool                            det_en;
-       u8                              data[3] ____cacheline_aligned;
+       u8                              data[3] __aligned(IIO_DMA_MINALIGN);
 };
 
 static const int mixer_vgate_table[] = {106, 107, 108, 110, 111, 112, 113, 114,