Patch "iio: dac: mcp4922: Fix alignment for DMA safety" has been added to the 5.18-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    iio: dac: mcp4922: Fix alignment for DMA safety

to the 5.18-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     iio-dac-mcp4922-fix-alignment-for-dma-safety.patch
and it can be found in the queue-5.18 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 03db068dc6b7989108721196d4e5ae88187ef0a4
Author: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
Date:   Sun May 8 18:56:40 2022 +0100

    iio: dac: mcp4922: Fix alignment for DMA safety
    
    [ Upstream commit e66bf04797f1f95a2402414c00e64d00f63d31ec ]
    
    ____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: 1b791fadf3a1 ("iio: dac: mcp4902/mcp4912/mcp4922 dac driver")
    Signed-off-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
    Acked-by: Nuno Sá <nuno.sa@xxxxxxxxxx>
    Acked-by: Michael Welling <mwelling@xxxxxxxx>
    Link: https://lore.kernel.org/r/20220508175712.647246-61-jic23@xxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/iio/dac/mcp4922.c b/drivers/iio/dac/mcp4922.c
index cb9e60e71b91..6c0e31032c57 100644
--- a/drivers/iio/dac/mcp4922.c
+++ b/drivers/iio/dac/mcp4922.c
@@ -29,7 +29,7 @@ struct mcp4922_state {
 	unsigned int value[MCP4922_NUM_CHANNELS];
 	unsigned int vref_mv;
 	struct regulator *vref_reg;
-	u8 mosi[2] ____cacheline_aligned;
+	u8 mosi[2] __aligned(IIO_DMA_MINALIGN);
 };
 
 #define MCP4922_CHAN(chan, bits) {			\



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux