[PATCH v2 6/6] pci/hotplug/pnv_php: Enable third attention indicator
Lukas Wunner
lukas at wunner.de
Wed Jun 25 18:08:02 AEST 2025
On Wed, Jun 25, 2025 at 09:38:19AM +0530, Krishna Kumar wrote:
> On 6/21/25 3:29 PM, Lukas Wunner wrote:
> > On Fri, Jun 20, 2025 at 02:56:51PM +0530, Krishna Kumar wrote:
> > > 5. If point 3 and 4 does not solve the problem, then only we should
> > > move to pciehp.c. But AFAIK, PPC/Powernv is DT based while pciehp.c
> > > may be only supporting acpi (I have to check it on this). We need to
> > > provide PHB related information via DTB and maintain the related
> > > topology information via dtb and then it can be doable.
> >
> > pciehp is not ACPI-specific. The PCIe port service driver in
> > drivers/pci/pcie/portdrv.c binds to any PCIe port, examines the
> > port's capabilities (e.g. hotplug, AER, DPC, ...) and instantiates
> > sub-devices to which pciehp and the other drivers such as aer bind.
>
> 1. If we get PHB info from mmcfg via acpi table in x86 and create a
> root port from there with some address/entity and if this Acpi and
> associated entity is not present for PPC, then it can be a problem.
>
> 2. PPC is normally based on DTB entity and it identifies PHB and pcie
> devices from there. If this all the information is correctly map
> via portdrv.c then there is no problem and whatever you are telling
> is correct and it will work.
>
> 3. But if point 2 is not handled correctly we need to just aligned with
> port related data structure to make it work.
PCI devices do not have to be enumerated in the devicetree (or in ACPI
DSDT) because PCI is an enumerable bus (like USB). Only the host bridge
has to be enumerated in the devicetree or DSDT. The kernel can find the
PCI devices below the host bridge itself. Hot-plugged devices are
usually not described in the devicetree or DSDT because one doesn't
know their properties in advance.
pnv_php.c seems to search the devicetree for hotplug slots and
instantiates them. My expectation would be that any hotplug-capable
PCIe Root Port or Downstream Port, which is *not* described in the
devicetree such that pnv_php.c creates a slot for it, is handled by
pciehp.
Timothy was talking about a Microsemi PCIe switch below the Root Port.
My understanding is that the Downstream Ports of that switch are
hotplug-capable. So unless you've disabled CONFIG_HOTPLUG_PCI_PCIE,
I'd expect those ports to be handled by pciehp. Assuming they're not
described as a "ibm,ioda2-phb" compatible device in the devicetree,
but why would they?
Thanks,
Lukas
More information about the Linuxppc-dev
mailing list