Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3025556rwb; Mon, 15 Aug 2022 16:23:35 -0700 (PDT) X-Google-Smtp-Source: AA6agR6ZDHdljLP2sw+kz+c4yaqWst8o/ra7jeV0/I7rYCtULYk9Y33qwZ5Wgp36/71cBMPbS0+1 X-Received: by 2002:a17:907:6818:b0:730:d99f:7b91 with SMTP id qz24-20020a170907681800b00730d99f7b91mr11653094ejc.496.1660605814794; Mon, 15 Aug 2022 16:23:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605814; cv=none; d=google.com; s=arc-20160816; b=yAwJhBoAloazXKvnLAJXJMmYbXzmPYVZ3IG8EYh0RCb0mRaPZ/MsbHQIPWDWwT+C/6 +2jsTnuGW2205B1Aa69mo/gJ21KG0USACaUokaBfWHCuDjEk/HVNQXoJumgTsjLaQb56 Rc56yiU+vBK9YkN2DjjQTTH0c7Vh/p51+mMX/A46CbJXBl7Tnu8dBvyrIKWXVv+B5F6q 61sHXls9gIZmxQr4hDEQHMAYH2Vw0Sa4BzDvkjlJ2nDkMPcom+kgZRkVGI5jH5/NgRMv wi2pkwfyNeZ6iGXOj24gqtRjDcBugCD1I5YteaB4SLwYSy6DgbXRmsfMy/izTQ2DEsWK XdBA== 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=Xb2uLaSmHk1akZ1+TMhAZU7eeQMBBEdHyHGfaZldQ/M=; b=FTIKSt4qr+yj2tAL/1L+scKYwkmJNlgFEk9dGERFXsz6odus+yWf3JV1mFa6an34nV rSkX6SWgcwIzcBWU5nvQ80GxxtaYCSQPLOgKOjWJMwHFO+WsmUX1RM2stv1smZQjR0w2 hRPjJpSYl5fMkvvD9JFqt3qWPGP0tkkYlwiKmYiY2PQPnvRkbzIGtkAXBScvzvGfUDZE FInXb8hVhOYofwlGUImnlXzndzHxY0tSf2JOYBqnXGhlvdHkhQE7uG8VnR4TyNOma/7M oem8CNgP67JdhcaEDvR0NCX20hXRi6wSe+OiYplGfcJHFLZhTd6nLtt5ybyYbq5asc1/ 6JTA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="TYz/gDZX"; 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 ne18-20020a1709077b9200b0073860fb87ddsi2583648ejc.487.2022.08.15.16.23.10; Mon, 15 Aug 2022 16:23: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="TYz/gDZX"; 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 S1349224AbiHOVmp (ORCPT + 99 others); Mon, 15 Aug 2022 17:42:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348996AbiHOVi1 (ORCPT ); Mon, 15 Aug 2022 17:38:27 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 481B22A43F; Mon, 15 Aug 2022 12:28:05 -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 F0BEDB81109; Mon, 15 Aug 2022 19:28:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 516E6C433C1; Mon, 15 Aug 2022 19:28:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660591682; bh=5YLn6KVnTu45C/6F30pnuNxkCjssGKF9M3riSTvOykY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TYz/gDZXEFXwJ/SsGg2Tru/3wMShOoy8zY4S7o23Q4g2nXxXiiPXm4zVObh8Lhbx8 VlGkRqXXLptncIhdeqc8YlGDwFJti5XXcpECzKYMLlt8PIU0bMgK8RK4/bZLb7iOdR fTdsIEEdI6QlICPT7oqgpZVEvlQZAC9JxJx0vPbs= 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.18 0623/1095] iio: adc: ti-tlc4541: Fix alignment for DMA safety Date: Mon, 15 Aug 2022 20:00:22 +0200 Message-Id: <20220815180455.236407383@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 62fa19bf484bfeb52c56b7c6d6a6b1222c597f9c ] ____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: ac2bec9d587c ("iio: adc: tlc4541: add support for TI tlc4541 adc") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-40-jic23@kernel.org Signed-off-by: Sasha Levin --- drivers/iio/adc/ti-tlc4541.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/adc/ti-tlc4541.c b/drivers/iio/adc/ti-tlc4541.c index 2406eda9dfc6..30f629a553a1 100644 --- a/drivers/iio/adc/ti-tlc4541.c +++ b/drivers/iio/adc/ti-tlc4541.c @@ -37,12 +37,12 @@ struct tlc4541_state { struct spi_message scan_single_msg; /* - * DMA (thus cache coherency maintenance) requires the + * DMA (thus cache coherency maintenance) may require the * transfer buffers to live in their own cache lines. * 2 bytes data + 6 bytes padding + 8 bytes timestamp when * call iio_push_to_buffers_with_timestamp. */ - __be16 rx_buf[8] ____cacheline_aligned; + __be16 rx_buf[8] __aligned(IIO_DMA_MINALIGN); }; struct tlc4541_chip_info { -- 2.35.1