From nobody Mon Sep 29 20:19:10 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 68728C25B0D for ; Tue, 16 Aug 2022 04:38:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229877AbiHPEip (ORCPT ); Tue, 16 Aug 2022 00:38:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231442AbiHPEh4 (ORCPT ); Tue, 16 Aug 2022 00:37:56 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 017F69E113; Mon, 15 Aug 2022 13:27:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 26319B8119A; Mon, 15 Aug 2022 20:27:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 71CECC433C1; Mon, 15 Aug 2022 20:27:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660595238; bh=3SHcPNsSd7kyJBhhcXsA1nXQfXffY39m27eP4DbjyVs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gzz3FRlH1GvhEZ0sUxNiVOSAIggxmoEiJTDcolovGrdu8VTyZyJAxXvUzKEJrYCI0 F/GG6d/Qb/8jo9JAvOE34VGns1eXNrR5Xmx5zr5zxYhfy41Fcpaj2L/6yYO8pa4vW5 n4lA0H5YDfSyfn7i8h8QOcMmvjv+EEl2QKRxAo1I= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jonathan Cameron , =?UTF-8?q?Nuno=20S=C3=A1?= , Sasha Levin Subject: [PATCH 5.19 0702/1157] iio: gyro: adis16130: Fix alignment for DMA safety Date: Mon, 15 Aug 2022 20:00:58 +0200 Message-Id: <20220815180507.682636333@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jonathan Cameron [ Upstream commit ff3211b2ba9afac80ceb795d148831dd879b30b7 ] ____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: 8e67875141b2 ("staging:iio:gyro: adis16130 cleanup, move to abi and = bug fixes.") Signed-off-by: Jonathan Cameron Acked-by: Nuno S=C3=A1 Link: https://lore.kernel.org/r/20220508175712.647246-74-jic23@kernel.org Signed-off-by: Sasha Levin --- drivers/iio/gyro/adis16130.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/gyro/adis16130.c b/drivers/iio/gyro/adis16130.c index b9c952e65b55..33cde9e6fca5 100644 --- a/drivers/iio/gyro/adis16130.c +++ b/drivers/iio/gyro/adis16130.c @@ -41,7 +41,7 @@ struct adis16130_state { struct spi_device *us; struct mutex buf_lock; - u8 buf[4] ____cacheline_aligned; + u8 buf[4] __aligned(IIO_DMA_MINALIGN); }; =20 static int adis16130_spi_read(struct iio_dev *indio_dev, u8 reg_addr, u32 = *val) --=20 2.35.1