Skip to content

ACPI / PM: Rework power resources management

Rafael J. Wysocki linux-acpi linux-pm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest13 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13ACPI / PM: Check device state before refcounting power resourcesdrivers/acpi/power.c+3 -50 replies
1/13ACPI / PM: Check device state before refcounting power resourcesdrivers/acpi/power.c+3 -50 replies
2/13ACPI / PM: Do not refcount power resources that can't be turned ondrivers/acpi/power.c+3 -10 replies
3/13ACPI / PM: Prevent acpi_power_get_inferred_state() from making changesdrivers/acpi/bus.c drivers/acpi/internal.h drivers/acpi/power.c+7 -100 replies
3/13ACPI / PM: Prevent acpi_power_get_inferred_state() from making changesdrivers/acpi/bus.c drivers/acpi/internal.h drivers/acpi/power.c+7 -100 replies
4/13ACPI / PM: Add functions for manipulating lists of power resourcesdrivers/acpi/power.c+38 -290 replies
4/13ACPI / PM: Add functions for manipulating lists of power resourcesdrivers/acpi/power.c+38 -290 replies
5/13ACPI / PM: Introduce function for refcounting device power resourcesdrivers/acpi/internal.h drivers/acpi/power.c+9 -00 replies
6/13ACPI / PM: Introduce __acpi_bus_get_power()drivers/acpi/bus.c+29 -190 replies
7/13ACPI / PM: Add function for device power state initializationdrivers/acpi/bus.c drivers/acpi/internal.h drivers/acpi/scan.c+27 -40 replies
7/13ACPI / PM: Add function for device power state initializationdrivers/acpi/bus.c drivers/acpi/internal.h drivers/acpi/scan.c+27 -40 replies
8/13ACPI / PM: Add function for updating device power state consistentlydrivers/acpi/bus.c include/acpi/acpi_bus.h+62 -290 replies
8/13ACPI / PM: Add function for updating device power state consistentlydrivers/acpi/bus.c include/acpi/acpi_bus.h+62 -290 replies
9/13ACPI / PM: Register acpi_power_driver earlydrivers/acpi/bus.c drivers/acpi/scan.c+2 -10 replies
9/13ACPI / PM: Register acpi_power_driver earlydrivers/acpi/bus.c drivers/acpi/scan.c+2 -10 replies
10/13ACPI / PM: Register power resource devices as soon as they are neededdrivers/acpi/scan.c+20 -00 replies
10/13ACPI / PM: Register power resource devices as soon as they are neededdrivers/acpi/scan.c+20 -00 replies
11/13ACPI / Fan: Rework the handling of power resourcesdrivers/acpi/bus.c drivers/acpi/fan.c drivers/acpi/thermal.c +1 more+12 -250 replies
12/13ACPI / PM: Drop acpi_bus_get_power()drivers/acpi/bus.c include/acpi/acpi_bus.h+0 -200 replies
12/13ACPI / PM: Drop acpi_bus_get_power()drivers/acpi/bus.c include/acpi/acpi_bus.h+0 -204 replies
13/13ACPI / PM: Drop acpi_power_nocheckdrivers/acpi/bus.c drivers/acpi/internal.h drivers/acpi/power.c+0 -430 replies
13/13ACPI / PM: Drop acpi_power_nocheckdrivers/acpi/bus.c drivers/acpi/internal.h drivers/acpi/power.c+0 -430 replies

Reviews trailers per patch

None of the 22 patches has a Reviewed-by or Acked-by.

PatchMaciej RuteckiSedat Dilek
SeriesReported-and-Tested-by Reported-and-Tested-by
1/13Reported-and-tested-by Reported-and-tested-by
1/13Reported-and-tested-by Reported-and-tested-by
2/13
3/13
3/13
4/13
4/13
5/13
6/13
7/13
7/13
8/13
8/13
9/13
9/13
10/13
10/13
11/13
12/13
12/13
13/13
13/13

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/13] ACPI / PM: Rework power resources management

Hi,

Unfortunately there are a few problems with ACPI power resources management that should be fixed by the following series of patches.

Patch [1/13] is necessary to fix a recent regression in the mainline kernel and patch [2/13] also should go into 2.6.37 IMO. The remaining patches are not so urgent, but they all are necessary.

[1/13] - Fix regression if fan resume resulting from the rework of power
resources reference counting.

[2/13] - Do not reference count power resources that can't be turned on.

[3/13] - Rework acpi_power_get_inferred_state() so that it doesn't update

         device->power.state behind the caller's back.

[4/13] - Introduce functions for handling lists of power resources.

[5/13] - Introduce helper function for reference counting power resources
for a given device and power state.

[6/13] - Introduce function for reading device power state without modifying
the device object.

[7/13] - Add function for device power state initialization.

[8/13] - Add function for updating device power state in a consistent way.

[9/13] - Register acpi_power_driver before scanning the root of the namespace.

[10/13] - Add power resource ACPI device objects as soon as they are needed.

[11/13] - Rework the management of ACPI power resources in the ACPI fan driver.

[12/13] - Drop acpi_bus_get_power() that has no users now.

[13/13] - Drop acpi_power_nocheck which isn't necessary any more.

The patches have been tested on my HP nx6325 (which is the only machine using ACPI power resources I have) and a combo patch functionally equivalen to this series has been tested by Maciej Rutecki.

Please apply.

Thanks,
Rafael