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 92E3AC433FE for ; Wed, 4 May 2022 06:30:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344938AbiEDGeV (ORCPT ); Wed, 4 May 2022 02:34:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345025AbiEDGeS (ORCPT ); Wed, 4 May 2022 02:34:18 -0400 Received: from smtp1.axis.com (smtp1.axis.com [195.60.68.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F1121B6 for ; Tue, 3 May 2022 23:30:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1651645843; x=1683181843; h=date:to:cc:subject:message-id:references:mime-version: content-transfer-encoding:in-reply-to:from; bh=5wMnkyiO2g8eiWCgCr9D8xJQRBEoRtsW5TEp5jSKZuk=; b=Bfj7c1k6laaC6g7Naf9Ws75f6up177WEdKQeAL/qOouSPwwvx/udGpGZ xXfveoK9lBIQGssQIJdXK9vmOxZ29j68rFV70aSL0UlGRxhzkX/MIUnWO DQq2HW6W5ptUZQByGa06PIsZ9ScQZkU6bSgVhgsWpPfN8VzVfcv9qNVbu h3adjzjQt9hYOD2hoJblmwb40xyWmM8i1h03EdRWHE3uPu8uCAcmrw7Ex kNaZoK89jW/nGvBhMQ6Vgrk1r5qs/cvoR74EV3w/YALXbuBRY3gLpgxrm k0eEwlBGHHjD/k/XlDzgPR+mkwBvvAPlsQFNyg722uz9NgBu38LYsdXD3 A==; Date: Wed, 4 May 2022 08:30:39 +0200 To: Jonathan Cameron CC: "linux-iio@vger.kernel.org" , 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 , =?iso-8859-1?Q?M=E5rten?= Lindahl , Matt Ranostay , Michael Hennerich , Michael Welling , Mugilraj Dhavachelvan , Navin Sankar Velliangiri , Nuno =?iso-8859-1?Q?S=E1?= , Paul Cercueil , Phil Reid , Puranjay Mohan , Ricardo Ribalda , Robert Jones , Rui Miguel Silva , Sean Nyekjaer , Tomas Melin , Tomislav Denis , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Jonathan Cameron Subject: Re: [PATCH 29/92] iio: adc: ti-adc084s021: Fix alignment for DMA safety Message-ID: References: <20220503085935.1533814-1-jic23@kernel.org> <20220503085935.1533814-30-jic23@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220503085935.1533814-30-jic23@kernel.org> From: Marten Lindahl Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org On Tue, May 03, 2022 at 10:58:32AM +0200, Jonathan Cameron wrote: > 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. > > Update the comment to include 'may'. > > Fixes: 3691e5a69449 ("iio: adc: add driver for the ti-adc084s021 chip") > Signed-off-by: Jonathan Cameron > Cc: Mårten Lindahl Acked-by: Mårten Lindahl > --- > drivers/iio/adc/ti-adc084s021.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/iio/adc/ti-adc084s021.c b/drivers/iio/adc/ti-adc084s021.c > index c9b5d9aec3dc..6464541319af 100644 > --- a/drivers/iio/adc/ti-adc084s021.c > +++ b/drivers/iio/adc/ti-adc084s021.c > @@ -32,10 +32,10 @@ struct adc084s021 { > s64 ts __aligned(8); > } scan; > /* > - * DMA (thus cache coherency maintenance) requires the > + * DMA (thus cache coherency maintenance) may require the > * transfer buffers to live in their own cache line. > */ > - u16 tx_buf[4] ____cacheline_aligned; > + u16 tx_buf[4] __aligned(IIO_ALIGN); > __be16 rx_buf[5]; /* First 16-bits are trash */ > }; > > -- > 2.36.0 >