From: sashiko-bot@kernel.org
To: "Kuppuswamy Sathyanarayanan"
<sathyanarayanan.kuppuswamy@linux.intel.com>
Cc: linux-pci@vger.kernel.org
Subject: Re: [PATCH v13 4/5] PCI/ACPI: Centralize pcie_ports_native checking
Date: Sat, 19 Sep 2026 16:39:16 +0000 [thread overview]
Message-ID: <20260919163917.36DC41F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260919162655.3499010-5-sathyanarayanan.kuppuswamy@linux.intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] pci: implicit system-wide DPC binding contradicts commit message
--
commit 07669185337d665d35c6cf7148608c57752e5ecb
Author: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
PCI/ACPI: Centralize pcie_ports_native checking
This commit centralizes the testing of pcie_ports_native in
acpi_pci_root_create() by folding it into the _OSC control mask. It allows
other subsystems to simply check the host_bridge->native_X flags instead of
using scattered pcie_ports_native tests.
Link: https://lore.kernel.org/r/bc87c9e675118960949043a832bed86bc22becbd.1603766889.git.sathyanarayanan.kuppuswamy@linux.intel.com
> diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
> index 756dc2f055f51..2494811dd69b2 100644
> --- a/drivers/acpi/pci_root.c
> +++ b/drivers/acpi/pci_root.c
[ ... ]
> @@ -1039,6 +1052,21 @@ struct pci_bus *acpi_pci_root_create(struct acpi_pci_root *root,
> ctrl = root->osc_control_set;
> ext_ctrl = root->osc_ext_control_set;
>
> + /*
> + * If the user specified "pcie_ports=native", use the PCIe port
> + * services regardless of what _OSC says, i.e., proceed as though the
> + * platform had granted us control of them. This may conflict with
> + * firmware that expects to own those features.
> + */
> + if (pcie_ports_native) {
> + u32 override = OSC_PCIE_PORT_SERVICE_CONTROLS & ~ctrl;
> +
> + if (override)
> + decode_osc_control(root, "OS forcing control (\"pcie_ports=native\") of",
> + override);
> + ctrl |= override;
> + }
> +
> OSC_OWNER(ctrl, OSC_PCI_EXPRESS_NATIVE_HP_CONTROL,
> host_bridge->native_pcie_hotplug);
> OSC_OWNER(ctrl, OSC_PCI_SHPC_NATIVE_HP_CONTROL,
> @@ -1051,6 +1079,14 @@ struct pci_bus *acpi_pci_root_create(struct acpi_pci_root *root,
> OSC_OWNER(ctrl, OSC_PCI_EXPRESS_AER_CONTROL, host_bridge->native_aer);
> OSC_OWNER(ctrl, OSC_PCI_EXPRESS_PME_CONTROL, host_bridge->native_pme);
> OSC_OWNER(ctrl, OSC_PCI_EXPRESS_LTR_CONTROL, host_bridge->native_ltr);
> OSC_OWNER(ctrl, OSC_PCI_EXPRESS_DPC_CONTROL, host_bridge->native_dpc);
[Severity: Medium]
The commit message states that extending "pcie_ports=native" to DPC has a
"narrow" effect, only impacting pci_dpc_recovered(). However, does this
unintentionally enable the DPC port driver system-wide?
Because pcie_ports=native now forces host_bridge->native_aer to true via the
OSC_PCI_EXPRESS_AER_CONTROL bit override, this impacts the DPC port service
binding in get_port_device_capability():
drivers/pci/pcie/portdrv.c:get_port_device_capability() {
...
if (pci_find_ext_capability(dev, PCI_EXT_CAP_ID_DPC) &&
pci_aer_available() &&
(pcie_ports_dpc_native || host->native_aer))
services |= PCIE_PORT_SERVICE_DPC;
...
}
Since host->native_aer evaluates to true when the pcie_ports=native parameter
is provided, the DPC capability check will now unconditionally pass. Could
this break the assumption that the effect on DPC was isolated?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260919162655.3499010-1-sathyanarayanan.kuppuswamy@linux.intel.com?part=4
next prev parent reply other threads:[~2026-09-19 16:39 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-19 16:26 [PATCH v13 0/5] Simplify PCIe native ownership Kuppuswamy Sathyanarayanan
2026-09-19 16:26 ` [PATCH v13 1/5] PCI/DPC: Ignore devices with no AER Capability Kuppuswamy Sathyanarayanan
2026-09-19 16:35 ` sashiko-bot
2026-09-20 6:11 ` Lukas Wunner
2026-09-21 16:43 ` Kuppuswamy Sathyanarayanan
2026-09-21 19:01 ` Bjorn Helgaas
2026-09-19 16:26 ` [PATCH v13 2/5] PCI: Assume control of portdrv-related features only when portdrv enabled Kuppuswamy Sathyanarayanan
2026-09-19 16:33 ` sashiko-bot
2026-09-20 6:17 ` Lukas Wunner
2026-09-21 18:59 ` Kuppuswamy Sathyanarayanan
2026-09-21 19:01 ` Bjorn Helgaas
2026-09-22 17:30 ` Bowman, Terry
2026-09-19 16:26 ` [PATCH v13 3/5] PCI/ACPI: Tidy _OSC control bit checking Kuppuswamy Sathyanarayanan
2026-09-19 16:30 ` sashiko-bot
2026-09-22 13:18 ` Rafael J. Wysocki (Intel)
2026-09-19 16:26 ` [PATCH v13 4/5] PCI/ACPI: Centralize pcie_ports_native checking Kuppuswamy Sathyanarayanan
2026-09-19 16:39 ` sashiko-bot [this message]
2026-09-21 20:40 ` Kuppuswamy Sathyanarayanan
2026-09-20 7:24 ` Guixin Liu
2026-09-21 20:41 ` Kuppuswamy Sathyanarayanan
2026-09-22 13:16 ` Rafael J. Wysocki (Intel)
2026-09-19 16:26 ` [PATCH v13 5/5] PCI: Centralize pci_aer_available() checking Kuppuswamy Sathyanarayanan
2026-09-19 16:36 ` sashiko-bot
-- strict thread matches above, loose matches on Subject: below --
2021-01-23 1:11 [PATCH v13 0/5] Simplify PCIe native ownership Kuppuswamy Sathyanarayanan
2021-01-23 1:11 ` [PATCH v13 4/5] PCI/ACPI: Centralize pcie_ports_native checking Kuppuswamy Sathyanarayanan
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=20260919163917.36DC41F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=sathyanarayanan.kuppuswamy@linux.intel.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.