Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3088807rwb; Mon, 15 Aug 2022 17:51:19 -0700 (PDT) X-Google-Smtp-Source: AA6agR5W6lAKAB35ljb6RkButeWpRW5AoTjmMqp1u7qivahzusncYWJIT9mcsmE/mU5c1xnpTSqA X-Received: by 2002:a05:6402:50ce:b0:43d:559d:43f4 with SMTP id h14-20020a05640250ce00b0043d559d43f4mr16324987edb.325.1660611079640; Mon, 15 Aug 2022 17:51:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660611079; cv=none; d=google.com; s=arc-20160816; b=ghfSwkqfvapUroiaHaXdJDJiLwd4Pp7u4sgoJEUoVvezzRIbPWH3lQLmVF5I9smybz LMeansoTYd1rsd7Y5zAtcNpdpyHg7EmkEPHgnnctBXtjWBt0eOREMI42hY+KimNDvT6i a3sRoDhgOjeSQSbr6Ip9qHeBB/HnkpNZIzgA2OoBJkVscvj/megacSuHoOoZbmZVelQV 9TrK5yYbUGheeCsbcsWytpLe5pyumzdvOOseYl1a0nk1Dvuz0jLmYV0QeTLA/ARkWNEy gLNLvTyrIp9cAWPbWk4TjSYNp64D2/8ma8sPLirFdFl53ZfAlfjrVTaz+e71xPAKw5WF /yJQ== 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=+KtfuQg+eZy3wemcA6iANk5m1qNCpOwaFFp3MVslVBk=; b=nm2pWtS1YdMOJuvzQY/XB6fpFD/6oRIaS7euZyYVW6bpayrMZwXp05WV5/+aiW9erO FUhD5DEVSCVhQjiiQIhPJcsaZ9DqmobVtuc/b4U8sjrtKyjwnSWftFEJZfLYyRmSR82c pH1/CGypHrOJ3ZV7YudHbucQ8m525G4BRbEEBEhr0d1BxDAxLJDD86lRGtR6VUGHqaQQ YeOykBcDCIClrfwEc4jRYQBhwythtcW+HxjiQspRgLDZQ+OljPx0vaYsGYdIJ+zswx9H lxCEXEoqgeABruNMwDZBtvZZuShi0YGR6fTBZDGV0ZaVR3gQB41Ly6DFdbOvGGvlTDhT FmWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=MyCVsYId; 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 qa16-20020a170907869000b0073301a22cb7si8722592ejc.294.2022.08.15.17.50.54; Mon, 15 Aug 2022 17:51:19 -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=MyCVsYId; 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 S1357540AbiHPANr (ORCPT + 99 others); Mon, 15 Aug 2022 20:13:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357185AbiHPADx (ORCPT ); Mon, 15 Aug 2022 20:03:53 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B1399AFE3; Mon, 15 Aug 2022 13:26:02 -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 A81AB61072; Mon, 15 Aug 2022 20:26:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9D532C433D6; Mon, 15 Aug 2022 20:26:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660595161; bh=jAo6yBPzsPxvurDhE/Wv2SdbcO75Px0lVoNRh1O4SwU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MyCVsYIdH9vfmYbGVXdLs3+32KuyYf1eGiEFuE/esMB1eZQW++wIgJnnyfTscHkt5 MaX17cvRuTpn8DUzTow3JBrHC1mV9lrtjfMZZty+o/Y/M9YrtZhi/DhPGSk4pH7XkI HZDWxurxqcp6/vcctd3sHH1leXCwLhvNWGJBq5KQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jonathan Cameron , Lars-Peter Clausen , =?UTF-8?q?Nuno=20S=C3=A1?= , Sasha Levin Subject: [PATCH 5.19 0676/1157] iio: dac: ad5504: Fix alignment for DMA safety Date: Mon, 15 Aug 2022 20:00:32 +0200 Message-Id: <20220815180506.725671223@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 00b9737caa5aaed5cf45a7c7498edf5957efa3b2 ] ____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: 0dbe59c7a788 ("iio:ad5504: Do not store transfer buffers on the stack") Signed-off-by: Jonathan Cameron Cc: Lars-Peter Clausen Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-48-jic23@kernel.org Signed-off-by: Sasha Levin --- drivers/iio/dac/ad5504.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/dac/ad5504.c b/drivers/iio/dac/ad5504.c index a0817e799cc0..e6c5be728bb2 100644 --- a/drivers/iio/dac/ad5504.c +++ b/drivers/iio/dac/ad5504.c @@ -54,7 +54,7 @@ struct ad5504_state { unsigned pwr_down_mask; unsigned pwr_down_mode; - __be16 data[2] ____cacheline_aligned; + __be16 data[2] __aligned(IIO_DMA_MINALIGN); }; /* -- 2.35.1