Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3256329rwb; Mon, 15 Aug 2022 22:28:22 -0700 (PDT) X-Google-Smtp-Source: AA6agR4drncHJVxioNhv6Xwu61f5vXb68NX/u3KIrRLnYJVpGEBJVX2QA8sz3jSRt+0pv5Z7IrCe X-Received: by 2002:a17:90a:fd06:b0:1f3:29d8:72d8 with SMTP id cv6-20020a17090afd0600b001f329d872d8mr31091038pjb.23.1660627702206; Mon, 15 Aug 2022 22:28:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660627702; cv=none; d=google.com; s=arc-20160816; b=Ys9rfzhPVsiMSOYJa42gDOi1BdhSAcfOAkBMtxBvciWw8F1Man2xJUpThumcWwOqEj x5WIFk4AMsTa1Wh8ZelBqAFtOkpBgXmBrOUZKWMu4Syt//3fAxMTahcLi6rfgjoqgOcd GihKoGzFwsIhbcGMIxXuwyJS0HUnj5H9EFWing4ponhyzP4CpD5PsLqzVGTVBwSoQPYf KdQDzKUoL5oG1BoTjULmuOUPDh+jCWMsakNfGaF5iS74xDgUbTJo+SPUiq/H3DRXbjhJ +Dzpcj2QrsuTd6NaRGjdDSPbVZ5vAHv1K7tRc3s6hP54oTMJWANqLhN7rMpCpy2g9m27 Uptg== 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=6qt7cdkkdhmCM2WnVyvQWV2LWwGsC5gX2llS5nOPwLY=; b=YJfWJ266iQwiMN9Bcifut2MxlH4FzP6uthstQJbG3nFgekWIRDklSGzgly5jW55iWV BY9LRv5dnTKuu1mwMSz5g82jV75D1gEDoiekBhQlRNIdK4RH2NctUYPxKpqPwIscCfFz ukkilNObbDVhJt4B3hhXv2wTsydXEpiN3CA+/oQaCCJe0KFEVod6wZiEn8q9Yg5EvWIu pdWMb2j28mnRgbPX2ed9abqpHK59ECohJgGD4gIhsLwerwwt7hRKyT/SAMJRPHttJb57 9OT2hfUM7RN53RBdv4jfmQYidnniey3gAmtb76KVsKqR3BqwPxSpvleJT/ef/Oyu4C/R H+Ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=flzSJmrx; 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 rm6-20020a17090b3ec600b001ed0f6f1010si12974603pjb.70.2022.08.15.22.28.11; Mon, 15 Aug 2022 22:28:22 -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=flzSJmrx; 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 S231389AbiHPEhk (ORCPT + 99 others); Tue, 16 Aug 2022 00:37:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231248AbiHPEgx (ORCPT ); Tue, 16 Aug 2022 00:36:53 -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 C72599C210; Mon, 15 Aug 2022 13:26:45 -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 65A9F61089; Mon, 15 Aug 2022 20:26:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 513DDC433C1; Mon, 15 Aug 2022 20:26:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660595204; bh=LKS5fls3b0rL9L9SXSmCMaU/hrG7AW6TsELGrKgnn0I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=flzSJmrxRTmkzfDlkOXrNGn/tmEms6D3dcF4dZvczKkAyyck39Mw0GGFndyNcg3UV ktyFpQkHSxNRyS/DUNsmfSo3l81f3S+7U1se/fBvQ00FpjJNc4qiiNzTtHIVfyu3SL IqEMD6QrsXE+gJEh3P/NPNVhyeey721EwhdBenEM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jonathan Cameron , =?UTF-8?q?Nuno=20S=C3=A1?= , =?UTF-8?q?M=C3=A5rten=20Lindahl?= , Sasha Levin Subject: [PATCH 5.19 0658/1157] iio: adc: ti-adc084s021: Fix alignment for DMA safety Date: Mon, 15 Aug 2022 20:00:14 +0200 Message-Id: <20220815180506.053821625@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180439.416659447@linuxfoundation.org> References: <20220815180439.416659447@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 bb102fd600d1d6c0020a4514197c0604c4a218d9 ] ____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: 3691e5a69449 ("iio: adc: add driver for the ti-adc084s021 chip") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Acked-by: Mårten Lindahl Link: https://lore.kernel.org/r/20220508175712.647246-30-jic23@kernel.org Signed-off-by: Sasha Levin --- drivers/iio/adc/ti-adc084s021.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/adc/ti-adc084s021.c b/drivers/iio/adc/ti-adc084s021.c index c9b5d9aec3dc..1f6e53832e06 100644 --- a/drivers/iio/adc/ti-adc084s021.c +++ b/drivers/iio/adc/ti-adc084s021.c @@ -32,10 +32,10 @@ struct adc084s021 { s64 ts __aligned(8); } scan; /* - * DMA (thus cache coherency maintenance) requires the + * DMA (thus cache coherency maintenance) may require the * transfer buffers to live in their own cache line. */ - u16 tx_buf[4] ____cacheline_aligned; + u16 tx_buf[4] __aligned(IIO_DMA_MINALIGN); __be16 rx_buf[5]; /* First 16-bits are trash */ }; -- 2.35.1