From nobody Fri Oct 24 20:31:42 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 2ECF2C00140 for ; Mon, 15 Aug 2022 21:43:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349354AbiHOVnQ (ORCPT ); Mon, 15 Aug 2022 17:43:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349097AbiHOViw (ORCPT ); Mon, 15 Aug 2022 17:38:52 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4AEC82ED55; Mon, 15 Aug 2022 12:28:22 -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 dfw.source.kernel.org (Postfix) with ESMTPS id A12BD60FB1; Mon, 15 Aug 2022 19:28:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 91219C433C1; Mon, 15 Aug 2022 19:28:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660591701; bh=3SHcPNsSd7kyJBhhcXsA1nXQfXffY39m27eP4DbjyVs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IKHAReK2RYNrl8HA+DpG5pv5om7kH/9af/oF+gBsTfFIagQ4vUWUi4raMKaiYMV/+ NLKJgdGzMqmh7bW5bXjm28UebQiAOdHtxNWZNUs3OTDVQ2Pkv8zvbmgEFF494W9mBU Vq5jlwXLPPma0ROyxwUhN3JkGhZJP7VLm3tJXIak= 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.18 0657/1095] iio: gyro: adis16130: Fix alignment for DMA safety Date: Mon, 15 Aug 2022 20:00:56 +0200 Message-Id: <20220815180456.575004793@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@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