Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3027647rwb; Mon, 15 Aug 2022 16:26:01 -0700 (PDT) X-Google-Smtp-Source: AA6agR7Ak2kJdYvkQl3ZHzrJSDfqf+cqa3/xp7+jm/pFNmLHPMqH5fqthsPyvHvGYiEEO4y/L0Rv X-Received: by 2002:a17:907:72cb:b0:732:fcbd:1b29 with SMTP id du11-20020a17090772cb00b00732fcbd1b29mr11344799ejc.242.1660605961181; Mon, 15 Aug 2022 16:26:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605961; cv=none; d=google.com; s=arc-20160816; b=azmfAnfqpnBhHANzqCLwjMr8xYKUUJcjuPpkSIXMgj8WBId2ZLab19hMDP96rShMxz Avu2+pGAZdNvnI4vfLBWDlPyQJQ5n+1nNw7oCDWNw7iNI9/yTnknxLKz8OKSmIY3gYoq tnNjdtHvVUQ+Kz4lG0lBIyjz7PBfDUI+hH/+05W8lN8e3gunzoVCB1bVo7rY5cWLQlnC e6cEp76b3gQp60GEHh/8xhjk3WP5UBA0KjB2z3rOaOqRoBiBP5wojJbeBjyC9yhAV2it rgh2zxF0NyRWV5u383sx94Aip9rsScXR9wtmGS44bYyHeRfJePWmkMM5+wpa6Z4vdekt oVhg== 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=/Se+gtRDJysf+u66Jca4uzT9Kp7dVG1Ab7QQ9zFtsXM=; b=M7OJJmRJhmqdmBXqnpIYMqBzuuhXo3HqXQwF4SGrKGP/V2fBr/WIRD+xggZpJ4r+xm 0pj0E7tWa56Xe+SjD6v2ty2nzECm6pXMY9FMyd3kKUbJIeudT+JUJaYb/3o1V5/kaRxB bpcCX4ji6RGxb+3a/1iva5yUXLX8oJO5unp5b5YZzdZqU32ajBhctThmHvqjkT3exid9 ALQzGonD0h5OAd7v6h1dfQGxJ2t/+4BFEbH4yPPhQpipCq8/yNaDa5pUwvUV6x5av4ka s2MTbrbcOkK6Gygf/WSRUO/erfvS5Cu3lf42Iab4Df2O9BcHn/2l/5kX72EgkCe2/bpm 9RuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PW5aBbZ5; 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 y15-20020a056402270f00b004405538725asi9767481edd.242.2022.08.15.16.25.36; Mon, 15 Aug 2022 16:26:01 -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=PW5aBbZ5; 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 S1348687AbiHOVhC (ORCPT + 99 others); Mon, 15 Aug 2022 17:37:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233940AbiHOVfb (ORCPT ); Mon, 15 Aug 2022 17:35:31 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7EB2A5FF5C; Mon, 15 Aug 2022 12:24:57 -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 B7959610A3; Mon, 15 Aug 2022 19:24:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BFF97C433D6; Mon, 15 Aug 2022 19:24:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660591496; bh=t39TPq0Qi6nLwofCxmJh29LPIR/lAo6j3QHCbsl6r3Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PW5aBbZ5rURUhFjOAKBA0D7v3rGeDndoVfzTU7WCKNNYGhM0WST0GCoftOFBnbbmD I8QB6jM/fYaRL4nH9O6IARPtnIe5erdGLJ3oxUNu/LtNa13wQWR3AVxCo4zxLha5y9 +UmNQYtolZIIvQq1Al61eYRzCgPMni6mdyU/BND0= 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 0598/1095] iio: adc: ad7606: Fix alignment for DMA safety Date: Mon, 15 Aug 2022 19:59:57 +0200 Message-Id: <20220815180454.284961537@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 6268c6eebb13f228d418f9adaca848b3ed5b3cf9 ] ____cacheline_aligned is an insufficient guarantee for non-coherent DMA on platforms with 128 byte cachelines above L1. Switch to the updated IIO_ALIGN definition. Update the comment to reflect the fact DMA safety 'may' require separate cachelines. Fixes: 7989b4bb23fe ("iio: adc: ad7616: Add support for AD7616 ADC") Signed-off-by: Jonathan Cameron Acked-by: Nuno Sá Link: https://lore.kernel.org/r/20220508175712.647246-15-jic23@kernel.org Signed-off-by: Sasha Levin --- drivers/iio/adc/ad7606.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/adc/ad7606.h b/drivers/iio/adc/ad7606.h index 4f82d7c9acfd..2dc4f599f9df 100644 --- a/drivers/iio/adc/ad7606.h +++ b/drivers/iio/adc/ad7606.h @@ -116,11 +116,11 @@ struct ad7606_state { struct completion completion; /* - * DMA (thus cache coherency maintenance) requires the + * DMA (thus cache coherency maintenance) may require the * transfer buffers to live in their own cache lines. * 16 * 16-bit samples + 64-bit timestamp */ - unsigned short data[20] ____cacheline_aligned; + unsigned short data[20] __aligned(IIO_DMA_MINALIGN); __be16 d16[2]; }; -- 2.35.1