Re: [PATCH v2 0/5] PCI: Clean up and fix is_hotplug_bridge usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[-> to: Rafael for possible ack]

On Fri, Jul 25, 2025 at 10:19:02AM +0200, Lukas Wunner wrote:
> On Tue, Jul 22, 2025 at 05:35:22PM -0500, Bjorn Helgaas wrote:
> > On Sun, Jul 13, 2025 at 04:31:00PM +0200, Lukas Wunner wrote:
> > >   PCI/ACPI: Fix runtime PM ref imbalance on Hot-Plug Capable ports
> > >   PCI/portdrv: Use is_pciehp instead of is_hotplug_bridge
> > >   PCI: pciehp: Use is_pciehp instead of is_hotplug_bridge
> > >   PCI: Move is_pciehp check out of pciehp_is_native()
> > >   PCI: Set native_pcie_hotplug up front based on pcie_ports_native
> > 
> > Thanks!  I applied these to pci/hotplug, hoping to put them in v6.17.
> > 
> > I moved the previous pci/hotplug branch to pci/hotplug-pnv_php.
> 
> Just a heads-up in case it's unintentional, pci/next as of 10 hours ago
> does not include the following pci.git branches:
> 
> - hotplug

Thanks for the reminder, I did miss it.  Rafael, would be glad for
your ack on this one if you have time:

  PCI/ACPI: Fix runtime PM ref imbalance on Hot-Plug Capable ports

Re this one:

  PCI: Set native_pcie_hotplug up front based on pcie_ports_native

I do see your concern about leaking pcie_ports_native into ACPI code.
Currently all uses are in drivers/pci/, so it would be nice to move
the declaration to drivers/pci/pci.h.

Here's the call path:

  acpi_pci_root_add
    negotiate_os_control                   # _OSC platform negotiation
    pci_acpi_scan_root
      acpi_pci_root_create
        pci_create_root_bus
          pci_init_host_bridge
            host_bridge->native_aer = 1    # Linux owns by default
        if (!OSC_PCI_EXPRESS_AER_CONTROL)
          host_bridge->native_aer = 0      # override, platform owns
        pci_scan_child_bus
          pci_scan_child_bus_extend

We could add some kind of "bridge->force_linux_ownership" bit in
struct pci_host_bridge (and we should probably mention this in dmesg
and maybe taint the kernel (is that still a thing?) because it's
definitely a potential conflict with platform firmware.

Then acpi_pci_root_create() could ignore the _OSC results if set.

Maybe I'll just defer this patch for now since it's a cleanup that
doesn't fix anything?  We can come back later and see if it makes
sense to extend this idea to bits other than native_pcie_hotplug.

Bjorn




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux