Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Lukas Wunner <lukas@wunner.de>, "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Laurent Bigonville <bigon@bigon.be>,
	Mario Limonciello <mario.limonciello@amd.com>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Mika Westerberg <westeri@kernel.org>,
	Alan Borzeszkowski <alan.borzeszkowski@linux.intel.com>,
	Gil Fine <gil.fine@linux.intel.com>,
	Rene Sapiens <rene.sapiens@intel.com>,
	linux-pci@vger.kernel.org
Subject: Re: [PATCH v2 0/5] PCI: Clean up and fix is_hotplug_bridge usage
Date: Fri, 25 Jul 2025 14:33:19 -0500	[thread overview]
Message-ID: <20250725193319.GA3104836@bhelgaas> (raw)
In-Reply-To: <aIM99vImO6kwAkO2@wunner.de>

[-> 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

  reply	other threads:[~2025-07-25 19:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-13 14:31 [PATCH v2 0/5] PCI: Clean up and fix is_hotplug_bridge usage Lukas Wunner
2025-07-13 14:31 ` [PATCH v2 1/5] PCI/ACPI: Fix runtime PM ref imbalance on Hot-Plug Capable ports Lukas Wunner
2025-07-26 20:50   ` Rafael J. Wysocki
2025-07-13 14:31 ` [PATCH v2 2/5] PCI/portdrv: Use is_pciehp instead of is_hotplug_bridge Lukas Wunner
2025-07-13 14:31 ` [PATCH v2 3/5] PCI: pciehp: " Lukas Wunner
2025-07-13 14:31 ` [PATCH v2 4/5] PCI: Move is_pciehp check out of pciehp_is_native() Lukas Wunner
2025-07-13 14:31 ` [PATCH v2 5/5] PCI: Set native_pcie_hotplug up front based on pcie_ports_native Lukas Wunner
2025-07-14 23:00   ` Sathyanarayanan Kuppuswamy
2025-07-14 23:50     ` Sathyanarayanan Kuppuswamy
2025-07-22 22:33       ` Bjorn Helgaas
2025-07-22 22:35 ` [PATCH v2 0/5] PCI: Clean up and fix is_hotplug_bridge usage Bjorn Helgaas
2025-07-25  8:19   ` Lukas Wunner
2025-07-25 19:33     ` Bjorn Helgaas [this message]
2025-07-26 20:52       ` Rafael J. Wysocki

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=20250725193319.GA3104836@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=alan.borzeszkowski@linux.intel.com \
    --cc=bigon@bigon.be \
    --cc=gil.fine@linux.intel.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=mario.limonciello@amd.com \
    --cc=rafael@kernel.org \
    --cc=rene.sapiens@intel.com \
    --cc=westeri@kernel.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