From patchwork Sun May 8 17:57:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12842560 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 32940C433FE for ; Sun, 8 May 2022 19:12:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229605AbiEHTPs (ORCPT ); Sun, 8 May 2022 15:15:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343565AbiEHSDv (ORCPT ); Sun, 8 May 2022 14:03:51 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0102B558C for ; Sun, 8 May 2022 11:00:00 -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 sin.source.kernel.org (Postfix) with ESMTPS id 64680CE114E for ; Sun, 8 May 2022 17:59:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 888F8C385B0; Sun, 8 May 2022 17:59:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652032797; bh=3gXi9xDUm0BF9V/MR4Pm4CfJ1ut2/OWotlClKddHWZ4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Gvft/P/CXAtNXZBO1/i8qyQI5IK9D3qqFcCOOFyc6XSgTzn//8ouKIQLQmvP2nmUs Gq4HyX3ID5IffsWudDmaEX+i2Hqyj3F3wO0VdIWPqD966LSPYu6fu4knMgLV6hXvpB Qp5q5ZBteLchw0uURYofGNi5NIo/on1BCQRUlbQXKMm9GIGAxi4kAo/V/VVNXzipjm qWIZ1JpM7NAR/kVALFHHuwfPSegm82yk5afeA1djGsNZ6f8Cpcp9fJ7orZa2c31JKu 8KRb6XCWiBH23HPVyeyQsog2rkjWIlyRYjXv4/EhqR3hDDpQsOMVsbbBP5US87zT6y lvSLlAfdd1YvQ== 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_Lindahl?= , Matt Ranostay , 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 v2 86/92] iio: proximity: as3935: Fix alignment for DMA safety Date: Sun, 8 May 2022 18:57:06 +0100 Message-Id: <20220508175712.647246-87-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 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. Fixes: 24ddb0e4bba4 ("iio: Add AS3935 lightning sensor support") Signed-off-by: Jonathan Cameron Cc: Matt Ranostay Acked-by: Nuno Sá --- drivers/iio/proximity/as3935.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/proximity/as3935.c b/drivers/iio/proximity/as3935.c index 67891ce2bd09..ebc95cf8f5f4 100644 --- a/drivers/iio/proximity/as3935.c +++ b/drivers/iio/proximity/as3935.c @@ -65,7 +65,7 @@ struct as3935_state { u8 chan; s64 timestamp __aligned(8); } scan; - u8 buf[2] ____cacheline_aligned; + u8 buf[2] __aligned(IIO_DMA_MINALIGN); }; static const struct iio_chan_spec as3935_channels[] = {