From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 6/9] iommu/arm-smmu: to support probe deferral
Date: Thu, 9 Jul 2015 12:27:20 +0100 [thread overview]
Message-ID: <20150709112243.GA20778@arm.com> (raw)
In-Reply-To: <559E5693.9060709@huawei.com>
On Thu, Jul 09, 2015 at 12:10:11PM +0100, leizhen wrote:
> On 2015/7/8 21:13, Robin Murphy wrote:
> > On 07/07/15 04:30, Zhen Lei wrote:
> >> For pci devices, only the root nodes have "iommus" property. So we
> >> should traverse all of its sub nodes in of_xlate.
> >
> > I don't really follow this description; only the host controller is
> > described in DT - the devices behind it are probed dynamically and don't
> > have nodes to traverse.
>
> The devices behind host controller may have nodes, but have no "iommus" property.
No, the PCI masters won't have nodes in the DT on arm/arm64 systems (it
makes hotplug difficult).
> I got this conclusion base on the original code as below:
>
> struct pci_bus *bus = pdev->bus;
>
> /* Walk up to the root bus */
> while (!pci_is_root_bus(bus))
> bus = bus->parent;
So this walks up the PCI topology, created by probing the bus, until we
get to the top-level bus...
> /* Follow the "iommus" phandle from the host controller */
> of_node = of_parse_phandle(bus->bridge->parent->of_node, "iommus", 0);
> if (!of_node)
> return NULL;
... then we find the host controller device, which *does* have a
device-tree node and use *that* to find out the IOMMU corresponding to
the PCI device.
Will
next prev parent reply other threads:[~2015-07-09 11:27 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-07 3:30 [PATCH v2 0/9] bugfixs and add support for non-pci devices Zhen Lei
2015-07-07 3:30 ` [PATCH v2 1/9] iommu/arm-smmu: fix the assignment of L1 table log2entries Zhen Lei
2015-07-07 3:30 ` [PATCH v2 2/9] iommu/arm-smmu: fix the index calculation of strtab Zhen Lei
2015-07-07 3:30 ` [PATCH v2 3/9] iommu/arm-smmu: fix the values of ARM64_TCR_IRGN0_SHIFT and ARM64_TCR_ORGN0_SHIFT Zhen Lei
2015-07-07 3:30 ` [PATCH v2 4/9] iommu/arm-smmu: enlarge STRTAB_L1_SZ_SHIFT to support larger sidsize Zhen Lei
2015-07-07 3:30 ` [PATCH v2 5/9] iommu/arm-smmu: skip the execution of CMD_PREFETCH_CONFIG Zhen Lei
2015-07-08 13:03 ` Robin Murphy
2015-07-08 17:11 ` Will Deacon
2015-07-09 1:30 ` leizhen
2015-07-07 3:30 ` [PATCH v2 6/9] iommu/arm-smmu: to support probe deferral Zhen Lei
2015-07-08 13:13 ` Robin Murphy
2015-07-09 11:10 ` leizhen
2015-07-09 11:27 ` Will Deacon [this message]
2015-07-07 3:30 ` [PATCH v2 7/9] iommu/arm-smmu: remove arm_smmu_devices Zhen Lei
2015-07-08 13:13 ` Robin Murphy
2015-07-09 2:43 ` leizhen
2015-07-07 3:30 ` [PATCH v2 8/9] iommu/arm-smmu: rename __arm_smmu_get_pci_sid Zhen Lei
2015-07-07 3:30 ` [PATCH v2 9/9] iommu/arm-smmu: add support for non-pci devices Zhen Lei
2015-07-08 13:22 ` Robin Murphy
2015-07-09 1:56 ` leizhen
2015-07-09 12:01 ` Robin Murphy
2015-07-10 0:34 ` leizhen
2015-07-07 9:22 ` [PATCH v2 0/9] bugfixs and " Will Deacon
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=20150709112243.GA20778@arm.com \
--to=will.deacon@arm.com \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).