lkml.org 
[lkml]   [2022]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.19 0633/1157] iio: accel: adxl355: Fix alignment for DMA safety
    Date
    From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

    [ Upstream commit 46403dcf3a7cbd24b86f809fd79962f4d6b137c5 ]

    ____cacheline_aligned is insufficient guarantee for non-coherent DMA.
    Switch to the updated IIO_DMA_MINALIGN definition.

    Fixes: 327a0eaf19d53 ("iio: accel: adxl355: Add triggered buffer support")
    Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
    Cc: Puranjay Mohan <puranjay12@gmail.com>
    Acked-by: Nuno Sá <nuno.sa@analog.com>
    Link: https://lore.kernel.org/r/20220508175712.647246-4-jic23@kernel.org
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/iio/accel/adxl355_core.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/iio/accel/adxl355_core.c b/drivers/iio/accel/adxl355_core.c
    index 7561399daef3..4bc648eac8b2 100644
    --- a/drivers/iio/accel/adxl355_core.c
    +++ b/drivers/iio/accel/adxl355_core.c
    @@ -177,7 +177,7 @@ struct adxl355_data {
    u8 buf[14];
    s64 ts;
    } buffer;
    - } ____cacheline_aligned;
    + } __aligned(IIO_DMA_MINALIGN);
    };

    static int adxl355_set_op_mode(struct adxl355_data *data,
    --
    2.35.1


    \
     
     \ /
      Last update: 2022-08-16 02:15    [W:2.582 / U:0.656 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site