Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3021478rwb; Mon, 15 Aug 2022 16:18:48 -0700 (PDT) X-Google-Smtp-Source: AA6agR5nd/Otk/rD4c+Qzdl8HynMxQxxEcI7msmDrD8qjBVDhIZrNJuKAHwrsq5s1nhv9Q7vuf9x X-Received: by 2002:a17:902:d58f:b0:16e:da09:2cae with SMTP id k15-20020a170902d58f00b0016eda092caemr19397782plh.124.1660605527781; Mon, 15 Aug 2022 16:18:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605527; cv=none; d=google.com; s=arc-20160816; b=ijVNDzedaQzdqDpN4S84CS6bbB9qrvQjXezCAtSakntNlT+0iFgjlEIhtRL/10C8rk lolDlP2tPwr3UmumOW3WKnKLZR8CTjdDpHE/u9dGQkwq8Bp0ZtC6mK2Ngirja3xt99Jb uF1FVi2W4gBRFiW0c8/6ET5Cb6Vn5o9K2mDyIVMTDKgpj6f2q2HHP3AXd41jnbBizXSy XKY6vnBhovaQndcptmkCPPatQ9PGVj31DttVCSIhFLq+TdhKK4jI0JC7rifZ03SnDOBw ZRhUr3WQVzcar0uX5GzdKZbSa4ukqYmfG2wGIU+yrkgQgTDUzcsuJWQqCYilu25oZP60 0gFQ== 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=fZaY3/21BlnERJ28fZvBL/ohbHf0/FbOZTlFjh5ntMI=; b=WfwwEbwPZ6wzKfdbmKeFOo3RUgz8wvlU2Qk0ywRsDsbdbW4KyCN65ZdxcTmi0p3HD6 s+XWioRkh0hvbmXFMwz6E7HZGSMdwMrH0y8ty9vU4YYfqTlqYmnvY8vCzMWduY5DwOYC GHHrQF9TgWzzSjRKlsqbq9qyxHnIxKqz/9QsiARhM2BmeHsro3d8hmKXyI2fWVs4PLic mxKafGU2h/ErBUqPQjL69+mZ/silDUc/1VtUjma28WIW+ksxHwmCbbTBz9shVSqWgQOl bSpi6WeXg0MenwXNtwPRKgeNMlKACZurIw1JBtbW0s5hlTaQrAQJvWxIq2YSEr/+i/ga LxnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=QV+n6Gkb; 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 v20-20020a170902f0d400b0016c0474d5cesi10368436pla.532.2022.08.15.16.18.35; Mon, 15 Aug 2022 16:18:47 -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=QV+n6Gkb; 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 S1349196AbiHOVmh (ORCPT + 99 others); Mon, 15 Aug 2022 17:42:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231453AbiHOVi1 (ORCPT ); Mon, 15 Aug 2022 17:38:27 -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 790482A96C; Mon, 15 Aug 2022 12:28:08 -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 39452B81109; Mon, 15 Aug 2022 19:28:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 81F16C433C1; Mon, 15 Aug 2022 19:28:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660591686; bh=SKMP35W+5RYcCpTlONFWVCGGNxzI2fUXOAlmrPnng1M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QV+n6GkbEdQNVlormvZWID8VzhMZOzCUE8ZXFuB5JjkTqn5XrzRldstvOnUZ0QHk3 PSrbX7N6Nu+dMK3pgVTG5xp9ShtuSS/VgOzuSCaw1Lv14Ae+flRrAeJy42jIOEXPUc GAIh4tImnRKpGYIvvZgCqPhQL7ENZzyJTtJKEPD4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jonathan Cameron , Cosmin Tanislav , =?UTF-8?q?Nuno=20S=C3=A1?= , Sasha Levin Subject: [PATCH 5.18 0624/1095] iio: addac: ad74413r: Fix alignment for DMA safety Date: Mon, 15 Aug 2022 20:00:23 +0200 Message-Id: <20220815180455.270466619@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 00eb2b8a077062557772234019ecd6045b8b6298 ] ____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. Update the comment to include 'may'. Fixes: fea251b6a5db ("iio: addac: add AD74413R driver") Signed-off-by: Jonathan Cameron Cc: Cosmin Tanislav Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-41-jic23@kernel.org Signed-off-by: Sasha Levin --- drivers/iio/addac/ad74413r.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/addac/ad74413r.c b/drivers/iio/addac/ad74413r.c index acd230a6af35..6a66d7a65db7 100644 --- a/drivers/iio/addac/ad74413r.c +++ b/drivers/iio/addac/ad74413r.c @@ -77,13 +77,13 @@ struct ad74413r_state { struct spi_transfer adc_samples_xfer[AD74413R_CHANNEL_MAX + 1]; /* - * DMA (thus cache coherency maintenance) requires the + * DMA (thus cache coherency maintenance) may require the * transfer buffers to live in their own cache lines. */ struct { u8 rx_buf[AD74413R_FRAME_SIZE * AD74413R_CHANNEL_MAX]; s64 timestamp; - } adc_samples_buf ____cacheline_aligned; + } adc_samples_buf __aligned(IIO_DMA_MINALIGN); u8 adc_samples_tx_buf[AD74413R_FRAME_SIZE * AD74413R_CHANNEL_MAX]; u8 reg_tx_buf[AD74413R_FRAME_SIZE]; -- 2.35.1