From: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: "linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>,
"iommu@lists.linux-foundation.org"
<iommu@lists.linux-foundation.org>,
Linuxarm <linuxarm@huawei.com>,
"lorenzo.pieralisi@arm.com" <lorenzo.pieralisi@arm.com>,
"joro@8bytes.org" <joro@8bytes.org>,
"robin.murphy@arm.com" <robin.murphy@arm.com>,
"will@kernel.org" <will@kernel.org>,
wanghuiqiang <wanghuiqiang@huawei.com>,
"Guohanjun (Hanjun Guo)" <guohanjun@huawei.com>,
"steven.price@arm.com" <steven.price@arm.com>,
"Sami.Mujawar@arm.com" <Sami.Mujawar@arm.com>,
"jon@solid-run.com" <jon@solid-run.com>,
"eric.auger@redhat.com" <eric.auger@redhat.com>,
"laurentiu.tudor@nxp.com" <laurentiu.tudor@nxp.com>
Subject: RE: [PATCH v10 4/9] ACPI/IORT: Add support to retrieve IORT RMR reserved regions
Date: Thu, 21 Apr 2022 14:50:03 +0000 [thread overview]
Message-ID: <54f289c1cfc5401a978a29dc6ff2cea7@huawei.com> (raw)
In-Reply-To: <YmD+Puk4xfPpwED9@infradead.org>
> -----Original Message-----
> From: Christoph Hellwig [mailto:hch@infradead.org]
> Sent: 21 April 2022 07:49
> To: Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>
> Cc: linux-arm-kernel@lists.infradead.org; linux-acpi@vger.kernel.org;
> iommu@lists.linux-foundation.org; Linuxarm <linuxarm@huawei.com>;
> lorenzo.pieralisi@arm.com; joro@8bytes.org; robin.murphy@arm.com;
> will@kernel.org; wanghuiqiang <wanghuiqiang@huawei.com>; Guohanjun
> (Hanjun Guo) <guohanjun@huawei.com>; steven.price@arm.com;
> Sami.Mujawar@arm.com; jon@solid-run.com; eric.auger@redhat.com;
> laurentiu.tudor@nxp.com; hch@infradead.org
> Subject: Re: [PATCH v10 4/9] ACPI/IORT: Add support to retrieve IORT RMR
> reserved regions
>
[...]
> > void generic_iommu_put_resv_regions(struct device *dev, struct list_head
> *list)
> > {
> > struct iommu_resv_region *entry, *next;
> >
> > - list_for_each_entry_safe(entry, next, list, list)
> > + list_for_each_entry_safe(entry, next, list, list) {
> > + if (entry->resv_region_free_fw_data)
> > + entry->resv_region_free_fw_data(dev, entry);
> > kfree(entry);
>
> I'd move the kfree to the free callback if present. This would also
> allow to hide the union from the common code entirely and use a
> container structure like:
>
> struct iommu_iort_rmr_data {
> struct iommu_resv_region rr;
>
> /* Stream IDs associated with IORT RMR entry */
> const u32 *sids;
> u32 num_sids;
> };
Ok. I will respin soon with the above changes.
Thanks,
Shameer
next prev parent reply other threads:[~2022-04-21 14:51 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-20 16:48 [PATCH v10 0/9] ACPI/IORT: Support for IORT RMR node Shameer Kolothum
2022-04-20 16:48 ` [PATCH v10 1/9] iommu: Introduce a union to struct iommu_resv_region Shameer Kolothum
2022-04-21 6:46 ` Christoph Hellwig
2022-04-20 16:48 ` [PATCH v10 2/9] ACPI/IORT: Make iort_iommu_msi_get_resv_regions() return void Shameer Kolothum
2022-04-21 6:44 ` Christoph Hellwig
2022-04-20 16:48 ` [PATCH v10 3/9] ACPI/IORT: Provide a generic helper to retrieve reserve regions Shameer Kolothum
2022-04-21 6:44 ` Christoph Hellwig
2022-04-20 16:48 ` [PATCH v10 4/9] ACPI/IORT: Add support to retrieve IORT RMR reserved regions Shameer Kolothum
2022-04-21 6:48 ` Christoph Hellwig
2022-04-21 14:50 ` Shameerali Kolothum Thodi [this message]
2022-04-20 16:48 ` [PATCH v10 5/9] ACPI/IORT: Add a helper to retrieve RMR info directly Shameer Kolothum
2022-04-20 16:48 ` [PATCH v10 6/9] iommu/arm-smmu-v3: Introduce strtab init helper Shameer Kolothum
2022-04-20 16:48 ` [PATCH v10 7/9] iommu/arm-smmu-v3: Refactor arm_smmu_init_bypass_stes() to force bypass Shameer Kolothum
2022-04-20 16:48 ` [PATCH v10 8/9] iommu/arm-smmu-v3: Get associated RMR info and install bypass STE Shameer Kolothum
2022-04-20 16:48 ` [PATCH v10 9/9] iommu/arm-smmu: Get associated RMR info and install bypass SMR Shameer Kolothum
2022-04-21 12:58 ` [PATCH v10 0/9] ACPI/IORT: Support for IORT RMR node Steven Price
2022-04-21 14:43 ` Shameerali Kolothum Thodi
2022-04-21 15:45 ` Robin Murphy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54f289c1cfc5401a978a29dc6ff2cea7@huawei.com \
--to=shameerali.kolothum.thodi@huawei.com \
--cc=Sami.Mujawar@arm.com \
--cc=eric.auger@redhat.com \
--cc=guohanjun@huawei.com \
--cc=hch@infradead.org \
--cc=iommu@lists.linux-foundation.org \
--cc=jon@solid-run.com \
--cc=joro@8bytes.org \
--cc=laurentiu.tudor@nxp.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linuxarm@huawei.com \
--cc=lorenzo.pieralisi@arm.com \
--cc=robin.murphy@arm.com \
--cc=steven.price@arm.com \
--cc=wanghuiqiang@huawei.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox