Re: [PATCH v2 5/6] PCI/ACPI: Request DPC control only together with AER control

From: Yazen Ghannam

Date: Wed Nov 04 2026 - 11:20:10 EST


On Tue, Oct 20, 2026 at 11:19:22AM -0700, Kuppuswamy Sathyanarayanan wrote:
> PCI Firmware r3.3, sec 4.5.2.4, requires the OS to request AER control
> when it requests DPC control. calculate_control() requests DPC control
> whenever CONFIG_PCIE_DPC is enabled, even if it does not request AER
> control, e.g., with "pci=noaer" or when MSI is disabled.
>
> Request DPC control only if AER control is also requested.
>
> Signed-off-by: Kuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@xxxxxxxxxxxxxxx>
> Acked-by: Rafael J. Wysocki (Intel) <rafael@xxxxxxxxxx>
> ---
> drivers/acpi/pci_root.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
> index b0e0b33e3254..5c674d5b6bb8 100644
> --- a/drivers/acpi/pci_root.c
> +++ b/drivers/acpi/pci_root.c
> @@ -516,8 +516,12 @@ static u32 calculate_control(void)
> * the PCI Firmware Spec, r3.2, sec 4.5.1, table 4-5,
> * OSC_PCI_EXPRESS_DPC_CONTROL indicates the OS supports both DPC
> * and EDR. EDR is always built with DPC on ACPI systems.
> + *
> + * PCI Firmware r3.3, sec 4.5.2.4, requires the OS to request AER
> + * control while requesting DPC control.

What about folding this last line into the rest of the comment above?

Or maybe just drop the spec details and leave that for the commit
message?

> */
> - if (IS_ENABLED(CONFIG_PCIE_DPC))
> + if (IS_ENABLED(CONFIG_PCIE_DPC) &&
> + (control & OSC_PCI_EXPRESS_AER_CONTROL))
> control |= OSC_PCI_EXPRESS_DPC_CONTROL;
>
> return control;
> --

Otherwise, looks good to me.

Reviewed-by: Yazen Ghannam <yazen.ghannam@xxxxxxx>

Thanks,
Yazen