Re: [PATCH] cxl/acpi: Defer probe when ACPI0016 PCI root bridge is not ready
From: Chen Pei
Date: Mon May 18 2026 - 21:55:48 EST
On Fri, 15 May 2026 12:24:50 -0700, Dan Williams wrote:
> If the platform is defined to defer PCI root scans then this dependency
> must be declared. Specifically firmware needs to tell Linux about the
> dependency given it does not order PCI enumeration before ACPI0017
> enumeration by default. Something like:
>
> Device (CXLM) { // ACPI0017
> Name (_HID, "ACPI0017")
> Name (_DEP, Package () {
> \_SB.CXL0, // ACPI0016 host bridge
> \_SB.CXL1,
> })
> }
>
> ...in the firmware, and then:
>
> acpi_dev_clear_dependencies()
>
> ...for each acpi_pci_root_add().
>
> Then ACPI0017 will naturally await all of the ACPI0016 devices that the
> firmware knows about.
Hi Dan,
Thanks for the guidance. The _DEP approach is clearly the right way
to handle this - it's the proper ACPI standard mechanism for declaring
device dependencies and avoids the permanent defer risk that Dave and
others raised with the EPROBE_DEFER approach.
I plan to abandon this patch and implement the _DEP solution instead.
Let me confirm my understanding of the two changes needed:
1. Firmware (QEMU DSDT): Add a _DEP package to the ACPI0017 device
that references all ACPI0016 CXL host bridge devices in the system.
2. Kernel (drivers/acpi/pci_root.c): Add acpi_dev_clear_dependencies()
at the end of acpi_pci_root_add() so that once an ACPI0016 device
is bound, its consumers (ACPI0017) are notified and can proceed
with probing.
Is my understanding correct? Any other changes or considerations
I might be missing?
Thanks,
Pei