Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3025957rwb; Mon, 15 Aug 2022 16:23:59 -0700 (PDT) X-Google-Smtp-Source: AA6agR6/Ad2KJafJjqVwWH6t8RvmZXN3oNevU6ZRPPyazNEvxP79n4Qh0VIqygN0YxvEzbZTWbpS X-Received: by 2002:a05:6402:341:b0:440:86a2:8272 with SMTP id r1-20020a056402034100b0044086a28272mr16198539edw.70.1660605839489; Mon, 15 Aug 2022 16:23:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605839; cv=none; d=google.com; s=arc-20160816; b=B1E8/gJN+Q+IP/yUOUG1m3vFzOU8ITsuMRYm4p5UoXVe3X2VkgKDb/lMtvQNP6yNzq kCRDiWxZ53G5qSv/oyT8nKTJwAtZQ2IyL3eMnkYp7thP5CQEjq5LbTx6Bn+UKlCbrGmF igxy1GRzIHKL174R1DjxTa0T8dZ7gU9l2qXeGG5F9+Stlu+QYzRtodkJ3WJStS4UYohG c823v7eHzmoIaRCJ2rAA3XjkL2G9glD7IXmpi5F7oGJjEEeHzEEA218t8MTRirLPllU6 rn/7TOJ2/s8EPUSemlBJYF/M17vOlv+QdGLLSmih6PrWcpW2Z42YAlXxDrzqMtDU8LNX CYXA== 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=a3fRsZOVl2Qe9ng/bZ41rIKDfulN5973bO1pHNOxV0k=; b=daepcrvHgXFCq6TJBQe3rdr8wd15rIC5DdvymrYRBSs8tzTDOr1MmmrM0luiWecuKM +YJuPZhz+Ryuz6/fd6hiallQ+CNnFlAH+feEiIjXhbDUeFeRoCHP2dRif9w6FbK05yOI 9jHQuI8Ia+e8CfDMSsjiH1rbSsVknrwOPjE+w8Qa9mLNvl7isUDcNhc4AsSopID1GHT9 1ZG3V8D1D6J4XERJx0kvpCvl57bPQsPkdxuWwVLj1t3kgnbZJx5wIW6/zI6zjpa3BD1G hUhYDpe2MRKdpCnpO9c1W/2Mm28kayw7OWggMuEZHNMCqbHUW6juy6rXlbbZ55Cewg3j dWig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=NTPQsqKv; 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 z12-20020a170906714c00b00730947701dbsi7576048ejj.485.2022.08.15.16.23.34; Mon, 15 Aug 2022 16:23:59 -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=NTPQsqKv; 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 S1349435AbiHOVno (ORCPT + 99 others); Mon, 15 Aug 2022 17:43:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349215AbiHOVkT (ORCPT ); Mon, 15 Aug 2022 17:40:19 -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 AB7123F324; Mon, 15 Aug 2022 12:28:39 -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 2C3F3B81120; Mon, 15 Aug 2022 19:28:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5702BC433C1; Mon, 15 Aug 2022 19:28:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660591716; bh=Fz0Od070cEnkqYN5WQgTtuDbh/fruRSQCiM/ni+h/wg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NTPQsqKvIRotwFHPNEX9jVyYrBetNWJdxoVZEX72+OQ7zxpNj0X2OLAJ8V5brjjPQ 6djsQANPyIJx6OiZUVh/pnN7aQjwfab/6V5diFmTgRChFXU7thT3hQIPK12K9+tzaS BDt3z7W2k8ZRLFlX10XalLBwvY1jZt2e7LNIhkrA= 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 0670/1095] iio: resolver: ad2s1200: Fix alignment for DMA safety Date: Mon, 15 Aug 2022 20:01:09 +0200 Message-Id: <20220815180457.107638556@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 37882314d3bdc2ae775ebb9fa8ed7a94cd1aad61 ] ____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 tag is probably not where the issue was first introduced, but is likely to be as far as anyone considers backporting this fix. Fixes: 0bd3d338f61b ("staging: iio: ad2s1200: Improve readability with be16_to_cpup") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-89-jic23@kernel.org Signed-off-by: Sasha Levin --- drivers/iio/resolver/ad2s1200.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/resolver/ad2s1200.c b/drivers/iio/resolver/ad2s1200.c index 9746bd935628..9d95241bdf8f 100644 --- a/drivers/iio/resolver/ad2s1200.c +++ b/drivers/iio/resolver/ad2s1200.c @@ -41,7 +41,7 @@ struct ad2s1200_state { struct spi_device *sdev; struct gpio_desc *sample; struct gpio_desc *rdvel; - __be16 rx ____cacheline_aligned; + __be16 rx __aligned(IIO_DMA_MINALIGN); }; static int ad2s1200_read_raw(struct iio_dev *indio_dev, -- 2.35.1