From: Bjorn Helgaas <helgaas@kernel.org>
To: Herve Codina <herve.codina@bootlin.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Rob Herring <robh@kernel.org>,
Saravana Kannan <saravanak@google.com>,
Bjorn Helgaas <bhelgaas@google.com>,
Lizhi Hou <lizhi.hou@amd.com>,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
linux-pci@vger.kernel.org,
Allan Nielsen <allan.nielsen@microchip.com>,
Horatiu Vultur <horatiu.vultur@microchip.com>,
Steen Hegelund <steen.hegelund@microchip.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Subject: Re: [PATCH 6/6] PCI: of: Create device-tree root bus node
Date: Wed, 6 Nov 2024 10:47:55 -0600 [thread overview]
Message-ID: <20241106164755.GA1528530@bhelgaas> (raw)
In-Reply-To: <20241106155353.4ffd3825@bootlin.com>
On Wed, Nov 06, 2024 at 03:53:53PM +0100, Herve Codina wrote:
> On Tue, 5 Nov 2024 12:59:01 -0600
> Bjorn Helgaas <helgaas@kernel.org> wrote:
> > On Mon, Nov 04, 2024 at 06:20:00PM +0100, Herve Codina wrote:
> > > PCI devices device-tree nodes can be already created. This was
> > > introduced by commit 407d1a51921e ("PCI: Create device tree node for
> > > bridge").
> ...
> > > Indeed, this component is not described
> > > in a device-tree used at boot.
> >
> > But maybe I'm on the wrong track, because obviously PCI host
> > controllers *are* described in DTs used at boot.
>
> They are described in a device-tree used at boot on device-tree based
> systems.
> On x86, we are on ACPI based system -> No DT used at boot -> PCI host
> controller not described in DT.
Right, I was thinking of the devicetree-based systems, where the host
controller must be described in DT.
> > > + name = kasprintf(GFP_KERNEL, "pci-root@%x,%x", pci_domain_nr(bus),
> > > + bus->number);
> >
> > Should this be "pci%d@%x,%x" to match the typical descriptions of PCI
> > host bridges in DT?
>
> What do you think I should use for the %d you proposed.
Based on the .dts files, I think the %d is just an index to
distinguish multiple PCI host bridges. Maybe that's not relevant
here, I dunno.
> Also I supposed your "@%x,%x" is still pci_domain_nr(bus), bus->number.
Yes. I think we're basically constructing a DT node to correspond to
an ACPI PNP0A03 device. ACPI does support updating the root bus
number via _CRS/_PRS/_SRS, but Linux doesn't have support for that, so
the root bus number is basically constant. The pci_domain_nr(bus)
should be coming from _SEG, and that's definitely constant.
Bjorn
next prev parent reply other threads:[~2024-11-06 16:47 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-04 17:19 [PATCH 0/6] Add support for the root PCI bus device-tree node creation Herve Codina
2024-11-04 17:19 ` [PATCH 1/6] driver core: Introduce device_{add,remove}_of_node() Herve Codina
2024-11-04 17:19 ` [PATCH 2/6] PCI: of: Use device_{add,remove}_of_node() to attach of_node to existing device Herve Codina
2024-11-04 20:20 ` Rob Herring
2024-11-05 16:16 ` Herve Codina
2024-11-04 17:19 ` [PATCH 3/6] PCI: of_property: Add support for NULL pdev in of_pci_set_address() Herve Codina
2024-11-04 17:19 ` [PATCH 4/6] PCI: of_property: Constify parameter in of_pci_get_addr_flags() Herve Codina
2024-11-04 17:19 ` [PATCH 5/6] of: Use the standards compliant default address cells value for x86 Herve Codina
2024-11-04 20:07 ` Rob Herring
2024-11-05 16:35 ` Herve Codina
2024-11-04 17:20 ` [PATCH 6/6] PCI: of: Create device-tree root bus node Herve Codina
2024-11-05 18:59 ` Bjorn Helgaas
2024-11-06 14:53 ` Herve Codina
2024-11-06 16:47 ` Bjorn Helgaas [this message]
2024-11-04 20:15 ` [PATCH 0/6] Add support for the root PCI bus device-tree node creation Rob Herring
2024-11-05 17:44 ` Herve Codina
2024-11-05 19:59 ` Rob Herring
2024-11-06 13:33 ` Herve Codina
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=20241106164755.GA1528530@bhelgaas \
--to=helgaas@kernel.org \
--cc=allan.nielsen@microchip.com \
--cc=bhelgaas@google.com \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=herve.codina@bootlin.com \
--cc=horatiu.vultur@microchip.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lizhi.hou@amd.com \
--cc=rafael@kernel.org \
--cc=robh@kernel.org \
--cc=saravanak@google.com \
--cc=steen.hegelund@microchip.com \
--cc=thomas.petazzoni@bootlin.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.