Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3017029rwb; Mon, 15 Aug 2022 16:13:35 -0700 (PDT) X-Google-Smtp-Source: AA6agR7xiAHC9xH0LqhIyKSokxb7DRoaOHV4jOahaRoKORkHgkgmMdtoK0TEZ2//DFZEnb46JRdP X-Received: by 2002:a05:6402:d05:b0:425:b7ab:776e with SMTP id eb5-20020a0564020d0500b00425b7ab776emr17122397edb.142.1660605214774; Mon, 15 Aug 2022 16:13:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605214; cv=none; d=google.com; s=arc-20160816; b=tp2VA2icJl7eG3tmpOQxUMSAv9cNV8VNjeQE9kVuW/OnWs5M5CAnMbEuE8Ro82F2Co C7CmlsbWFafSiIb5PAnw9r8+A1wJQDaGg9vDODX7qJTgF5AJoTOFsrviplq0Ht6OVzq1 3BDAy2iysX/07PXKFP0k1u+KlmbdtRwhYVPjBHhGU+gCiPbqfXY78EFkc6fMPl8AJnHc SJIzTEYlbjMQ7vtZolIkF9Bacqvh52yqdVFfjOmp+9uQJwwxVaPgxQjf7FcwdURRpTaU xkq50d3zOGboepPp6sBb3wG1D5nMkil6LJVbDOC8ZY96A0aO2fDKsiJP8AjkGcJpHzJS YMKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=gMnX37KDhzOPcbYfTVVH2D7YlPDJrJvdYrJtMWPHB50=; b=TnKIOwWZiVWObQPoRNCI9QqtDetnsKDsF26vmIaC7Icr7QbnGlBvkqGMhlTsF5VqkS Q6bCkIb5VUEZ5L+Z+vHiCfqbnJVqgx3yvBA6sh9aMsJhFmUDI6y5m6hHNepocM1y0uX2 94qR8fgm534g61V7h9Gug6vKrfz8WxSO1/gXwC1MJ1XUZnG3IPZovS1oajYkFM1yvAYP hhta6crWlDKBtgeYUS2AuSniNKU9r/moBX/7YxtrbeRI9tiLTaOe+CzDmo9ncG0wXrY0 IRu+qjaI2m2ln+0UM4Ib7Sqg+ZGgSPYNwPbrKG4yGfbVCk0ylyjlC46YSWAmIsap8ceM tMyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vJpE4ANY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ds1-20020a170907724100b00730a42c33f5si9176535ejc.768.2022.08.15.16.13.09; Mon, 15 Aug 2022 16:13:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=vJpE4ANY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350120AbiHOVu2 (ORCPT + 99 others); Mon, 15 Aug 2022 17:50:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350148AbiHOVrS (ORCPT ); Mon, 15 Aug 2022 17:47:18 -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 0205C7D1F4; Mon, 15 Aug 2022 12:31:07 -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 5F8FFB81126; Mon, 15 Aug 2022 19:31:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3161BC433C1; Mon, 15 Aug 2022 19:31:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660591865; bh=kiF11z6MXxdcmqUH02ZK+3YK79JUgbzvn7owzU+ly+s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vJpE4ANYVqxEdvOhwMLbpWE1ezXmypNEPmGCu3bO3TmZL7E6vMAAJCtqH0P8VWbjU Y7q7bzHgxgA0kwLtMRQtCGIxrp+AJuWW1RvvwLBfpKYe376vLIhypw7GJ4aETcF5PU 3MrReH85eKPhnqnqMS5R1as3SALdzI0dxzp0q008= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jonathan Cameron , Jean-Baptiste Maneyrol , Jean-Baptiste Maneyrol , =?UTF-8?q?Nuno=20S=C3=A1?= , Sasha Levin Subject: [PATCH 5.18 0662/1095] iio: imu: inv_icm42600: Fix alignment for DMA safety in buffer code. Date: Mon, 15 Aug 2022 20:01:01 +0200 Message-Id: <20220815180456.784614907@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jonathan Cameron [ Upstream commit b0aa05065a0c1d1bffa10923dbc36f7193babbb7 ] Second fix for this driver due to different introducing patches. ____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: 7f85e42a6c54 ("iio: imu: inv_icm42600: add buffer support in iio devices") Signed-off-by: Jonathan Cameron Cc: Jean-Baptiste Maneyrol Acked-by: Jean-Baptiste Maneyrol Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-79-jic23@kernel.org Signed-off-by: Sasha Levin --- drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.h b/drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.h index de2a3949dcc7..8b85ee333bf8 100644 --- a/drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.h +++ b/drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.h @@ -39,7 +39,7 @@ struct inv_icm42600_fifo { size_t accel; size_t total; } nb; - uint8_t data[2080] ____cacheline_aligned; + uint8_t data[2080] __aligned(IIO_DMA_MINALIGN); }; /* FIFO data packet */ -- 2.35.1