From: Robin Murphy <robin.murphy@arm.com>
To: Krishna Reddy <vdumpa@nvidia.com>,
"joro@8bytes.org" <joro@8bytes.org>,
"will@kernel.org" <will@kernel.org>
Cc: "jean-philippe@linaro.org" <jean-philippe@linaro.org>,
"zhang.lyra@gmail.com" <zhang.lyra@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"iommu@lists.linux-foundation.org"
<iommu@lists.linux-foundation.org>,
"thierry.reding@gmail.com" <thierry.reding@gmail.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"gerald.schaefer@linux.ibm.com" <gerald.schaefer@linux.ibm.com>
Subject: Re: [PATCH 02/13] iommu: Move bus setup to IOMMU device registration
Date: Fri, 22 Apr 2022 20:02:12 +0100 [thread overview]
Message-ID: <9da468bc-e6fd-1d7c-a6ce-69be87a7472a@arm.com> (raw)
In-Reply-To: <PH0PR12MB56475FAF4A2E7DB0AE1C1217B3F79@PH0PR12MB5647.namprd12.prod.outlook.com>
On 2022-04-22 19:37, Krishna Reddy wrote:
> Good effort to isolate bus config from smmu drivers.
> Reviewed-By: Krishna Reddy <vdumpa@nvidia.com>
Thanks!
> I have an orthogonal question here.
> Can the following code handle the case, where different buses have different type of SMMU instances(like one bus has SMMUv2 and another bus has SMMUv3)?
> If it need to handle the above case, can the smmu device bus be matched with specific bus here and ops set only for that bus?
Not yet, but that is one of the end goals that this is all working
towards. I think the stuff that I've added to the dev branch[1] today
should have reached the point where that becomes viable, but I'll need
to rig up a system to test it next week.
Intermediate solutions aren't worth it because in practice you
inevitably end up needing both IOMMU drivers to share the platform "bus"
anyway.
Cheers,
Robin.
[1] https://gitlab.arm.com/linux-arm/linux-rm/-/commits/iommu/bus
>
>
>> + for (int i = 0; i < ARRAY_SIZE(iommu_buses); i++) {
>> + struct bus_type *bus = iommu_buses[i];
>> + const struct iommu_ops *bus_ops = bus->iommu_ops;
>> + int err;
>> +
>> + WARN_ON(bus_ops && bus_ops != ops);
>> + bus->iommu_ops = ops;
>> + err = bus_iommu_probe(bus);
>> + if (err) {
>> + bus_for_each_dev(bus, NULL, iommu,
>> remove_iommu_group);
>> + bus->iommu_ops = bus_ops;
>> + return err;
>> + }
>> + }
>
>
> -KR
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
next prev parent reply other threads:[~2022-04-22 19:02 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20220414124252eucas1p1f2d8689ef5d281ea70d619888108d2fe@eucas1p1.samsung.com>
2022-04-14 12:42 ` [PATCH 00/13] iommu: Retire bus_set_iommu() Robin Murphy
2022-04-14 12:42 ` [PATCH 01/13] iommu: Always register bus notifiers Robin Murphy
2022-04-14 12:42 ` [PATCH 02/13] iommu: Move bus setup to IOMMU device registration Robin Murphy
2022-04-16 0:04 ` Lu Baolu
2022-04-18 22:09 ` Robin Murphy
2022-04-18 23:37 ` Lu Baolu
2022-04-19 7:20 ` Robin Murphy
2022-04-19 10:13 ` Lu Baolu
2022-04-23 8:01 ` Lu Baolu
2022-04-23 8:37 ` Robin Murphy
2022-04-23 8:51 ` Lu Baolu
2022-04-23 9:00 ` Lu Baolu
2022-04-23 9:41 ` Lu Baolu
2022-04-22 18:37 ` Krishna Reddy via iommu
2022-04-22 19:02 ` Robin Murphy [this message]
2022-04-14 12:42 ` [PATCH 03/13] iommu/amd: Clean up bus_set_iommu() Robin Murphy
2022-04-14 12:42 ` [PATCH 04/13] iommu/arm-smmu: " Robin Murphy
2022-04-19 14:40 ` Will Deacon
2022-04-20 16:05 ` Robin Murphy
2022-04-21 8:33 ` Will Deacon
2022-04-14 12:42 ` [PATCH 05/13] iommu/arm-smmu-v3: " Robin Murphy
2022-04-19 14:42 ` Will Deacon
2022-04-14 12:42 ` [PATCH 06/13] iommu/dart: " Robin Murphy
2022-04-15 14:28 ` Sven Peter via iommu
2022-04-14 12:42 ` [PATCH 07/13] iommu/exynos: " Robin Murphy
2022-04-14 12:42 ` [PATCH 08/13] iommu/ipmmu-vmsa: " Robin Murphy
2022-04-14 12:42 ` [PATCH 09/13] iommu/mtk: " Robin Murphy
2022-04-14 12:42 ` [PATCH 10/13] iommu/omap: " Robin Murphy
2022-04-14 12:42 ` [PATCH 11/13] iommu/tegra-smmu: " Robin Murphy
2022-04-14 12:42 ` [PATCH 12/13] iommu/virtio: " Robin Murphy
2022-04-21 17:12 ` Jean-Philippe Brucker
2022-04-21 19:44 ` Robin Murphy
2022-04-14 12:42 ` [PATCH 13/13] iommu: " Robin Murphy
2022-04-14 21:00 ` [PATCH 00/13] iommu: Retire bus_set_iommu() Marek Szyprowski
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=9da468bc-e6fd-1d7c-a6ce-69be87a7472a@arm.com \
--to=robin.murphy@arm.com \
--cc=gerald.schaefer@linux.ibm.com \
--cc=iommu@lists.linux-foundation.org \
--cc=jean-philippe@linaro.org \
--cc=joro@8bytes.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=thierry.reding@gmail.com \
--cc=vdumpa@nvidia.com \
--cc=will@kernel.org \
--cc=zhang.lyra@gmail.com \
/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