Re: [PATCH v1 0/7] ACPI: scan: Address power management initialization and PCI devices handling

From: Peixin Xie

Date: Wed Sep 02 2026 - 09:00:33 EST


Hi Rafael,

On Mon, Aug 31, 2026 at 06:20:42PM +0200, Rafael J. Wysocki wrote:
> Hi All,
>
> This series aims at addressing a few issues present in the core ACPI device
> enumeration code, mostly related to the acpi_bus_attach() function (that
> gets renamed in one of the patches).
>
> The first one is that, on some systems, ACPI power management is initialized
> twice for devices that have missing dependencies to start with. An attempt
> to address this issue had been made during the 7.3 merge window, but it had
> to be reverted [1]. The approach used here is roughly the same as in the
> reverted commit, but it takes PCI devices (which are a special case) into
> account.
>
> The other issues are that flags are unnecessarily cleared by acpi_bus_attach()
> for devices with missing dependencies, the "initialized" ACPI device object
> flag is not particularly useful, the "visited" ACPI device object flag is
> used for two different things which is confusing at best, and that PCI
> devices are handled by acpi_bus_attach() like any other devices which is
> a mistake.
>
> Please see the changelogs of individual patches for details.
>
> I have tested this series on a couple of machines, but let's see what
> Sashiko has to say about it.
>
> Thanks!

I tested the complete series on the SpacemiT K3 RISC-V Pico-ITX platform
where the original duplicate ACPI PowerResource reference issue was
observed.

The power resource left on by firmware is now turned off as unused after
the namespace scan. After the device dependency is satisfied, the power
resource is turned on once for the device and is turned off normally
during runtime suspend. Runtime resume also works correctly.

Tested-by: Peixin Xie <peixin.xie@xxxxxxxxxxxxxxxxxx>

--
Best Regards,
Peixin Xie