From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7CB7CC00140 for ; Mon, 8 Aug 2022 14:14:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243257AbiHHOOi (ORCPT ); Mon, 8 Aug 2022 10:14:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231898AbiHHOO3 (ORCPT ); Mon, 8 Aug 2022 10:14:29 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81A64FD0A for ; Mon, 8 Aug 2022 07:14:28 -0700 (PDT) Received: from fraeml712-chm.china.huawei.com (unknown [172.18.147.201]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4M1dVn2Wkbz682vm; Mon, 8 Aug 2022 22:14:25 +0800 (CST) Received: from lhrpeml500005.china.huawei.com (7.191.163.240) by fraeml712-chm.china.huawei.com (10.206.15.61) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Mon, 8 Aug 2022 16:14:26 +0200 Received: from localhost (10.122.247.231) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Mon, 8 Aug 2022 15:14:25 +0100 Date: Mon, 8 Aug 2022 15:14:24 +0100 From: Jonathan Cameron To: Andy Shevchenko CC: Jonathan Cameron , linux-iio , Nuno =?ISO-8859-1?Q?S=E1?= Subject: Re: [PATCH 1/4] staging: iio: frequency: ad9832: Fix alignment for DMA safety Message-ID: <20220808151424.000070dc@huawei.com> In-Reply-To: References: <20220807151218.656881-1-jic23@kernel.org> <20220807151218.656881-2-jic23@kernel.org> Organization: Huawei Technologies R&D (UK) Ltd. X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.29; x86_64-w64-mingw32) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.122.247.231] X-ClientProxiedBy: lhrpeml500001.china.huawei.com (7.191.163.213) To lhrpeml500005.china.huawei.com (7.191.163.240) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org On Mon, 8 Aug 2022 11:18:34 +0200 Andy Shevchenko wrote: > On Sun, Aug 7, 2022 at 5:26 PM Jonathan Cameron wrote: > > > > From: Jonathan Cameron > > > > ____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. > > ... > > > union { > > - __be16 freq_data[4]____cacheline_aligned; > > + __be16 freq_data[4] __aligned(IIO_DMA_MINALIGN); > > __be16 phase_data[2]; > > __be16 data; > > }; > > Hmm... Can we rather mark the entire union with it? > ah. I'd not even registered it was a union ;) Anyhow, yes, that would make sense.