Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3027362rwb; Mon, 15 Aug 2022 16:25:42 -0700 (PDT) X-Google-Smtp-Source: AA6agR5F8DwvJDrVAfaZ8Jx2eu9UG4Hr1tJM8MKXYs2JjHz316qrk+5L+TRk/G+Xiu1wcduQZep5 X-Received: by 2002:a17:907:1b03:b0:6ff:78d4:c140 with SMTP id mp3-20020a1709071b0300b006ff78d4c140mr11789868ejc.554.1660605817585; Mon, 15 Aug 2022 16:23:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605817; cv=none; d=google.com; s=arc-20160816; b=fEIHRv08GB5jlDKNKjFGnXmvpxSK52x739rE4btnO7JaXYO9z76z1kJqZ7Z5jYsbeR gHyrW7WNTuGjMc/xLQmUsskvDyuYWxm2nzwLegckxBFT4PsBTM4p24HICfKGoStUrYqv EEHBZJPbxuElgAIYUoSXJwCdPL4Cr6dphXixPXgLWYS/lQxvk0aFEyDR3LvOtHZPEuTL h2foOGzv1R12gaGkAScLI5wt+zjU/ClFoo76nuMqrNMq5mf8I+FADEGWFRiXJQpU3O0q AHmSVWRvQQeZ05gQx6nG9XbeS3oXQRqxnmBLOTdLNiaEUt6Hbp8xe7tD+SmjJ+BKek8J NSVw== 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=qc4aO2151DmzdrCIL9xWBIiLG2OE9Yo6GiCYTZFsc88=; b=Yd0IIqHh4MsgW0lWtvAUnm8wQl7I8PjL0RM6FT2rRbejrqHYKVZmbZh1keYlRaPk41 xPyUWqzkcOV3sN63vIlarGNb3YEU8rLVDfdEGBxnvFoKJ0COtl8INEs73L1HrUYettpv Z/rnXKCd4M7FEfGEAlyu60hB+EkN2l4fA8hByVL9Ij3xm2lqBRT0kXpD9lEe2yIJ6Mk2 BMua0R7TM3zGr6QGelmonxuDNxnxkd/iRBR4i6VjICluVLbydI70Nfy70+dGG2ZRYstC ARYqzrNZo70vE8krakIYC2Sy6maowQUk9eyMqLtCiQAHG/nY2qdDCm2DvFXwLOCKSRoW gi5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=yzGl0O2C; 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 qf25-20020a1709077f1900b0073317fc9d6fsi10419924ejc.917.2022.08.15.16.23.12; Mon, 15 Aug 2022 16:23:37 -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=yzGl0O2C; 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 S1349690AbiHOVln (ORCPT + 99 others); Mon, 15 Aug 2022 17:41:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348843AbiHOVhp (ORCPT ); Mon, 15 Aug 2022 17:37:45 -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 30719DF45; Mon, 15 Aug 2022 12:27:35 -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 C06DB6102C; Mon, 15 Aug 2022 19:27:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BC845C433C1; Mon, 15 Aug 2022 19:27:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660591654; bh=E+QZQsBXl0dqxOYJkYZFIb9f68aE3v6YlJF+X8cSSBw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=yzGl0O2ClLvz6xPFrvSvfazqVdNUic/NoJtTM6GdSKGgaWDRLNYwCo9wovyihQsHd gh8nlFn6Mm5o1FbTzm3k44IZw5bbmoE6Z0mDNuzM5aDbBxkdL2lMxh1PbF7JHsbveJ /wrss0uvUi2YVUblD0UDdoVdj2/n3DubuqMHfeO0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jonathan Cameron , Ricardo Ribalda , =?UTF-8?q?Nuno=20S=C3=A1?= , Sasha Levin Subject: [PATCH 5.18 0648/1095] iio: dac: ti-dac7612: Fix alignment for DMA safety Date: Mon, 15 Aug 2022 20:00:47 +0200 Message-Id: <20220815180456.204927850@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 b9ac08b3282a95fcefb057c2886028a6807725d8 ] ____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. Updated help text to 'may' require buffers to be in their own cacheline. Fixes: 977724d20584 ("iio:dac:ti-dac7612: Add driver for Texas Instruments DAC7612") Signed-off-by: Jonathan Cameron Cc: Ricardo Ribalda Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-65-jic23@kernel.org Signed-off-by: Sasha Levin --- drivers/iio/dac/ti-dac7612.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/dac/ti-dac7612.c b/drivers/iio/dac/ti-dac7612.c index 4c0f4b5e9ff4..8195815de26f 100644 --- a/drivers/iio/dac/ti-dac7612.c +++ b/drivers/iio/dac/ti-dac7612.c @@ -31,10 +31,10 @@ struct dac7612 { 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. */ - uint8_t data[2] ____cacheline_aligned; + uint8_t data[2] __aligned(IIO_DMA_MINALIGN); }; static int dac7612_cmd_single(struct dac7612 *priv, int channel, u16 val) -- 2.35.1