Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3087344rwb; Mon, 15 Aug 2022 17:49:17 -0700 (PDT) X-Google-Smtp-Source: AA6agR75sKFX2UIe8Ok+XlneSSb93GsxNuZ9u+YOGvQjkgf9RDz1mIEqo9srjJwZoH+vS1ux1b/R X-Received: by 2002:aa7:d60b:0:b0:43c:f7ab:3c8f with SMTP id c11-20020aa7d60b000000b0043cf7ab3c8fmr16578720edr.6.1660610957201; Mon, 15 Aug 2022 17:49:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660610957; cv=none; d=google.com; s=arc-20160816; b=cuebJ3PoUN/DKnCEn/5YiG497Qext451GF3YMPhuMl9zAnyAVRjPEy0Q6/P3A9m6ZU Z+t0sKf45rEA9nZCwcb22JtGVcVzpug1q7R3MxeDCYij6YTnssdv5fDhK0pKOWypYDMx 6Fkcc0gdVl9PpD0i42kSIgc+jZk4Uh6oUWwb4k2QroXio8P8tm0B7k8frs1NdVmbQ5HZ SGd8YOPGUlSW0GSXdJqBVWs9V94f8PtJly0PdQDHVYcVOtBUTzJOW+pCfVQ6nrijWphH vqLZM8aobO/Z76w5hYiyTCJu8Ihv/ooRucAiwqpGE2XIikmE8jUsuVvFk/b1yHfYh0S7 E0kw== 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=eIhOeWoub/ZlzWIZCUwI5R1lE4xF2ySXQGVqm+GVb1g=; b=AgOqA/s6GOh/kqNYwxifU8ZZtEguHLnl3hhPBFmCO3wtUh1B/8oxtNyOXYlOz7L35j IFlCWh48rL3U478A2r+73XQYvpQwhDaImi7EqZA3e3oTJIkCx9POLC75o3kSm7NJzhAX ufYKh3J4Cag5My6EObc8UnOSWsFZxkts9Ipg/tioPYwBG7h9S/HJIq+zLu6ZxJxX5e0M QzITLm2a7k0jR7IEhRJNm23/lT2ubRsqy/IZirH6bnJ7iRDzfy0yPuUv1L/IugBwxCJR ILEti2kmtMRsIexTCZk2Ivh8nqVTbOiZM1X633JLbRQks6gQ2marUJB1SH8+gsoGgvDi p5Zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=UM4FEs9K; 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 cf20-20020a170906b2d400b007383d0bc6fcsi4541456ejb.218.2022.08.15.17.48.52; Mon, 15 Aug 2022 17:49:17 -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=UM4FEs9K; 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 S1357417AbiHPANd (ORCPT + 99 others); Mon, 15 Aug 2022 20:13:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357140AbiHPADt (ORCPT ); Mon, 15 Aug 2022 20:03:49 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2CF759A9B2; Mon, 15 Aug 2022 13:25:46 -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 7C17CB8119E; Mon, 15 Aug 2022 20:25:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C162DC433C1; Mon, 15 Aug 2022 20:25:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660595143; bh=/abWgxfwLHAtA6csyAuy8ia+oSqJcSA0RuGdE9gcwn8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UM4FEs9KYSIRSh1Z5qu60Ve58L2YGoYAy1EhZqGH2BmksQj2Gisl64TOjpeLgZzTu GJf4vsKyuQiLpgoxdOTur6SpN73UiBjZN9isWc3gE11ESy+O2dIz/+Hpl+IfUcZ9xu i/6mpbHEOhDb7EsiKah6jFRH56cHEedvNHWMW0zg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jonathan Cameron , Jacopo Mondi , =?UTF-8?q?Nuno=20S=C3=A1?= , Sasha Levin Subject: [PATCH 5.19 0653/1157] iio: adc: max11100: Fix alignment for DMA safety Date: Mon, 15 Aug 2022 20:00:09 +0200 Message-Id: <20220815180505.873123411@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 51f30d63145cc84cb8a8e0ec96f9a8b73e6b5448 ] ____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: a8e7e88df9ec ("iio: adc: Add Maxim MAX11100 driver") Signed-off-by: Jonathan Cameron Acked-by: Jacopo Mondi Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-25-jic23@kernel.org Signed-off-by: Sasha Levin --- drivers/iio/adc/max11100.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/adc/max11100.c b/drivers/iio/adc/max11100.c index eb1ce6a0315c..49e38dca8fe2 100644 --- a/drivers/iio/adc/max11100.c +++ b/drivers/iio/adc/max11100.c @@ -33,10 +33,10 @@ struct max11100_state { struct spi_device *spi; /* - * DMA (thus cache coherency maintenance) requires the + * DMA (thus cache coherency maintenance) may require the * transfer buffers to live in their own cache lines. */ - u8 buffer[3] ____cacheline_aligned; + u8 buffer[3] __aligned(IIO_DMA_MINALIGN); }; static const struct iio_chan_spec max11100_channels[] = { -- 2.35.1