Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2950997rwb; Mon, 15 Aug 2022 14:43:48 -0700 (PDT) X-Google-Smtp-Source: AA6agR6QY+PXDoevgR6CK8kJxK7oW+qy+emIiKIWCHbHYwU3PVUfS43tJkUBoeJNlgcZKnDKYHKp X-Received: by 2002:a17:907:60c7:b0:731:4b42:4e3e with SMTP id hv7-20020a17090760c700b007314b424e3emr11607961ejc.236.1660599828117; Mon, 15 Aug 2022 14:43:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660599828; cv=none; d=google.com; s=arc-20160816; b=gavWDEKLVWKOlHh9XKNWx5aFI+3zSJBDehjBJWBo9NpGCDQ4ETinR//J6ij5bvEFKF YmonMFHZ0Kjv4m/YmnBcUGtk8IfqjTv2EDFI2pD/fARm9fabrctDpuj+VIsVbEvsh1ox 1ejROp5Umlpx2ZPKdoHbvALtHatWVRK7YDqyHXK6w6UZPDJ3Y2EkFHkTeFHgx4aKl3gv SiHp7cvZTK7Vxxg/dN/n4TMPlWFWt0vhqNiub6NtSAxKyQ4k9ZMiJfF8XiQ+KFwprcX1 WBHq62V23Or1jtu1RWsPMy1yHYHz6s2sE482sJrJ+ZH90wfK7DO/YD7qGTFyNMCXKhhO F0ag== 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=zBR1lbfYN+NEq+GhVjd9CXPD+ti9DDe4qMf5Z9kvdHNSX0c0KFO6866LBln3294jbt jd3GNoj7y+0Zl3AwG+CUua8TfmnbIfSQ7E+XdKljKdnqR07XgDrN6bIWzTcRwhRmhCXZ Hirrqo099NUi9qcSEOhyhiJySJUi6lL27JmtHe8pBD8KHUZMP+iY17SnOlYhE9h4Gt4K +LAkASRjRsgSJGPZ3N0ELxeK6pbQNXsLr3YJkuW+4dAvNmNXxnPjQLvzJQ7MzO/cbGVs EQxGhQLWcLIGdbREGgvrABxMXuTYP/BkTOdsSgwWPun//Am8Bna9xMdDB6fiuA4nTcGG pVbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="YZeug/Te"; 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 a9-20020a50c309000000b0043d8844cfcesi8466633edb.363.2022.08.15.14.43.20; Mon, 15 Aug 2022 14:43:48 -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="YZeug/Te"; 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 S1349555AbiHOVlZ (ORCPT + 99 others); Mon, 15 Aug 2022 17:41:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348817AbiHOVhh (ORCPT ); Mon, 15 Aug 2022 17:37:37 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7777B2634; Mon, 15 Aug 2022 12:27:19 -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 110B160EF0; Mon, 15 Aug 2022 19:27:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1EA96C433D6; Mon, 15 Aug 2022 19:27:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660591638; bh=dNFBnbzURibeCT2P3eZZy7892rCSoDAp9zS8hNV0w5c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YZeug/TeByO1VSP7D9FdJ8Thld7QtTpcfb/T6jC1wZsWtHkggBasrgWQRS/qF+yIg 7NIKPiZJu1nRd266bKenOOnLZcyFe3NMrOitOfGQ56ccxqyFPLb1iTRIzcTadUeoG+ ta2L/zu0LhWcir2Zrvdndf+deO8WAZZWz3dYukAQ= 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.18 0644/1095] iio: dac: mcp4922: Fix alignment for DMA safety Date: Mon, 15 Aug 2022 20:00:43 +0200 Message-Id: <20220815180456.044796888@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 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