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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 59891C30658 for ; Tue, 2 Jul 2024 18:46:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=xLnqO8gThdF4eWWJMW0FGZvv1A4dIiHXbMDVsQVoOo4=; b=06Kr1+Mg40Mh1urd05wagqkYON NgVsdE+kwBTwjpzQwe0oItBEl72CBbxSqfVOZF28UkPs/Bpz4F8s5WkjvCAcrh0hAp3fMqDEvCiGY RagJsHgceGTq5DW2VXjXp7wosbQZ4HZqbQn1XjpbuvrcTngIvwic+R4vVJVsvik4NUrmKJaH8otDR 78KupaSPlYh03tMaRGXw6XE/o+vktBgDReYmyzBR6uLMz8iQKYW5UTHSNsGC/Ca9xT8gX9GCUJ976 uge1AEW/uMlXtV899uM3DmKwKDFarzzbwGetABwshFn0F6D55V9VKcakN2N3/aqlLdeLRjfaLDSxA qSK+HZNQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOiWT-00000007fi1-3FFm; Tue, 02 Jul 2024 18:46:37 +0000 Received: from sin.source.kernel.org ([145.40.73.55]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sOiWG-00000007fdj-1SOB for linux-arm-kernel@lists.infradead.org; Tue, 02 Jul 2024 18:46:26 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sin.source.kernel.org (Postfix) with ESMTP id BBA9FCE01BC; Tue, 2 Jul 2024 18:46:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3A519C116B1; Tue, 2 Jul 2024 18:46:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1719945982; bh=RpD6ZPn6psYDerzh/SZr6lJyji3dy9debma6JB0B/CM=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=P8HD7801Q11KzevNRpwxUdAid4HNF6dnBsY/KQXVHfJtzZwxGhoMTsYrz0Z2Clm1J t64As/tnMknmm8q4SC0lrDgG8fWSm8M2mUGrEu5psUUxYPxbTGPboabKqP9+u9KKtz YgMOjl2oFRHvlVVEvq0PSF1ng5jT/i/rFssYElmdeIktGw/mPqlLGcMCtaJtL0Fb1u 6g6AipSrmI3SKK0/UhpJ0/z6wPSccBiwn1IaEfAVR9Ios/NLBRmm9p0UnjS2sFpnJ3 xnEgZfWSHbbbLrsf7Ji/JMEAfTVZjE5+5xUdGbLGxZLeAXQ+cNrDOX0npRmpIjxOFU w56f5vmTQTB9A== Date: Tue, 2 Jul 2024 19:46:16 +0100 From: Will Deacon To: Jason Gunthorpe Cc: iommu@lists.linux.dev, Joerg Roedel , linux-arm-kernel@lists.infradead.org, Robin Murphy , Michael Shavit , Nicolin Chen , patches@lists.linux.dev, Ryan Roberts , Mostafa Saleh Subject: Re: [PATCH v2 05/10] iommu/arm-smmu-v3: Reorganize struct arm_smmu_strtab_cfg Message-ID: <20240702184616.GC5167@willie-the-truck> References: <0-v2-318ed5f6983b+198f-smmuv3_tidy_jgg@nvidia.com> <5-v2-318ed5f6983b+198f-smmuv3_tidy_jgg@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5-v2-318ed5f6983b+198f-smmuv3_tidy_jgg@nvidia.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240702_114624_620410_93B91223 X-CRM114-Status: GOOD ( 17.33 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Jun 10, 2024 at 09:31:14PM -0300, Jason Gunthorpe wrote: > The members here are being used for both the linear and the 2 level case, > with the meaning of each item slightly different in the two cases. > > Split it into a clean union where both cases have their own struct with > their own logical names and correct types. > > Adjust all the users to detect linear/2lvl and use the right sub structure > and types consistently. > > Remove STRTAB_STE_DWORDS by changing the last places to use > sizeof(struct arm_smmu_ste). > > Signed-off-by: Jason Gunthorpe > --- > drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 79 ++++++++++----------- > drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h | 26 +++---- > 2 files changed, 51 insertions(+), 54 deletions(-) [...] > diff --git a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h > index 1418f21f5db6a0..8b58a30ebeb06b 100644 > --- a/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h > +++ b/drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h > @@ -204,10 +204,8 @@ > #define STRTAB_L1_DESC_SPAN GENMASK_ULL(4, 0) > #define STRTAB_L1_DESC_L2PTR_MASK GENMASK_ULL(51, 6) > > -#define STRTAB_STE_DWORDS 8 > - > struct arm_smmu_ste { > - __le64 data[STRTAB_STE_DWORDS]; > + __le64 data[8]; > }; I'm not seeing the improvement here. Will