From patchwork Sun May 8 17:56:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12842564 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 867E3C433F5 for ; Sun, 8 May 2022 19:12:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231645AbiEHTP4 (ORCPT ); Sun, 8 May 2022 15:15:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240292AbiEHSC5 (ORCPT ); Sun, 8 May 2022 14:02:57 -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 4D770558C for ; Sun, 8 May 2022 10:59:06 -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 0DD30B80E5C for ; Sun, 8 May 2022 17:59:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2D0DFC385B0; Sun, 8 May 2022 17:58:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652032743; bh=8ujw263cRvevAritDYmfSjf5OqYXE/cVT+iuKR6UrY4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=u4aveleV07OCFaemY0PjByGhwGQQjdXJCxuFsJg0aiiaz79eNYJj82cfHIiBEwYkO g2s6qU4YrGUZ00n8s8a18wqHINoqfEeFHATlzoxIdgi1Yr+4OHnv/9QGL8SilBULyy cKEj/EwuaqrtLPiBqd8JbCH1Qnn+Izur+PLE/6zVY9vNj/I0P79Qww4jIeGntpy086 CCBYpW8wg52EI99QtwyakWjJPxWV9HZs+5hZLlS7B0ngG3LJ/8RoyVLUsXHiBnOkPN BVLIaws8sro0trVsuJZYC/yVmjGL3H8KdTXRZythTtdgbhMjF67qQAre8xjwJPJHxj j/TgzeAqCWCig== 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 , Jean-Baptiste Maneyrol Subject: [PATCH v2 79/92] iio: imu: mpu6050: Fix alignment for DMA safety Date: Sun, 8 May 2022 18:56:59 +0100 Message-Id: <20220508175712.647246-80-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: 6b0cc5dce072 ("iio:imu:inv_mpu6050 Fix dma and ts alignment and data leak issues.") Signed-off-by: Jonathan Cameron Acked-by: Jean-Baptiste Maneyrol Acked-by: Nuno Sá --- drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h b/drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h index c6aa36ee966a..32b58b797d57 100644 --- a/drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h +++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_iio.h @@ -203,7 +203,7 @@ struct inv_mpu6050_state { s32 magn_raw_to_gauss[3]; struct iio_mount_matrix magn_orient; unsigned int suspended_sensors; - u8 data[INV_MPU6050_OUTPUT_DATA_SIZE] ____cacheline_aligned; + u8 data[INV_MPU6050_OUTPUT_DATA_SIZE] __aligned(IIO_DMA_MINALIGN); }; /*register and associated bit definition*/