From mboxrd@z Thu Jan 1 00:00:00 1970 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 8557EC4332F for ; Sun, 8 May 2022 19:14:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229618AbiEHTSb (ORCPT ); Sun, 8 May 2022 15:18:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239144AbiEHRzW (ORCPT ); Sun, 8 May 2022 13:55:22 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3BEBBDFEA for ; Sun, 8 May 2022 10:51:31 -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 CC2E06127D for ; Sun, 8 May 2022 17:51:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2BA92C385A4; Sun, 8 May 2022 17:51:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652032290; bh=l2HqcEz2f3e6Yupv/L+8WFWmrIAvRHSPy0G39uH4FbA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kWZwDCp5Y06vdfzDG/xFAewpmYMrAzn21rGyAY9ljtIkxAgSa4qg2RiKZdrC8BWEX zq3XLIBrOpE5OhLU76VrY8WIWcAsoI8Zh7fZUP6FuuBG/DexnlYy7D5zgGHWQUgsDl yhY8RUSgyszaYLIbPb9ZHMvBAcH7xRVJQ5hVgb9oxl9pITyczut4rfWd84S/6PCRCv HogeJUsDPLGDvbXCZhgwVjUmMC+SHHaJWjl83VKzneWcZdXbTM6zvIly8+5eddWh19 QRsOUWEgE/rnYeBJK7x/KCWZRoDV8rA1O1JkHw5ZFkVr8305x/CXmi48B365pVusNS qbeJcqcydQRiA== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Alexandru Lazar , Akinobu Mita , Alexandru Tachici , Antoniu Miclaus , Charles-Antoine Couret , Cosmin Tanislav , David Lechner , Ivan Mikhaylov , Jacopo Mondi , Jean-Baptiste Maneyrol , Lars-Peter Clausen , Marcelo Schmitt , =?UTF-8?q?M=C3=A5rten=20Lindahl?= , Matt Ranostay , Matt Ranostay , Michael Hennerich , Michael Welling , Mugilraj Dhavachelvan , Navin Sankar Velliangiri , =?UTF-8?q?Nuno=20S=C3=A1?= , Paul Cercueil , Phil Reid , Puranjay Mohan , Ricardo Ribalda , Robert Jones , Rui Miguel Silva , Sean Nyekjaer , Tomas Melin , Tomislav Denis , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Jonathan Cameron Subject: [PATCH v2 19/92] iio: adc: ad7949: Fix alignment for DMA safety Date: Sun, 8 May 2022 18:55:59 +0100 Message-Id: <20220508175712.647246-20-jic23@kernel.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220508175712.647246-1-jic23@kernel.org> References: <20220508175712.647246-1-jic23@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron ____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. Note the fixes tag predates some changes to this line of code so automated application of this fix may fail. Fixes: 7f40e0614317 ("iio:adc:ad7949: Add AD7949 ADC driver family") Signed-off-by: Jonathan Cameron Cc: Charles-Antoine Couret Acked-by: Nuno Sá --- drivers/iio/adc/ad7949.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/adc/ad7949.c b/drivers/iio/adc/ad7949.c index 44bb5fde83de..ed4c1656ca75 100644 --- a/drivers/iio/adc/ad7949.c +++ b/drivers/iio/adc/ad7949.c @@ -86,7 +86,7 @@ struct ad7949_adc_chip { u8 resolution; u16 cfg; unsigned int current_channel; - u16 buffer ____cacheline_aligned; + u16 buffer __aligned(IIO_DMA_MINALIGN); __be16 buf8b; }; -- 2.36.0