From patchwork Tue May 3 08:58:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12835338 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 85C5FC433F5 for ; Tue, 3 May 2022 08:57:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233110AbiECJB0 (ORCPT ); Tue, 3 May 2022 05:01:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233105AbiECJBZ (ORCPT ); Tue, 3 May 2022 05:01:25 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 622DB36175 for ; Tue, 3 May 2022 01:57:54 -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 EAECD6134B for ; Tue, 3 May 2022 08:57:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 64129C385C2; Tue, 3 May 2022 08:57:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651568273; bh=TYzAvVm2ivargEWlAHa9bkYLp2mkvaTW3UJSAz5Z0j4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P4CLva1SkUTV9/MeHUhy5ZZnr18GF7P4kxD59V3UujHSTYtMUkejYVf3KL/vCA4Qh 97z/+gOGvmstoe+97SqQRvWcrbRXWye2/QjpTpxg/t6z+6AkxSfJMNDzS/vdIh7j1E QLRP3YJmJ8F6pZl1J8y17NgJ86qaCMBEjWccwHs0jKX39Nl10mKqRfGI9NCyAySvya ij354Cz/hpLDadsLXL0U5JPs/ckP643sDO/a7rVDE4DyG9FiDJduo3QGcIdW+UGdzy va908K4FoO8q6OupRjUKPvblFe9wesLdaT4VRfeuQm2sSyXhynfkFTbvfG2F5Rhr6U s8/6rF3/TEmoA== 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 39/92] iio: adc: ti-tlc4541: Fix alignment for DMA safety Date: Tue, 3 May 2022 09:58:42 +0100 Message-Id: <20220503085935.1533814-40-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. Update the comment to include 'may'. Fixes: ac2bec9d587c ("iio: adc: tlc4541: add support for TI tlc4541 adc") Signed-off-by: Jonathan Cameron --- drivers/iio/adc/ti-tlc4541.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/adc/ti-tlc4541.c b/drivers/iio/adc/ti-tlc4541.c index 2406eda9dfc6..b418fc47dc8f 100644 --- a/drivers/iio/adc/ti-tlc4541.c +++ b/drivers/iio/adc/ti-tlc4541.c @@ -37,12 +37,12 @@ struct tlc4541_state { struct spi_message scan_single_msg; /* - * DMA (thus cache coherency maintenance) requires the + * DMA (thus cache coherency maintenance) may require the * transfer buffers to live in their own cache lines. * 2 bytes data + 6 bytes padding + 8 bytes timestamp when * call iio_push_to_buffers_with_timestamp. */ - __be16 rx_buf[8] ____cacheline_aligned; + __be16 rx_buf[8] __aligned(IIO_ALIGN); }; struct tlc4541_chip_info {