Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2950982rwb; Mon, 15 Aug 2022 14:43:47 -0700 (PDT) X-Google-Smtp-Source: AA6agR6IMIzU9JZjFV8Zv3PtBfJmVAjb2kAobZRl8xI+3wWDaestELwdihA2y38ek2VkP8tpevvh X-Received: by 2002:a05:6402:2549:b0:440:5af7:f117 with SMTP id l9-20020a056402254900b004405af7f117mr16491226edb.259.1660599826853; Mon, 15 Aug 2022 14:43:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660599826; cv=none; d=google.com; s=arc-20160816; b=jjXuorBWoTI6q6zUF3J+uQdmU9IB2RRSUPuG3F9v+TM6+9Bc2dW0CmvdL/xyfpstvr Kt1wwr/vDHRQJc3/PuBao4DomKyqPWFc5PAv6kFPif46gEs07TA3nOZY3+1TuyWJOzZr uKc7UEnTYGNriZ9g8CeRoyaSTX78mKTsmzRiYfWGDNhUexur9QKsE0VoAKGBA6plpPuS MK8RaQXPBoi1h44L+9gDIeTCHZAuYm1P0KildCi5vbtU9Z0DstjsHfSe6vPePCK88zmn o+JwQA5g6aYVzmnoJ7Te4c0iiT+w3I9D1h+uSNgi5bKSbzt3nLwSNl4BCzzjt4ImQufQ i0vQ== 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=TKE6wqBEAUWl77rUoEfNvc5BekN5y3Ko6ppNDjAocVQ=; b=uMpMzgJR9lf94HNJaWMxHkK8HUBlos3uXeruEarRUOdeadXfvQOjewe8W5WZOyMOdj Dbwi+o/gL+esznCQTikplIOut9GKC89Y940Fyp7MLcZfs740CY/zDNU8MQxDz/6+Utyz JYCGZBZ10QELBvTHrIhchaErlLSM1aQgQaJxY1WLAmBuLXr0smMuwXVSfZLOJFke76xx 11J/u3HenXwx5aHvwXUyF2NeRqVy1SZA8SqvTnCnMJumAFHl93un7P/XPeT/HB6Px1Ka mulo8h54fFFztafiVnGkj1iMsGLAHbPRvK+520Tvta3Rac72c/z9vLlpy4ZvW1C2rJXg FBlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=si5wb0iL; 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 l23-20020a170906079700b00730951a95bbsi7417271ejc.521.2022.08.15.14.43.08; Mon, 15 Aug 2022 14:43:46 -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=si5wb0iL; 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 S1349325AbiHOVk4 (ORCPT + 99 others); Mon, 15 Aug 2022 17:40:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348660AbiHOVhB (ORCPT ); Mon, 15 Aug 2022 17:37:01 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0664227A; Mon, 15 Aug 2022 12:26:52 -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 B7683B81109; Mon, 15 Aug 2022 19:26:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1F043C433C1; Mon, 15 Aug 2022 19:26:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660591609; bh=gVIVNV2xHbIDh/TWiE3uTRTO6JJqsDPQmQjuj5fS39E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=si5wb0iLBMc7ur3+hWLMBCo1I9u28Fq04H+KRBYv9KNREisiJDR+6OwszGhyJvgm6 39cZgPRmDrkvH0byZtN2fPt4G/dPIBme4RQVtW4n2+2re+Lsz7+LSPagLCgG0qzvYL KqwtRZhLCABYQs2ew+zyfEH+bqG2CLVGLcM8n5Bw= 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 0636/1095] iio: dac: ad5764: Fix alignment for DMA safety Date: Mon, 15 Aug 2022 20:00:35 +0200 Message-Id: <20220815180455.730784445@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 b378722a3e9bb51318c0de7eeb4d71f2fcd6987f ] ____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: 68b14d7ea956 ("staging:iio:dac: Add AD5764 driver") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-53-jic23@kernel.org Signed-off-by: Sasha Levin --- drivers/iio/dac/ad5764.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/dac/ad5764.c b/drivers/iio/dac/ad5764.c index d235a8047ba0..26c049d5b73a 100644 --- a/drivers/iio/dac/ad5764.c +++ b/drivers/iio/dac/ad5764.c @@ -56,13 +56,13 @@ struct ad5764_state { struct mutex lock; /* - * DMA (thus cache coherency maintenance) requires the + * DMA (thus cache coherency maintenance) may require the * transfer buffers to live in their own cache lines. */ union { __be32 d32; u8 d8[4]; - } data[2] ____cacheline_aligned; + } data[2] __aligned(IIO_DMA_MINALIGN); }; enum ad5764_type { -- 2.35.1