Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3257496rwb; Mon, 15 Aug 2022 22:30:19 -0700 (PDT) X-Google-Smtp-Source: AA6agR49wRQ1MnEIl0VFDHS9DYK7tYzKAms85JGCv8aS+8aVTmrRWiaWRfTEey0FMjILZsRbusse X-Received: by 2002:a17:907:75dc:b0:730:9c68:9a2e with SMTP id jl28-20020a17090775dc00b007309c689a2emr12824293ejc.22.1660627819271; Mon, 15 Aug 2022 22:30:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660627819; cv=none; d=google.com; s=arc-20160816; b=fmyeoNJzFAD/fSCMmwY9wIfLW2jWdRRdqChm0bljApnbGRuIqXYoKvOSYeWI80zVi9 PmWoTV3BlPobSCp0kMLCgtvZs8t2MJBiyl1KCF5p3uTXzrEMAudBNQF7t3d6dzJ+RA+D 54B1i+9gaaCNjvY6x8EA53MLz1Ua2KIBOL8I72JA0HtrnZMmzGCfwtCdXwFf+qxFoYOz 83sVQLsR4Ze+69Wmb8qClBfmrEJoFLJaKQwE0WR9dVw5Rpd4Ax6nUeGEEb2TsHG77dWn WZbc3wlfs1QL5Vn+RC6Z3qY4+xRcCuDJuqv3mECT3ZTBcY3to0zlhMwjEj4jAdOj0r+H qmqw== 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=qOejTOwWDvNhX1rlo+J4Fh1v8puzgjhb9BdaI0ICaCA=; b=jOB840yoOVa7HluLnJBwyeTWjfBMI3+KPIM5K2G39vziEqfZ0t0CcdJaNyRRsrowSt KICOsbYb8pZqC2Ig2yqO8yX8Knuskp0WzpvwvwBe3vzXDIorxd/sztf+3NDx5LaCntML oTqLNQIXemdcO8DgpEiNvhbbRP0PelgNq27gIyv2eWLN6yg37llZTh73X54W0RNw13UX +1b1wdh5ykBt0eeHK45yiGvJ/2nMhsh4Zd/aiZOpD1gfYPHQ/C5srSyD5fqpIW0PeYEz vw0vDYUa14i4J4249M9NOIrUSy+rqoYVYIiqHnnRpXwWcP4PGs5yEOo3qEERtgDUOfk2 ppvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=pju+3NPd; 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 hc12-20020a170907168c00b007316cc27ab0si11027581ejc.980.2022.08.15.22.29.53; Mon, 15 Aug 2022 22:30:19 -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=pju+3NPd; 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 S231422AbiHPEhu (ORCPT + 99 others); Tue, 16 Aug 2022 00:37:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231156AbiHPEgz (ORCPT ); Tue, 16 Aug 2022 00:36:55 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A37D99C2D0; Mon, 15 Aug 2022 13:26:50 -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 4E2B5B81197; Mon, 15 Aug 2022 20:26:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 79027C433D6; Mon, 15 Aug 2022 20:26:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660595208; bh=gjLriqIdzmeysA+p9MegAImHwIi1C5sySXkdAMnieJs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pju+3NPd3O3LPf69s4V9MVgq4Lz4JD6iTbiIXeYkBI+L62iCx3zwWqBLKeR9/A4pH Ckx4VjHU81T1TNJf+qDysF7OlQX5jZ/dinxK8Vx9zy7gB0nXzv41MdpD7lOF1sbTkJ U0FwQTzc3eX2RsKEAUgxCU4lSs4XZO8KflOfc/xI= 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?= , Sasha Levin Subject: [PATCH 5.19 0659/1157] iio: adc: ti-adc108s102: Fix alignment for DMA safety Date: Mon, 15 Aug 2022 20:00:15 +0200 Message-Id: <20220815180506.089544338@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 6909fe17888b66ea53ebb15640f82b97daa587a0 ] ____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. Dual fixes tags as two cases that were introduced in different patches. One of those patches is a fix however and likely to have been backported to stable kernels. Note the second alignment marking is likely to be unnecessary, but is left for now to keep this fix simple. Fixes: 3691e5a69449 ("iio: adc: add driver for the ti-adc084s021 chip") Fixes: cbe5c6977604 ("iio: adc: ti-adc108s102: Fix alignment of buffer pushed to iio buffers.") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-31-jic23@kernel.org Signed-off-by: Sasha Levin --- drivers/iio/adc/ti-adc108s102.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/adc/ti-adc108s102.c b/drivers/iio/adc/ti-adc108s102.c index c8e48881c37f..c82a161630e1 100644 --- a/drivers/iio/adc/ti-adc108s102.c +++ b/drivers/iio/adc/ti-adc108s102.c @@ -77,8 +77,8 @@ struct adc108s102_state { * tx_buf: 8 channel read commands, plus 1 dummy command * rx_buf: 1 dummy response, 8 channel responses */ - __be16 rx_buf[9] ____cacheline_aligned; - __be16 tx_buf[9] ____cacheline_aligned; + __be16 rx_buf[9] __aligned(IIO_DMA_MINALIGN); + __be16 tx_buf[9] __aligned(IIO_DMA_MINALIGN); }; #define ADC108S102_V_CHAN(index) \ -- 2.35.1