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 66209C433F5 for ; Wed, 23 Mar 2022 15:57:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To:References: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=aQdnw237h0DFqiiTkK21ADihxC6/Q6h+xFeDxhyiawA=; b=hS5vOkAb7Oq+Oy bAcIGkyXNcRXnWb6/BvqD9xDh5KeMcZgCiftOzBIciP014eaTKFhD0XdN+kUwfvLrhI7/CgP0h9md FIcM0uvsEp9qY+MhPFvgwdtcyo/LYsZ/D726dm6zwG08aNrOAasYnQpJU9f2LOipYrmLv4mHQPjEU Ymna0zMWM8t9SeB0WCl6lZ9I2lcIpqzQH3K8GyRwn/iPYF6Eg/lcMnx/B+YivJrCJWs8zLhqSVNxD np+nfWrh27qhxR5gEuxdnqXjREbqxlF07c+Hq1Vcz1FXTmOEgpTu6G7THub2HhboJnHR8amUvKly6 2Iv+KnVzoAbFXGuLWBrQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nX3L0-00EAyl-QW; Wed, 23 Mar 2022 15:55:54 +0000 Received: from szxga02-in.huawei.com ([45.249.212.188]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nX3Kx-00EAyB-1J for linux-arm-kernel@lists.infradead.org; Wed, 23 Mar 2022 15:55:53 +0000 Received: from dggpemm500022.china.huawei.com (unknown [172.30.72.54]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4KNtDw4bpYzCr6Q; Wed, 23 Mar 2022 23:53:36 +0800 (CST) Received: from dggpemm100002.china.huawei.com (7.185.36.179) by dggpemm500022.china.huawei.com (7.185.36.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Wed, 23 Mar 2022 23:55:43 +0800 Received: from lhreml710-chm.china.huawei.com (10.201.108.61) by dggpemm100002.china.huawei.com (7.185.36.179) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Wed, 23 Mar 2022 23:55:42 +0800 Received: from lhreml710-chm.china.huawei.com ([169.254.81.184]) by lhreml710-chm.china.huawei.com ([169.254.81.184]) with mapi id 15.01.2308.021; Wed, 23 Mar 2022 15:55:40 +0000 From: Shameerali Kolothum Thodi To: Robin Murphy , "linux-arm-kernel@lists.infradead.org" , "linux-acpi@vger.kernel.org" , "iommu@lists.linux-foundation.org" CC: Linuxarm , "lorenzo.pieralisi@arm.com" , "joro@8bytes.org" , "will@kernel.org" , wanghuiqiang , "Guohanjun (Hanjun Guo)" , "steven.price@arm.com" , "Sami.Mujawar@arm.com" , "jon@solid-run.com" , "eric.auger@redhat.com" , yangyicong Subject: RE: [PATCH v8 02/11] iommu: Introduce a union to struct iommu_resv_region Thread-Topic: [PATCH v8 02/11] iommu: Introduce a union to struct iommu_resv_region Thread-Index: AQHYJzn4JzDYsNDAv0udQS6OoRGEcqzL5oEAgAFnZ1A= Date: Wed, 23 Mar 2022 15:55:40 +0000 Message-ID: <07bb59d690e84edfa62d7c844612b526@huawei.com> References: <20220221154344.2126-1-shameerali.kolothum.thodi@huawei.com> <20220221154344.2126-3-shameerali.kolothum.thodi@huawei.com> <5cf2c21b-6974-b2f9-140d-382985cf3095@arm.com> In-Reply-To: <5cf2c21b-6974-b2f9-140d-382985cf3095@arm.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.202.227.178] MIME-Version: 1.0 X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220323_085551_528556_2D1125BD X-CRM114-Status: GOOD ( 20.44 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org > -----Original Message----- > From: Robin Murphy [mailto:robin.murphy@arm.com] > Sent: 22 March 2022 18:27 > To: Shameerali Kolothum Thodi ; > linux-arm-kernel@lists.infradead.org; linux-acpi@vger.kernel.org; > iommu@lists.linux-foundation.org > Cc: Linuxarm ; lorenzo.pieralisi@arm.com; > joro@8bytes.org; will@kernel.org; wanghuiqiang > ; Guohanjun (Hanjun Guo) > ; steven.price@arm.com; Sami.Mujawar@arm.com; > jon@solid-run.com; eric.auger@redhat.com; yangyicong > > Subject: Re: [PATCH v8 02/11] iommu: Introduce a union to struct > iommu_resv_region > > On 2022-02-21 15:43, Shameer Kolothum wrote: > > A union is introduced to struct iommu_resv_region to hold > > any firmware specific data. This is in preparation to add > > support for IORT RMR reserve regions and the union now holds > > the RMR specific information. > > > > Signed-off-by: Shameer Kolothum > > > --- > > include/linux/iommu.h | 9 +++++++++ > > 1 file changed, 9 insertions(+) > > > > diff --git a/include/linux/iommu.h b/include/linux/iommu.h > > index de0c57a567c8..b06952a75f95 100644 > > --- a/include/linux/iommu.h > > +++ b/include/linux/iommu.h > > @@ -126,6 +126,11 @@ enum iommu_resv_type { > > IOMMU_RESV_SW_MSI, > > }; > > > > +struct iommu_iort_rmr_data { > > + u32 *sids; /* Stream Ids associated with IORT RMR entry */ > > Please make this const. > > Further nit: capitalisation of "IDs" in the comment, otherwise I might > worry about the possibility of Stream Egos too :P True :). Will do that. Thanks, Shameer > > > + u32 num_sids; > > +}; > > + > > /** > > * struct iommu_resv_region - descriptor for a reserved memory region > > * @list: Linked list pointers > > @@ -133,6 +138,7 @@ enum iommu_resv_type { > > * @length: Length of the region in bytes > > * @prot: IOMMU Protection flags (READ/WRITE/...) > > * @type: Type of the reserved region > > + * @fw_data: FW specific reserved region data > > Nit: we've got plenty of room to spell out "Firmware-specific", and it > never hurts to make documentation as easy to read as possible. > > Thanks, > Robin. > > > */ > > struct iommu_resv_region { > > struct list_head list; > > @@ -140,6 +146,9 @@ struct iommu_resv_region { > > size_t length; > > int prot; > > enum iommu_resv_type type; > > + union { > > + struct iommu_iort_rmr_data rmr; > > + } fw_data; > > }; > > > > /** _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel