Re: [PATCH v13 4/5] PCI/ACPI: Centralize pcie_ports_native checking

From: Rafael J. Wysocki (Intel)

Date: Tue Sep 22 2026 - 10:10:00 EST


On Mon, Sep 21, 2026 at 10:41 PM Kuppuswamy Sathyanarayanan
<sathyanarayanan.kuppuswamy@xxxxxxxxxxxxxxx> wrote:
>
>
>
> On 9/20/2026 12:24 AM, Guixin Liu wrote:
> >
> >
> > 在 2026/9/20 00:26, Kuppuswamy Sathyanarayanan 写道:
> >> If the user booted with "pcie_ports=native", we take control of the PCIe
> >> port services unconditionally, regardless of what _OSC says.
> >>
> >> Centralize the testing of pcie_ports_native in acpi_pci_root_create(),
> >> where we interpret the _OSC results, so other places only have to check
> >> host_bridge->native_X and we don't have to sprinkle tests of
> >> pcie_ports_native everywhere.
> >>
> >> Rather than overriding the host_bridge->native_X flags after the fact,
> >> fold "pcie_ports=native" into the _OSC control mask we evaluate, i.e.,
> >> proceed as though the platform had granted control of the port services.
> >> That way there is a single mechanism deciding each native_X flag, and we
> >> can report exactly which features we are overriding _OSC for instead of
> >> just noting that we are overriding something:
> >>
> >> acpi PNP0A08:00: _OSC: OS forcing control ("pcie_ports=native") of [PCIeHotplug PME AER DPC]
> >>
> >> This also extends "pcie_ports=native" to host_bridge->native_dpc, which
> >> had no pcie_ports_native fallback before. The effect is narrow.
> >> native_dpc is only used by pci_dpc_recovered(), and only when
> >> CONFIG_PCIE_EDR=n, where hotplug now waits for firmware-owned DPC
> >> recovery.
> >>
> >> host_bridge->native_ltr is deliberately not forced. "pcie_ports="
> >> controls PCIe port services and LTR is not one. There is no
> >> PCIE_PORT_SERVICE_LTR, and native_ltr is only used by
> >> pci_configure_ltr() to enable ASPM L1.2, so forcing it would be an ASPM
> >> policy decision users did not ask for.
> >>
> >> SHPC hotplug is left alone for a simpler reason: SHPC is a conventional
> >> PCI feature rather than a PCIe one, so "pcie_ports=" has no bearing on
> >> it.
> >>
> >> [bhelgaas: commit log, rework OSC_PCIE_PORT_SERVICE_CONTROLS, logging]
> >> Link: https://lore.kernel.org/r/bc87c9e675118960949043a832bed86bc22becbd.1603766889.git.sathyanarayanan.kuppuswamy@xxxxxxxxxxxxxxx
> >> Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@xxxxxxxxxxxxxxx>
> >> Signed-off-by: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>、
> > Should add Fixes: 97ca178c899d ("PCI/DPC: Allow DPC on all Downstream Ports when OS controls AER").
>
> Sure. Will add it in v14.

With that

Acked-by: Rafael J. Wysocki (Intel) <rafael@xxxxxxxxxx> # ACPI core

for the $subject patch.

Thanks!