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 66138C433F5 for ; Tue, 22 Mar 2022 18:28:48 +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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=mewrQhS1CLfkXBLD7WTpU0vx8SDhmzXIcF8w5+9f4Jg=; b=PqsYxwfxncQuWr TctO3LgFWQh6eXixRRFomiwZbWPUwcA9N9oY0y6uoKG5K4Ok5+VJyaTVHwir4iuBRHzBEPtETwa65 EJiGNAt+oRYzCJKJfS6GEfljdLVMZWzgNCVdpeBRw4GLWvJwhE2GADI1+kxD3ogbzKVG5Pa/KArrs QOGbz1ZrjVUej3TW8SkcY3oCltZfYTVDz4rj2QAGBzS/YAeLJhf2vdLPeofszq+4/OyGcgYmq14bx gX+BJOjbbc0iKmQZWuGZZIGv2xoU/hhMAh+vS9FQ8WINa60dULzY758VU122Lmx6IzJW1PD/tL8kp M8YrXkGyF+wYx7RwqCXA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nWjEI-00BrXt-9f; Tue, 22 Mar 2022 18:27:38 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nWjEF-00BrXA-AB for linux-arm-kernel@lists.infradead.org; Tue, 22 Mar 2022 18:27:36 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id EC250152B; Tue, 22 Mar 2022 11:27:33 -0700 (PDT) Received: from [10.57.43.230] (unknown [10.57.43.230]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 332BA3F66F; Tue, 22 Mar 2022 11:27:31 -0700 (PDT) Message-ID: <5cf2c21b-6974-b2f9-140d-382985cf3095@arm.com> Date: Tue, 22 Mar 2022 18:27:26 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH v8 02/11] iommu: Introduce a union to struct iommu_resv_region Content-Language: en-GB To: Shameer Kolothum , linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org, iommu@lists.linux-foundation.org Cc: linuxarm@huawei.com, lorenzo.pieralisi@arm.com, joro@8bytes.org, will@kernel.org, wanghuiqiang@huawei.com, guohanjun@huawei.com, steven.price@arm.com, Sami.Mujawar@arm.com, jon@solid-run.com, eric.auger@redhat.com, yangyicong@huawei.com References: <20220221154344.2126-1-shameerali.kolothum.thodi@huawei.com> <20220221154344.2126-3-shameerali.kolothum.thodi@huawei.com> From: Robin Murphy In-Reply-To: <20220221154344.2126-3-shameerali.kolothum.thodi@huawei.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220322_112735_445041_6915519C X-CRM114-Status: GOOD ( 15.53 ) 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 > + 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