Linux PCI subsystem development
 help / color / mirror / Atom feed
* [PATCH v2] ACPI: PCI: Avoid misleading _OSC messages for non-PCIe host bridges without _OSC
@ 2026-08-06 11:21 KONDO KAZUMA(近藤 和真)
  2026-08-06 11:25 ` sashiko-bot
  2026-08-07 15:12 ` Rafael J. Wysocki (Intel)
  0 siblings, 2 replies; 3+ messages in thread
From: KONDO KAZUMA(近藤 和真) @ 2026-08-06 11:21 UTC (permalink / raw)
  To: rafael@kernel.org, lenb@kernel.org, bhelgaas@google.com
  Cc: linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org

After commit 7d703df7f4f5 ("ACPI: bus: Split _OSC evaluation out of
acpi_run_osc()"), the _OSC evaluation path now returns AE_ERROR to
negotiate_os_control() instead of propagating AE_NOT_FOUND from
acpi_evaluate_object().

This has not caused any functional issues so far, but it produces
additional misleading messages for non-PCIe host bridges without _OSC on
some Intel servers:

    kernel: ACPI: Enabled 2 GPEs in block 00 to 7F
    kernel: ACPI: PCI Root Bridge [UNC0] (domain 0000 [bus fe])
    kernel: acpi PNP0A03:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI EDR HPX-Type3]
  + kernel: acpi PNP0A03:00: _OSC: OS requested [PCIeHotplug SHPCHotplug PME AER PCIeCapability LTR DPC]
  + kernel: acpi PNP0A03:00: _OSC: platform willing to grant [PCIeHotplug SHPCHotplug PME AER PCIeCapability LTR DPC]
  + kernel: acpi PNP0A03:00: _OSC: platform retains control of PCIe features (AE_ERROR)
    kernel: PCI host bridge to bus 0000:fe

Previously, negotiate_os_control() silently ignored AE_NOT_FOUND for
non-PCIe host bridges without _OSC, but after the above change, it no
longer does so.

As a result, negotiate_os_control() logs messages as if the OS had
negotiated with the platform via _OSC, even though the non-PCIe host
bridge has no _OSC method and no such negotiation actually occurs.

Skip _OSC negotiation for non-PCIe host bridges that do not define an
_OSC method before attempting to evaluate it.

Fixes: 7d703df7f4f5 ("ACPI: bus: Split _OSC evaluation out of acpi_run_osc()")
Link: https://lore.kernel.org/linux-acpi/d0be949d-0e21-472e-a44b-cedb1dd8695d@nec.com/
Suggested-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Kazuma Kondo <kazuma-kondo@nec.com>
---
Changes in v2:
- Set *no_aspm to 1 when skipping _OSC negotiation.
- Updated the debug message and the comment.
- Link to v1: https://lore.kernel.org/linux-acpi/20260731090820.493064-1-kazuma-kondo@nec.com/

 drivers/acpi/pci_root.c | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index 4c06c3ffd0cb..cab29a75a276 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -574,6 +574,17 @@ static void negotiate_os_control(struct acpi_pci_root *root, int *no_aspm)
 		return;
 	}
 
+	if (!is_pcie(root) && !is_cxl(root) &&
+	    !acpi_has_method(handle, "_OSC")) {
+		dev_dbg(&device->dev, "_OSC: Skipping a non-PCIe host bridge without _OSC\n");
+
+		/*
+		 * No ASPM for non-PCIe host bridges
+		 */
+		*no_aspm = 1;
+		return;
+	}
+
 	support = calculate_support();
 
 	decode_osc_support(root, "OS supports", support);
@@ -615,10 +626,6 @@ static void negotiate_os_control(struct acpi_pci_root *root, int *no_aspm)
 		 */
 		*no_aspm = 1;
 
-		/* _OSC is optional for PCI host bridges */
-		if (status == AE_NOT_FOUND && !is_pcie(root))
-			return;
-
 		if (control) {
 			decode_osc_control(root, "OS requested", requested);
 			decode_osc_control(root, "platform willing to grant", control);
-- 
2.49.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] ACPI: PCI: Avoid misleading _OSC messages for non-PCIe host bridges without _OSC
  2026-08-06 11:21 [PATCH v2] ACPI: PCI: Avoid misleading _OSC messages for non-PCIe host bridges without _OSC KONDO KAZUMA(近藤 和真)
@ 2026-08-06 11:25 ` sashiko-bot
  2026-08-07 15:12 ` Rafael J. Wysocki (Intel)
  1 sibling, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-08-06 11:25 UTC (permalink / raw)
  To: KONDO KAZUMA(^[$B6aF#!!OB??^[(B); +Cc: linux-pci

> After commit 7d703df7f4f5 ("ACPI: bus: Split _OSC evaluation out of
> acpi_run_osc()"), the _OSC evaluation path now returns AE_ERROR to
> negotiate_os_control() instead of propagating AE_NOT_FOUND from
> acpi_evaluate_object().
> 
> This has not caused any functional issues so far, but it produces
> additional misleading messages for non-PCIe host bridges without _OSC on
> some Intel servers:
> 
>     kernel: ACPI: Enabled 2 GPEs in block 00 to 7F
>     kernel: ACPI: PCI Root Bridge [UNC0] (domain 0000 [bus fe])
>     kernel: acpi PNP0A03:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI EDR HPX-Type3]
>   + kernel: acpi PNP0A03:00: _OSC: OS requested [PCIeHotplug SHPCHotplug PME AER PCIeCapability LTR DPC]
>   + kernel: acpi PNP0A03:00: _OSC: platform willing to grant [PCIeHotplug SHPCHotplug PME AER PCIeCapability LTR DPC]
>   + kernel: acpi PNP0A03:00: _OSC: platform retains control of PCIe features (AE_ERROR)
> [ ... ]
> 
> Fixes: 7d703df7f4f5 ("ACPI: bus: Split _OSC evaluation out of acpi_run_osc()")
> Link: https://lore.kernel.org/linux-acpi/d0be949d-0e21-472e-a44b-cedb1dd8695d@nec.com/
> Suggested-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> Signed-off-by: Kazuma Kondo <kazuma-kondo@nec.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260806112052.857684-1-kazuma-kondo@nec.com?part=1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] ACPI: PCI: Avoid misleading _OSC messages for non-PCIe host bridges without _OSC
  2026-08-06 11:21 [PATCH v2] ACPI: PCI: Avoid misleading _OSC messages for non-PCIe host bridges without _OSC KONDO KAZUMA(近藤 和真)
  2026-08-06 11:25 ` sashiko-bot
@ 2026-08-07 15:12 ` Rafael J. Wysocki (Intel)
  1 sibling, 0 replies; 3+ messages in thread
From: Rafael J. Wysocki (Intel) @ 2026-08-07 15:12 UTC (permalink / raw)
  To: KONDO KAZUMA(近藤 和真)
  Cc: rafael@kernel.org, lenb@kernel.org, bhelgaas@google.com,
	linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org

On Thu, Aug 6, 2026 at 1:21 PM KONDO KAZUMA(近藤 和真) <kazuma-kondo@nec.com> wrote:
>
> After commit 7d703df7f4f5 ("ACPI: bus: Split _OSC evaluation out of
> acpi_run_osc()"), the _OSC evaluation path now returns AE_ERROR to
> negotiate_os_control() instead of propagating AE_NOT_FOUND from
> acpi_evaluate_object().
>
> This has not caused any functional issues so far, but it produces
> additional misleading messages for non-PCIe host bridges without _OSC on
> some Intel servers:
>
>     kernel: ACPI: Enabled 2 GPEs in block 00 to 7F
>     kernel: ACPI: PCI Root Bridge [UNC0] (domain 0000 [bus fe])
>     kernel: acpi PNP0A03:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI EDR HPX-Type3]
>   + kernel: acpi PNP0A03:00: _OSC: OS requested [PCIeHotplug SHPCHotplug PME AER PCIeCapability LTR DPC]
>   + kernel: acpi PNP0A03:00: _OSC: platform willing to grant [PCIeHotplug SHPCHotplug PME AER PCIeCapability LTR DPC]
>   + kernel: acpi PNP0A03:00: _OSC: platform retains control of PCIe features (AE_ERROR)
>     kernel: PCI host bridge to bus 0000:fe
>
> Previously, negotiate_os_control() silently ignored AE_NOT_FOUND for
> non-PCIe host bridges without _OSC, but after the above change, it no
> longer does so.
>
> As a result, negotiate_os_control() logs messages as if the OS had
> negotiated with the platform via _OSC, even though the non-PCIe host
> bridge has no _OSC method and no such negotiation actually occurs.
>
> Skip _OSC negotiation for non-PCIe host bridges that do not define an
> _OSC method before attempting to evaluate it.
>
> Fixes: 7d703df7f4f5 ("ACPI: bus: Split _OSC evaluation out of acpi_run_osc()")
> Link: https://lore.kernel.org/linux-acpi/d0be949d-0e21-472e-a44b-cedb1dd8695d@nec.com/
> Suggested-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> Signed-off-by: Kazuma Kondo <kazuma-kondo@nec.com>
> ---
> Changes in v2:
> - Set *no_aspm to 1 when skipping _OSC negotiation.
> - Updated the debug message and the comment.
> - Link to v1: https://lore.kernel.org/linux-acpi/20260731090820.493064-1-kazuma-kondo@nec.com/
>
>  drivers/acpi/pci_root.c | 15 +++++++++++----
>  1 file changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
> index 4c06c3ffd0cb..cab29a75a276 100644
> --- a/drivers/acpi/pci_root.c
> +++ b/drivers/acpi/pci_root.c
> @@ -574,6 +574,17 @@ static void negotiate_os_control(struct acpi_pci_root *root, int *no_aspm)
>                 return;
>         }
>
> +       if (!is_pcie(root) && !is_cxl(root) &&
> +           !acpi_has_method(handle, "_OSC")) {
> +               dev_dbg(&device->dev, "_OSC: Skipping a non-PCIe host bridge without _OSC\n");
> +
> +               /*
> +                * No ASPM for non-PCIe host bridges
> +                */
> +               *no_aspm = 1;
> +               return;
> +       }
> +
>         support = calculate_support();
>
>         decode_osc_support(root, "OS supports", support);
> @@ -615,10 +626,6 @@ static void negotiate_os_control(struct acpi_pci_root *root, int *no_aspm)
>                  */
>                 *no_aspm = 1;
>
> -               /* _OSC is optional for PCI host bridges */
> -               if (status == AE_NOT_FOUND && !is_pcie(root))
> -                       return;
> -
>                 if (control) {
>                         decode_osc_control(root, "OS requested", requested);
>                         decode_osc_control(root, "platform willing to grant", control);
> --

Applied as 7.3 material with some minor modifications, thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-08-07 15:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-06 11:21 [PATCH v2] ACPI: PCI: Avoid misleading _OSC messages for non-PCIe host bridges without _OSC KONDO KAZUMA(近藤 和真)
2026-08-06 11:25 ` sashiko-bot
2026-08-07 15:12 ` Rafael J. Wysocki (Intel)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox