Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3084324rwb; Mon, 15 Aug 2022 17:44:41 -0700 (PDT) X-Google-Smtp-Source: AA6agR5Vbti120pQIjV7oyy3Qpz/s9xNsjQ+oI+TAQkh6ohr91v6gwpg/6JcjV5pjG/YTw2lcpc0 X-Received: by 2002:a17:906:7e43:b0:738:6395:8d94 with SMTP id z3-20020a1709067e4300b0073863958d94mr3064114ejr.54.1660610681491; Mon, 15 Aug 2022 17:44:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660610681; cv=none; d=google.com; s=arc-20160816; b=j9l25YnH6GiXamG/udlAlzGizJV26M49sd4hlAGIWtJYM7G9MY5TTzI5vImaxOyebh M+WYvPigPzMZusXDY+PAu/n+e/dDUDRlZR1KFBpFhxGxQ3RfeK3vLvEU08ZXpsnZJRPs oj1n4Z499+/M9TXhkWdhH0GmmuvVTyh3whHrRKvImnEoGrcwSpu7s7xJxeBCKvsMFVEY 6sYpFLFoTsffhXDsN/lCFmcKs6qnzicgLgyHwWJSfx7BUag6EJVoYUOQFhM20QSPtSVm ACaO2wHNZOzgIs+aXmepl72qUGWO+VXEJKxVzoyPI7Cs4JZU0tET9tlE3yAey9IvX4Uf 857A== 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=6zRa13Nf88pCBk4IfteUccr4hdVlfvuCgiJaJyXiq+Q=; b=Mh2Ryip5v+KOx4uGrVI0DlEM9hSdanLA9PQiTK2qclXZ7OjDGINLgbN6HFyxCWMCCo m1XQDn7JYLk7nwItkq6GBKeBGeDVLARoiVq8uogsoqdrl5kKfegokl7aBGybgNEYxeaa brB/VN6J+we+wLnJboGZj1QO855b3gRxCbYgSDB5pLJsC3CWiLce0kgO1GU02/ZZnMAk ayRGz2GnQCODCiVzptBqnG7ORMMvMe7Orb8uxwHYYq793LAVkk3la6gmS9OyeG7ebjIU 6jSlKmkfr/fi7eaPvzXnQkqBBUfaXmHkVe4L2NltMPaaHXFJNB69vnmW5HPD/5BzfJzQ 4UaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xN9q9MOd; 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 g11-20020a50ec0b000000b0043d9cfe0793si7761647edr.478.2022.08.15.17.44.16; Mon, 15 Aug 2022 17:44:41 -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=xN9q9MOd; 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 S1343561AbiHPAO5 (ORCPT + 99 others); Mon, 15 Aug 2022 20:14:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357285AbiHPAEE (ORCPT ); Mon, 15 Aug 2022 20:04:04 -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 AC764CC317; Mon, 15 Aug 2022 13:28:07 -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 CBF7A61187; Mon, 15 Aug 2022 20:28:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C22DEC433C1; Mon, 15 Aug 2022 20:28:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660595286; bh=dNFBnbzURibeCT2P3eZZy7892rCSoDAp9zS8hNV0w5c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xN9q9MOdDgP2vnkSUq0McM1cRqqdPB0cWay9+HU2XdmyPVNXaaT5kXbPm6uWx2RAg q3darCVFskUdfp+TrOgiPjKZMM4j/bEYFCtt/ZJX93WcoMDXZRibJXnNftHS0lndmg oQkxbqxv8QeDku1Vw9SkGT0ZO03MJbYXXngkKQrs= 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?= , Michael Welling , Sasha Levin Subject: [PATCH 5.19 0689/1157] iio: dac: mcp4922: Fix alignment for DMA safety Date: Mon, 15 Aug 2022 20:00:45 +0200 Message-Id: <20220815180507.181610102@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 e66bf04797f1f95a2402414c00e64d00f63d31ec ] ____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: 1b791fadf3a1 ("iio: dac: mcp4902/mcp4912/mcp4922 dac driver") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Acked-by: Michael Welling Link: https://lore.kernel.org/r/20220508175712.647246-61-jic23@kernel.org Signed-off-by: Sasha Levin --- drivers/iio/dac/mcp4922.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/dac/mcp4922.c b/drivers/iio/dac/mcp4922.c index cb9e60e71b91..6c0e31032c57 100644 --- a/drivers/iio/dac/mcp4922.c +++ b/drivers/iio/dac/mcp4922.c @@ -29,7 +29,7 @@ struct mcp4922_state { unsigned int value[MCP4922_NUM_CHANNELS]; unsigned int vref_mv; struct regulator *vref_reg; - u8 mosi[2] ____cacheline_aligned; + u8 mosi[2] __aligned(IIO_DMA_MINALIGN); }; #define MCP4922_CHAN(chan, bits) { \ -- 2.35.1