From patchwork Tue May 3 08:58:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12835318 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 C9271C433EF for ; Tue, 3 May 2022 08:54:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230464AbiECI6V (ORCPT ); Tue, 3 May 2022 04:58:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232906AbiECI6U (ORCPT ); Tue, 3 May 2022 04:58:20 -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 EE6FE35DE9 for ; Tue, 3 May 2022 01:54:48 -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 A9944B81A96 for ; Tue, 3 May 2022 08:54:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E4B76C385B3; Tue, 3 May 2022 08:54:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651568086; bh=BB8oAlfH4dsktNO9dtAJJR7Qz8Yz1DGUgcqgMnoQDTQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sGKmPsJ84weRz+hK/FIT2mgD0Jyntx/BfUh7b+LUkcXats4DWwAsdUYZcWd18GHqK 4YHmqyUJbreUt3XFE/p89SkbV6H37okt8KNsVT+FMOgttmLADURV9ctAVYpDUrqYeQ PQDA4d45E+v5Jo4LyMtUfDPkWlhdDlVssUR5dA7hbt1TrNByA5k5k/g6lPT5bIRWaH 8RxKUe4U28GwR3VWtTVn5zl3MlrT5DqnHuYSjbYrZpIfQ3UPdrqF04rl6YtG6Wq4mC 43oAQkvPGRtdlRF0JyjjS/2bfLPgxXIXJiGx0XEH8EiFfaZei79O+802RiKDFVSukR OjyfQ8ijPnxmg== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Akinobu Mita , Alexandru Lazar , Alexandru Tachici , Antoniu Miclaus , Charles-Antoine Couret , Cosmin Tanislav , Cristian Pop , David Lechner , Ivan Mikhaylov , Jacopo Mondi , Jean-Baptiste Maneyrol , Lars-Peter Clausen , Marcelo Schmitt , =?utf-8?q?M=C3=A5rten_Lindahl?= , Matt Ranostay , Michael Hennerich , Michael Welling , Mugilraj Dhavachelvan , Navin Sankar Velliangiri , =?utf-8?q?Nuno_S=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_Kleine-K=C3=B6nig?= , Jonathan Cameron Subject: [PATCH 19/92] iio: adc: ad7949: Fix alignment for DMA safety Date: Tue, 3 May 2022 09:58:22 +0100 Message-Id: <20220503085935.1533814-20-jic23@kernel.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220503085935.1533814-1-jic23@kernel.org> References: <20220503085935.1533814-1-jic23@kernel.org> MIME-Version: 1.0 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_ALIGN 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 --- 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..7906f6c6409e 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_ALIGN); __be16 buf8b; };