Skip to content

kernel: Add support for poweroff handler call chain

Guenter Roeck linux-acpi linux-alpha linux-arm-kernel linux-devicetree linux-efi linux-hexagon linux-ia64 linux-m68k linux-metag linux-mips linux-parisc linux-pm linux-s390 linux-sh linux-tegra linux-um linuxppc-dev lkml xen-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest44 patches 146 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/44kernel: Add support for poweroff handler call chaininclude/linux/pm.h kernel/power/Makefile kernel/power/poweroff_handler.c+186 -029 replies
1/44kernel: Add support for poweroff handler call chaininclude/linux/pm.h kernel/power/Makefile kernel/power/poweroff_handler.c+186 -00 replies
1/44kernel: Add support for poweroff handler call chaininclude/linux/pm.h kernel/power/Makefile kernel/power/poweroff_handler.c+186 -00 replies
2/44memory: emif: Use API function to determine poweroff capabilitydrivers/memory/emif.c+2 -20 replies
2/44memory: emif: Use API function to determine poweroff capabilitydrivers/memory/emif.c+2 -20 replies
2/44memory: emif: Use API function to determine poweroff capabilitydrivers/memory/emif.c+2 -20 replies
3/44hibernate: Call have_kernel_poweroff instead of checking pm_power_offkernel/power/hibernate.c+1 -18 replies
3/44hibernate: Call have_kernel_poweroff instead of checking pm_power_offkernel/power/hibernate.c+1 -10 replies
3/44hibernate: Call have_kernel_poweroff instead of checking pm_power_offkernel/power/hibernate.c+1 -10 replies
4/44m68k: Replace mach_power_off with pm_power_offarch/m68k/emu/natfeat.c arch/m68k/include/asm/machdep.h arch/m68k/kernel/process.c +3 more+7 -72 replies
4/44m68k: Replace mach_power_off with pm_power_offarch/m68k/emu/natfeat.c arch/m68k/include/asm/machdep.h arch/m68k/kernel/process.c +3 more+7 -70 replies
4/44m68k: Replace mach_power_off with pm_power_offarch/m68k/emu/natfeat.c arch/m68k/include/asm/machdep.h arch/m68k/kernel/process.c +3 more+7 -70 replies
5/44mfd: as3722: Drop reference to pm_power_off from devicetree bindingsDocumentation/devicetree/bindings/mfd/as3722.txt+1 -216 replies
5/44mfd: as3722: Drop reference to pm_power_off from devicetree bindingsDocumentation/devicetree/bindings/mfd/as3722.txt+1 -20 replies
5/44mfd: as3722: Drop reference to pm_power_off from devicetree bindingsDocumentation/devicetree/bindings/mfd/as3722.txt+1 -20 replies
6/44gpio-poweroff: Drop reference to pm_power_off from devicetree bindingsDocumentation/devicetree/bindings/gpio/gpio-poweroff.txt+5 -55 replies
6/44gpio-poweroff: Drop reference to pm_power_off from devicetree bindingsDocumentation/devicetree/bindings/gpio/gpio-poweroff.txt+5 -50 replies
6/44gpio-poweroff: Drop reference to pm_power_off from devicetree bindingsDocumentation/devicetree/bindings/gpio/gpio-poweroff.txt+5 -50 replies
7/44qnap-poweroff: Drop reference to pm_power_off from devicetree bindingsDocumentation/devicetree/bindings/power_supply/qnap-poweroff.txt+2 -27 replies
7/44qnap-poweroff: Drop reference to pm_power_off from devicetree bindingsDocumentation/devicetree/bindings/power_supply/qnap-poweroff.txt+2 -20 replies
7/44qnap-poweroff: Drop reference to pm_power_off from devicetree bindingsDocumentation/devicetree/bindings/power_supply/qnap-poweroff.txt+2 -20 replies
8/44kernel: Move pm_power_off to common codearch/alpha/kernel/process.c arch/arc/kernel/reset.c arch/arm/kernel/process.c +33 more+68 -14629 replies
9/44mfd: palmas: Register with kernel poweroff handlerdrivers/mfd/palmas.c include/linux/mfd/palmas.h+20 -130 replies
9/44mfd: palmas: Register with kernel poweroff handlerdrivers/mfd/palmas.c include/linux/mfd/palmas.h+20 -130 replies
9/44mfd: palmas: Register with kernel poweroff handlerdrivers/mfd/palmas.c include/linux/mfd/palmas.h+20 -130 replies
10/44mfd: axp20x: Register with kernel poweroff handlerdrivers/mfd/axp20x.c include/linux/mfd/axp20x.h+18 -130 replies
10/44mfd: axp20x: Register with kernel poweroff handlerdrivers/mfd/axp20x.c include/linux/mfd/axp20x.h+18 -130 replies
10/44mfd: axp20x: Register with kernel poweroff handlerdrivers/mfd/axp20x.c include/linux/mfd/axp20x.h+18 -130 replies
11/44mfd: retu: Register with kernel poweroff handlerdrivers/mfd/retu-mfd.c+19 -140 replies
11/44mfd: retu: Register with kernel poweroff handlerdrivers/mfd/retu-mfd.c+19 -140 replies
11/44mfd: retu: Register with kernel poweroff handlerdrivers/mfd/retu-mfd.c+19 -140 replies
12/44mfd: ab8500-sysctrl: Register with kernel poweroff handlerdrivers/mfd/ab8500-sysctrl.c+15 -1115 replies
12/44mfd: ab8500-sysctrl: Register with kernel poweroff handlerdrivers/mfd/ab8500-sysctrl.c+15 -110 replies
12/44mfd: ab8500-sysctrl: Register with kernel poweroff handlerdrivers/mfd/ab8500-sysctrl.c+15 -110 replies
13/44mfd: max8907: Register with kernel poweroff handlerdrivers/mfd/max8907.c include/linux/mfd/max8907.h+20 -60 replies
13/44mfd: max8907: Register with kernel poweroff handlerdrivers/mfd/max8907.c include/linux/mfd/max8907.h+20 -60 replies
13/44mfd: max8907: Register with kernel poweroff handlerdrivers/mfd/max8907.c include/linux/mfd/max8907.h+20 -60 replies
14/44mfd: tps80031: Register with kernel poweroff handlerdrivers/mfd/tps80031.c include/linux/mfd/tps80031.h+20 -120 replies
14/44mfd: tps80031: Register with kernel poweroff handlerdrivers/mfd/tps80031.c include/linux/mfd/tps80031.h+20 -120 replies
14/44mfd: tps80031: Register with kernel poweroff handlerdrivers/mfd/tps80031.c include/linux/mfd/tps80031.h+20 -120 replies
15/44mfd: dm355evm_msp: Register with kernel poweroff handlerdrivers/mfd/dm355evm_msp.c+15 -30 replies
15/44mfd: dm355evm_msp: Register with kernel poweroff handlerdrivers/mfd/dm355evm_msp.c+15 -30 replies
15/44mfd: dm355evm_msp: Register with kernel poweroff handlerdrivers/mfd/dm355evm_msp.c+15 -30 replies
16/44mfd: tps6586x: Register with kernel poweroff handlerdrivers/mfd/tps6586x.c+23 -80 replies
16/44mfd: tps6586x: Register with kernel poweroff handlerdrivers/mfd/tps6586x.c+23 -80 replies
16/44mfd: tps6586x: Register with kernel poweroff handlerdrivers/mfd/tps6586x.c+23 -80 replies
17/44mfd: tps65910: Register with kernel poweroff handlerdrivers/mfd/tps65910.c include/linux/mfd/tps65910.h+21 -90 replies
17/44mfd: tps65910: Register with kernel poweroff handlerdrivers/mfd/tps65910.c include/linux/mfd/tps65910.h+21 -90 replies
17/44mfd: tps65910: Register with kernel poweroff handlerdrivers/mfd/tps65910.c include/linux/mfd/tps65910.h+21 -90 replies
18/44mfd: twl4030-power: Register with kernel poweroff handlerdrivers/mfd/twl4030-power.c include/linux/i2c/twl.h+21 -53 replies
18/44mfd: twl4030-power: Register with kernel poweroff handlerdrivers/mfd/twl4030-power.c include/linux/i2c/twl.h+21 -50 replies
18/44mfd: twl4030-power: Register with kernel poweroff handlerdrivers/mfd/twl4030-power.c include/linux/i2c/twl.h+21 -50 replies
19/44ipmi: Register with kernel poweroff handlerdrivers/char/ipmi/ipmi_poweroff.c+19 -110 replies
19/44ipmi: Register with kernel poweroff handlerdrivers/char/ipmi/ipmi_poweroff.c+19 -110 replies
20/44power/reset: restart-poweroff: Register with kernel poweroff handlerdrivers/power/reset/restart-poweroff.c+12 -133 replies
20/44power/reset: restart-poweroff: Register with kernel poweroff handlerdrivers/power/reset/restart-poweroff.c+12 -130 replies
20/44power/reset: restart-poweroff: Register with kernel poweroff handlerdrivers/power/reset/restart-poweroff.c+12 -130 replies
21/44power/reset: gpio-poweroff: Register with kernel poweroff handlerdrivers/power/reset/gpio-poweroff.c+18 -183 replies
21/44power/reset: gpio-poweroff: Register with kernel poweroff handlerdrivers/power/reset/gpio-poweroff.c+18 -180 replies
22/44power/reset: as3722-poweroff: Register with kernel poweroff handlerdrivers/power/reset/as3722-poweroff.c+19 -170 replies
22/44power/reset: as3722-poweroff: Register with kernel poweroff handlerdrivers/power/reset/as3722-poweroff.c+19 -170 replies
22/44power/reset: as3722-poweroff: Register with kernel poweroff handlerdrivers/power/reset/as3722-poweroff.c+19 -170 replies
23/44power/reset: qnap-poweroff: Register with kernel poweroff handlerdrivers/power/reset/qnap-poweroff.c+14 -143 replies
23/44power/reset: qnap-poweroff: Register with kernel poweroff handlerdrivers/power/reset/qnap-poweroff.c+14 -140 replies
24/44power/reset: msm-powroff: Register with kernel poweroff handlerdrivers/power/reset/msm-poweroff.c+11 -20 replies
24/44power/reset: msm-powroff: Register with kernel poweroff handlerdrivers/power/reset/msm-poweroff.c+11 -20 replies
24/44power/reset: msm-powroff: Register with kernel poweroff handlerdrivers/power/reset/msm-poweroff.c+11 -20 replies
25/44power/reset: vexpress-poweroff: Register with kernel poweroff handlerdrivers/power/reset/vexpress-poweroff.c+17 -20 replies
25/44power/reset: vexpress-poweroff: Register with kernel poweroff handlerdrivers/power/reset/vexpress-poweroff.c+17 -20 replies
25/44power/reset: vexpress-poweroff: Register with kernel poweroff handlerdrivers/power/reset/vexpress-poweroff.c+17 -20 replies
26/44x86: iris: Register with kernel poweroff handlerarch/x86/platform/iris/iris.c+19 -60 replies
26/44x86: iris: Register with kernel poweroff handlerarch/x86/platform/iris/iris.c+19 -60 replies
26/44x86: iris: Register with kernel poweroff handlerarch/x86/platform/iris/iris.c+19 -60 replies
27/44x86: apm: Register with kernel poweroff handlerarch/x86/kernel/apm_32.c+15 -50 replies
27/44x86: apm: Register with kernel poweroff handlerarch/x86/kernel/apm_32.c+15 -50 replies
27/44x86: apm: Register with kernel poweroff handlerarch/x86/kernel/apm_32.c+15 -50 replies
28/44x86: olpc: Register xo1 poweroff handler with kernel poweroff handlerarch/x86/platform/olpc/olpc-xo1-pm.c+17 -30 replies
28/44x86: olpc: Register xo1 poweroff handler with kernel poweroff handlerarch/x86/platform/olpc/olpc-xo1-pm.c+17 -30 replies
29/44staging: nvec: Register with kernel poweroff handlerdrivers/staging/nvec/nvec.c drivers/staging/nvec/nvec.h+17 -93 replies
29/44staging: nvec: Register with kernel poweroff handlerdrivers/staging/nvec/nvec.c drivers/staging/nvec/nvec.h+17 -90 replies
30/44acpi: Register poweroff handler with kernel poweroff handlerdrivers/acpi/sleep.c+13 -20 replies
30/44acpi: Register poweroff handler with kernel poweroff handlerdrivers/acpi/sleep.c+13 -20 replies
30/44acpi: Register poweroff handler with kernel poweroff handlerdrivers/acpi/sleep.c+13 -20 replies
31/44arm: Register with kernel poweroff handlerarch/arm/kernel/psci.c arch/arm/mach-at91/board-gsia18s.c arch/arm/mach-at91/setup.c +41 more+51 -513 replies
31/44arm: Register with kernel poweroff handlerarch/arm/kernel/psci.c arch/arm/mach-at91/board-gsia18s.c arch/arm/mach-at91/setup.c +41 more+51 -510 replies
31/44arm: Register with kernel poweroff handlerarch/arm/kernel/psci.c arch/arm/mach-at91/board-gsia18s.c arch/arm/mach-at91/setup.c +41 more+51 -510 replies
32/44arm64: psci: Register with kernel poweroff handlerarch/arm64/kernel/psci.c+1 -12 replies
32/44arm64: psci: Register with kernel poweroff handlerarch/arm64/kernel/psci.c+1 -10 replies
32/44arm64: psci: Register with kernel poweroff handlerarch/arm64/kernel/psci.c+1 -10 replies
33/44avr32: atngw100: Register with kernel poweroff handlerarch/avr32/boards/atngw100/mrmt.c+1 -16 replies
33/44avr32: atngw100: Register with kernel poweroff handlerarch/avr32/boards/atngw100/mrmt.c+1 -10 replies
33/44avr32: atngw100: Register with kernel poweroff handlerarch/avr32/boards/atngw100/mrmt.c+1 -10 replies
34/44ia64: Register with kernel poweroff handlerarch/ia64/sn/kernel/setup.c+2 -20 replies
34/44ia64: Register with kernel poweroff handlerarch/ia64/sn/kernel/setup.c+2 -20 replies
34/44ia64: Register with kernel poweroff handlerarch/ia64/sn/kernel/setup.c+2 -20 replies
35/44m68k: Register with kernel poweroff handlerarch/m68k/emu/natfeat.c arch/m68k/mac/config.c+2 -22 replies
35/44m68k: Register with kernel poweroff handlerarch/m68k/emu/natfeat.c arch/m68k/mac/config.c+2 -20 replies
35/44m68k: Register with kernel poweroff handlerarch/m68k/emu/natfeat.c arch/m68k/mac/config.c+2 -20 replies
36/44mips: Register with kernel poweroff handlerarch/mips/alchemy/board-gpr.c arch/mips/alchemy/board-mtx1.c arch/mips/alchemy/board-xxs1500.c +29 more+46 -330 replies
36/44mips: Register with kernel poweroff handlerarch/mips/alchemy/board-gpr.c arch/mips/alchemy/board-mtx1.c arch/mips/alchemy/board-xxs1500.c +29 more+46 -330 replies
36/44mips: Register with kernel poweroff handlerarch/mips/alchemy/board-gpr.c arch/mips/alchemy/board-mtx1.c arch/mips/alchemy/board-xxs1500.c +29 more+46 -330 replies
37/44sh: Register with kernel poweroff handlerarch/sh/boards/board-sh7785lcr.c arch/sh/boards/board-urquell.c arch/sh/boards/mach-highlander/setup.c +3 more+6 -60 replies
37/44sh: Register with kernel poweroff handlerarch/sh/boards/board-sh7785lcr.c arch/sh/boards/board-urquell.c arch/sh/boards/mach-highlander/setup.c +3 more+6 -60 replies
38/44x86: lguest: Register with kernel poweroff handlerarch/x86/lguest/boot.c+1 -10 replies
38/44x86: lguest: Register with kernel poweroff handlerarch/x86/lguest/boot.c+1 -10 replies
38/44x86: lguest: Register with kernel poweroff handlerarch/x86/lguest/boot.c+1 -10 replies
39/44x86: ce4100: Register with kernel poweroff handlerarch/x86/platform/ce4100/ce4100.c+1 -10 replies
39/44x86: ce4100: Register with kernel poweroff handlerarch/x86/platform/ce4100/ce4100.c+1 -10 replies
39/44x86: ce4100: Register with kernel poweroff handlerarch/x86/platform/ce4100/ce4100.c+1 -10 replies
40/44x86: intel-mid: Drop registration of dummy poweroff handlersarch/x86/platform/intel-mid/intel-mid.c arch/x86/platform/intel-mid/mfld.c+0 -100 replies
40/44x86: intel-mid: Drop registration of dummy poweroff handlersarch/x86/platform/intel-mid/intel-mid.c arch/x86/platform/intel-mid/mfld.c+0 -100 replies
40/44x86: intel-mid: Drop registration of dummy poweroff handlersarch/x86/platform/intel-mid/intel-mid.c arch/x86/platform/intel-mid/mfld.c+0 -100 replies
41/44x86: pmc_atom: Register poweroff handler with kernel poweroff handlerarch/x86/kernel/pmc_atom.c+17 -30 replies
41/44x86: pmc_atom: Register poweroff handler with kernel poweroff handlerarch/x86/kernel/pmc_atom.c+17 -30 replies
41/44x86: pmc_atom: Register poweroff handler with kernel poweroff handlerarch/x86/kernel/pmc_atom.c+17 -30 replies
42/44efi: Register poweroff handler with kernel poweroff handlerdrivers/firmware/efi/reboot.c+19 -45 replies
42/44efi: Register poweroff handler with kernel poweroff handlerdrivers/firmware/efi/reboot.c+19 -40 replies
42/44efi: Register poweroff handler with kernel poweroff handlerdrivers/firmware/efi/reboot.c+19 -40 replies
43/44hwmon: (ab8500) Call kernel_power_off instead of pm_power_offdrivers/hwmon/ab8500.c+3 -20 replies
43/44hwmon: (ab8500) Call kernel_power_off instead of pm_power_offdrivers/hwmon/ab8500.c+3 -20 replies
43/44hwmon: (ab8500) Call kernel_power_off instead of pm_power_offdrivers/hwmon/ab8500.c+3 -20 replies
44/44kernel: Remove pm_power_offinclude/linux/pm.h kernel/power/poweroff_handler.c+1 -102 replies
44/44kernel: Remove pm_power_offinclude/linux/pm.h kernel/power/poweroff_handler.c+1 -100 replies
44/44kernel: Remove pm_power_offinclude/linux/pm.h kernel/power/poweroff_handler.c+1 -100 replies

Reviews trailers per patch

37 of 124 patches have a Reviewed-by or Acked-by.

PatchJean DelvareGeert UytterhoevenDavid VrabelMark RutlandRichard WeinbergerAndrew LunnGreg Kroah-HartmanMax FilippovJesper NilssonXuetao GuanCatalin MarinasVineet GuptaHirokazu TakataMark SalterMatt FlemingHans-Christian Egtvedt
1/44
1/44
1/44
2/44
2/44
2/44
3/44
3/44
3/44
4/44A-b A-b
4/44A-b A-b
4/44A-b A-b
5/44A-b A-b
5/44A-b A-b
5/44A-b A-b
6/44A-b A-b A-b A-b A-b
6/44A-b A-b A-b A-b A-b
6/44A-b A-b A-b A-b A-b
7/44A-b A-b A-b A-b A-b
7/44A-b A-b A-b A-b A-b
7/44A-b A-b A-b A-b A-b
8/44A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b A-b
9/44
9/44
9/44
10/44
10/44
10/44
11/44
11/44
11/44
12/44
12/44
12/44
13/44
13/44
13/44
14/44
14/44
14/44
15/44
15/44
15/44
16/44
16/44
16/44
17/44
17/44
17/44
18/44
18/44
18/44
19/44
19/44
20/44A-b A-b A-b
20/44A-b A-b A-b
20/44A-b A-b A-b
21/44A-b A-b A-b
21/44A-b A-b A-b
22/44
22/44
22/44
23/44A-b A-b A-b
23/44A-b A-b A-b
24/44
24/44
24/44
25/44
25/44
25/44
26/44
26/44
26/44
27/44
27/44
27/44
28/44
28/44
29/44A-b A-b
29/44A-b A-b
30/44
30/44
30/44
31/44
31/44
31/44
32/44A-b A-b
32/44A-b A-b
32/44A-b A-b
33/44A-b A-b A-b
33/44A-b A-b A-b
33/44A-b A-b A-b
34/44
34/44
34/44
35/44A-b A-b
35/44A-b A-b
35/44A-b A-b
36/44
36/44
36/44
37/44
37/44
38/44
38/44
38/44
39/44
39/44
39/44
40/44
40/44
40/44
41/44
41/44
41/44
42/44A-b A-b
42/44A-b A-b
42/44A-b A-b
43/44R-b R-b R-b
43/44R-b R-b R-b
43/44R-b R-b R-b
44/44
44/44
44/44

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 16 reviewers.

Read the v1 thread

Cover letter [PATCH 00/44] kernel: Add support for poweroff handler call chain

Various drivers implement architecture and/or device specific means to remove power from the system. For the most part, those drivers set the global variable pm_power_off to point to a function within the driver.

This mechanism has a number of drawbacks. Typically only one means to remove power is supported (at least if pm_power_off is used). At least in theory there can be multiple means to remove power, some of which may be less desirable. For example, one mechanism might power off the entire system through an I/O port or gpio pin, while another might power off a board by disabling its power controller. Other mechanisms may really just execute a restart sequence or drop into the ROM monitor, or put the CPU into sleep mode. Using pm_power_off can also be racy if the function pointer is set from a driver built as module, as the driver may be in the process of being unloaded when pm_power_off is called. If there are multiple poweroff handlers in the system, removing a module with such a handler may inadvertently reset the pointer to pm_power_off to NULL, leaving the system with no means to remove power.

Introduce a system poweroff handler call chain to solve the described problems. This call chain is expected to be executed from the architecture specific machine_power_off() function. Drivers providing system poweroff functionality are expected to register with this call chain. By using the priority field in the notifier block, callers can control poweroff handler execution sequence and thus ensure that the poweroff handler with the optimal capabilities to remove power for a given system is called first.

Patch 01/44 implements the poweroff handler API.

Patches 02/44 to 04/44 are cleanup patches to prepare for the move of pm_power_off to a common location.

Patches 05/44 to 07/44 remove references to pm_power_off from devicetree bindings descriptions.

Patch 08/44 moves the pm_power_off variable from architecture code to kernel/reboot.c.

Patches 09/44 to 30/44 convert various drivers to register with the kernel poweroff handler instead of setting pm_power_off directly.

Patches 31/44 to 42/44 do the same for architecture code.

Patch 43/44 replaces a direct call to pm_power_off from a hwmon driver with a call to kernel_power_off. This patch is part of the series for completeness, but will find its way upstream through the hwmon subsystem.

Patch 44/44 removes pm_power_off.

For the most part, the individual patches include explanations why specific priorities were chosen, at least if the selected priority is not the default priority. Subsystem and architecture maintainers are encouraged to have a look at the selected priorities and suggest improvements.

I ran the final code through my normal build and qemu tests. Results are available at http://server.roeck-us.net:8010/builders in the 'poweroff-handler' column. In addition I build several additional configurations for various architectures.

The series is available in branch poweroff-handler of my repository at
git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git.
It is based on 3.17, with the pending restart handler patches applied.

I got a number of Acks from architecture maintainers as response to the RFC. I did not add those since the architecture code changed, and I did not think it was appropriate to retain the Acks.

A note on timing: My original plan was to submit this series after 3.18-rc1 was released. However, since the commit window will remain open for three weeks, and the series is, for all practical purposes, ready for review, I decided to submit it now. I plan to rebase it to 3.18-rc1 once available and send another version, hopefully including valuable feedback.

Important changes since RFC:
- Move API to new file kernel/power/poweroff_handler.c.
- Move pm_power_off pointer to kernel/power/poweroff_handler.c. Call pm_power_off from do_kernel_poweroff, and only call do_kernel_poweroff from architecture code instead of calling both pm_power_off and do_kernel_poweroff.
- Provide additional API function register_poweroff_handler_simple to simplify conversion of architecture code.
- Provide additional API function have_kernel_poweroff to check if a poweroff handler was installed.
- Convert all drivers and architecture code to use the new API.
- Remove pm_power_off as last patch of the series.

Cc Alexander Graf <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Aurelien Jacquiot <[email protected]>
Cc Benjamin Herrenschmidt <[email protected]>
Cc Boris Ostrovsky <[email protected]>
Cc Catalin Marinas <[email protected]>
Cc Chen Liqin <[email protected]>
Cc Chris Metcalf <[email protected]>
Cc Chris Zankel <[email protected]>
Cc Corey Minyard <[email protected]>
Cc David Howells <[email protected]>
Cc David S. Miller <[email protected]>
Cc David Vrabel <[email protected]>
Cc David Woodhouse <[email protected]>
Cc Dmitry Eremin-Solenikov <[email protected]>
Cc Fenghua Yu <[email protected]>
Cc Geert Uytterhoeven <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Greg Ungerer <[email protected]>
Cc Guan Xuetao <[email protected]>
Cc Haavard Skinnemoen <[email protected]>
Cc Hans-Christian Egtvedt <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc Helge Deller <[email protected]>
Cc Hirokazu Takata <[email protected]>
Cc H. Peter Anvin <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Ivan Kokshaysky <[email protected]>
Cc James E.J. Bottomley <[email protected]>
Cc James Hogan <[email protected]>
Cc Jean Delvare <[email protected]>
Cc Jeff Dike <[email protected]>
Cc Jesper Nilsson <[email protected]>
Cc Jiri Kosina <[email protected]>
Cc Jonas Bonn <[email protected]>
Cc Joshua Thompson <[email protected]>
Cc Julian Andres Klode <[email protected]>
Cc Koichi Yasutake <[email protected]>
Cc Konrad Rzeszutek Wilk <[email protected]>
Cc Lee Jones <[email protected]>
Cc Len Brown <[email protected]>
Cc Len Brown <[email protected]>
Cc Lennox Wu <[email protected]>
Cc Linus Walleij <[email protected]>
Cc Maciej W. Rozycki <[email protected]>
Cc Marc Dietrich <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Mark Salter <[email protected]>
Cc Martin Schwidefsky <[email protected]>
Cc Matt Fleming <[email protected]>
Cc Matt Turner <[email protected]>
Cc Max Filippov <[email protected]>
Cc Michael Ellerman <[email protected]>
Cc Michal Simek <[email protected]>
Cc Mikael Starvik <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Pavel Machek <[email protected]>
Cc Pawel Moll <[email protected]>
Cc Rafael J. Wysocki <[email protected]>
Cc Ralf Baechle <[email protected]>
Cc Richard Henderson <[email protected]>
Cc Richard Kuo <[email protected]>
Cc Richard Weinberger <[email protected]>
Cc Rob Herring <[email protected]>
Cc Romain Perier <[email protected]>
Cc Russell King <[email protected]>
Cc Rusty Russell <[email protected]>
Cc Samuel Ortiz <[email protected]>
Cc Santosh Shilimkar <[email protected]>
Cc Sebastian Reichel <[email protected]>
Cc Steven Miao <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Tony Luck <[email protected]>
Cc Vineet Gupta <[email protected]>
Cc Will Deacon <[email protected]>

----------------------------------------------------------------
Guenter Roeck (44):
kernel: Add support for poweroff handler call chain
memory: emif: Use API function to determine poweroff capability
hibernate: Call have_kernel_poweroff instead of checking pm_power_off
m68k: Replace mach_power_off with pm_power_off
mfd: as3722: Drop reference to pm_power_off from devicetree bindings
gpio-poweroff: Drop reference to pm_power_off from devicetree bindings
qnap-poweroff: Drop reference to pm_power_off from devicetree bindings
kernel: Move pm_power_off to common code
mfd: palmas: Register with kernel poweroff handler
mfd: axp20x: Register with kernel poweroff handler
mfd: retu: Register with kernel poweroff handler
mfd: ab8500-sysctrl: Register with kernel poweroff handler
mfd: max8907: Register with kernel poweroff handler
mfd: tps80031: Register with kernel poweroff handler
mfd: dm355evm_msp: Register with kernel poweroff handler
mfd: tps6586x: Register with kernel poweroff handler
mfd: tps65910: Register with kernel poweroff handler
mfd: twl4030-power: Register with kernel poweroff handler
ipmi: Register with kernel poweroff handler
power/reset: restart-poweroff: Register with kernel poweroff handler power/reset: gpio-poweroff: Register with kernel poweroff handler power/reset: as3722-poweroff: Register with kernel poweroff handler power/reset: qnap-poweroff: Register with kernel poweroff handler power/reset: msm-powroff: Register with kernel poweroff handler power/reset: vexpress-poweroff: Register with kernel poweroff handler
x86: iris: Register with kernel poweroff handler
x86: apm: Register with kernel poweroff handler
x86: olpc: Register xo1 poweroff handler with kernel poweroff handler
staging: nvec: Register with kernel poweroff handler
acpi: Register poweroff handler with kernel poweroff handler
arm: Register with kernel poweroff handler
arm64: psci: Register with kernel poweroff handler
avr32: atngw100: Register with kernel poweroff handler
ia64: Register with kernel poweroff handler
m68k: Register with kernel poweroff handler
mips: Register with kernel poweroff handler
sh: Register with kernel poweroff handler
x86: lguest: Register with kernel poweroff handler
x86: ce4100: Register with kernel poweroff handler
x86: intel-mid: Drop registration of dummy poweroff handlers
x86: pmc_atom: Register poweroff handler with kernel poweroff handler
efi: Register poweroff handler with kernel poweroff handler
hwmon: (ab8500) Call kernel_power_off instead of pm_power_off
kernel: Remove pm_power_off

 .../devicetree/bindings/gpio/gpio-poweroff.txt     |  10 +-
 Documentation/devicetree/bindings/mfd/as3722.txt   |   3 +-
 .../bindings/power_supply/qnap-poweroff.txt        |   4 +-
 arch/alpha/kernel/process.c                        |   9 +-
 arch/arc/kernel/reset.c                            |   5 +-
 arch/arm/kernel/process.c                          |   5 +-
 arch/arm/kernel/psci.c                             |   2 +-
 arch/arm/mach-at91/board-gsia18s.c                 |   2 +-
 arch/arm/mach-at91/setup.c                         |   4 +-
 arch/arm/mach-bcm/board_bcm2835.c                  |   2 +-
 arch/arm/mach-cns3xxx/cns3420vb.c                  |   2 +-
 arch/arm/mach-cns3xxx/core.c                       |   2 +-
 arch/arm/mach-highbank/highbank.c                  |   2 +-
 arch/arm/mach-imx/mach-mx31moboard.c               |   2 +-
 arch/arm/mach-iop32x/em7210.c                      |   2 +-
 arch/arm/mach-iop32x/glantank.c                    |   2 +-
 arch/arm/mach-iop32x/iq31244.c                     |   2 +-
 arch/arm/mach-iop32x/n2100.c                       |   2 +-
 arch/arm/mach-ixp4xx/dsmg600-setup.c               |   2 +-
 arch/arm/mach-ixp4xx/nas100d-setup.c               |   2 +-
 arch/arm/mach-ixp4xx/nslu2-setup.c                 |   2 +-
 arch/arm/mach-omap2/board-omap3touchbook.c         |   2 +-
 arch/arm/mach-orion5x/board-mss2.c                 |   2 +-
 arch/arm/mach-orion5x/dns323-setup.c               |   6 +-
 arch/arm/mach-orion5x/kurobox_pro-setup.c          |   2 +-
 arch/arm/mach-orion5x/ls-chl-setup.c               |   2 +-
 arch/arm/mach-orion5x/ls_hgl-setup.c               |   2 +-
 arch/arm/mach-orion5x/lsmini-setup.c               |   2 +-
 arch/arm/mach-orion5x/mv2120-setup.c               |   2 +-
 arch/arm/mach-orion5x/net2big-setup.c              |   2 +-
 arch/arm/mach-orion5x/terastation_pro2-setup.c     |   2 +-
 arch/arm/mach-orion5x/ts209-setup.c                |   2 +-
 arch/arm/mach-orion5x/ts409-setup.c                |   2 +-
 arch/arm/mach-pxa/corgi.c                          |   2 +-
 arch/arm/mach-pxa/mioa701.c                        |   2 +-
 arch/arm/mach-pxa/poodle.c                         |   2 +-
 arch/arm/mach-pxa/spitz.c                          |   2 +-
 arch/arm/mach-pxa/tosa.c                           |   2 +-
 arch/arm/mach-pxa/viper.c                          |   2 +-
 arch/arm/mach-pxa/z2.c                             |   6 +-
 arch/arm/mach-pxa/zeus.c                           |   6 +-
 arch/arm/mach-s3c24xx/mach-gta02.c                 |   2 +-
 arch/arm/mach-s3c24xx/mach-jive.c                  |   2 +-
 arch/arm/mach-s3c24xx/mach-vr1000.c                |   2 +-
 arch/arm/mach-s3c64xx/mach-smartq.c                |   2 +-
 arch/arm/mach-sa1100/generic.c                     |   2 +-
 arch/arm/mach-sa1100/simpad.c                      |   2 +-
 arch/arm/mach-u300/regulator.c                     |   2 +-
 arch/arm/mach-vt8500/vt8500.c                      |   2 +-
 arch/arm/xen/enlighten.c                           |   2 +-
 arch/arm64/kernel/process.c                        |   5 +-
 arch/arm64/kernel/psci.c                           |   2 +-
 arch/avr32/boards/atngw100/mrmt.c                  |   2 +-
 arch/avr32/kernel/process.c                        |   6 +-
 arch/blackfin/kernel/process.c                     |   3 -
 arch/blackfin/kernel/reboot.c                      |   2 +
 arch/c6x/kernel/process.c                          |   9 +-
 arch/cris/kernel/process.c                         |   4 +-
 arch/frv/kernel/process.c                          |   5 +-
 arch/hexagon/kernel/reset.c                        |   5 +-
 arch/ia64/kernel/process.c                         |   5 +-
 arch/ia64/sn/kernel/setup.c                        |   4 +-
 arch/m32r/kernel/process.c                         |   8 +-
 arch/m68k/emu/natfeat.c                            |   3 +-
 arch/m68k/include/asm/machdep.h                    |   1 -
 arch/m68k/kernel/process.c                         |   7 +-
 arch/m68k/kernel/setup_mm.c                        |   1 -
 arch/m68k/kernel/setup_no.c                        |   1 -
 arch/m68k/mac/config.c                             |   3 +-
 arch/metag/kernel/process.c                        |   6 +-
 arch/microblaze/kernel/process.c                   |   3 -
 arch/microblaze/kernel/reset.c                     |   1 +
 arch/mips/alchemy/board-gpr.c                      |   2 +-
 arch/mips/alchemy/board-mtx1.c                     |   2 +-
 arch/mips/alchemy/board-xxs1500.c                  |   2 +-
 arch/mips/alchemy/devboards/platform.c             |  17 +-
 arch/mips/ar7/setup.c                              |   2 +-
 arch/mips/ath79/setup.c                            |   2 +-
 arch/mips/bcm47xx/setup.c                          |   2 +-
 arch/mips/bcm63xx/setup.c                          |   2 +-
 arch/mips/cobalt/setup.c                           |   2 +-
 arch/mips/dec/setup.c                              |   2 +-
 arch/mips/emma/markeins/setup.c                    |   2 +-
 arch/mips/jz4740/reset.c                           |   2 +-
 arch/mips/kernel/reset.c                           |   6 +-
 arch/mips/lantiq/falcon/reset.c                    |   2 +-
 arch/mips/lantiq/xway/reset.c                      |   2 +-
 arch/mips/lasat/reset.c                            |   2 +-
 arch/mips/loongson/common/reset.c                  |   2 +-
 arch/mips/loongson1/common/reset.c                 |   2 +-
 arch/mips/mti-malta/malta-reset.c                  |   2 +-
 arch/mips/mti-sead3/sead3-reset.c                  |   2 +-
 arch/mips/netlogic/xlp/setup.c                     |   2 +-
 arch/mips/netlogic/xlr/setup.c                     |   2 +-
 arch/mips/pmcs-msp71xx/msp_setup.c                 |   2 +-
 arch/mips/pnx833x/common/setup.c                   |   2 +-
 arch/mips/ralink/reset.c                           |   2 +-
 arch/mips/rb532/setup.c                            |   2 +-
 arch/mips/sgi-ip22/ip22-reset.c                    |   2 +-
 arch/mips/sgi-ip27/ip27-reset.c                    |   2 +-
 arch/mips/sgi-ip32/ip32-reset.c                    |   2 +-
 arch/mips/sibyte/common/cfe.c                      |   2 +-
 arch/mips/sni/setup.c                              |   2 +-
 arch/mips/txx9/generic/setup.c                     |   2 +-
 arch/mips/vr41xx/common/pmu.c                      |   2 +-
 arch/mn10300/kernel/process.c                      |   8 +-
 arch/openrisc/kernel/process.c                     |   8 +-
 arch/parisc/kernel/process.c                       |   8 +-
 arch/powerpc/kernel/setup-common.c                 |   6 +-
 arch/s390/kernel/setup.c                           |   8 +-
 arch/score/kernel/process.c                        |   8 +-
 arch/sh/boards/board-sh7785lcr.c                   |   2 +-
 arch/sh/boards/board-urquell.c                     |   2 +-
 arch/sh/boards/mach-highlander/setup.c             |   2 +-
 arch/sh/boards/mach-landisk/setup.c                |   2 +-
 arch/sh/boards/mach-r2d/setup.c                    |   2 +-
 arch/sh/boards/mach-sdk7786/setup.c                |   2 +-
 arch/sh/kernel/reboot.c                            |   6 +-
 arch/sparc/kernel/process_32.c                     |  10 +-
 arch/sparc/kernel/reboot.c                         |   8 +-
 arch/tile/kernel/reboot.c                          |   7 +-
 arch/um/kernel/reboot.c                            |   2 -
 arch/unicore32/kernel/process.c                    |   9 +-
 arch/x86/kernel/apm_32.c                           |  20 ++-
 arch/x86/kernel/pmc_atom.c                         |  20 ++-
 arch/x86/kernel/reboot.c                           |  11 +-
 arch/x86/lguest/boot.c                             |   2 +-
 arch/x86/platform/ce4100/ce4100.c                  |   2 +-
 arch/x86/platform/intel-mid/intel-mid.c            |   5 -
 arch/x86/platform/intel-mid/mfld.c                 |   5 -
 arch/x86/platform/iris/iris.c                      |  25 ++-
 arch/x86/platform/olpc/olpc-xo1-pm.c               |  20 ++-
 arch/x86/xen/enlighten.c                           |   3 +-
 arch/xtensa/kernel/process.c                       |   4 -
 drivers/acpi/sleep.c                               |  15 +-
 drivers/char/ipmi/ipmi_poweroff.c                  |  30 ++--
 drivers/firmware/efi/reboot.c                      |  23 ++-
 drivers/hwmon/ab8500.c                             |   5 +-
 drivers/memory/emif.c                              |   4 +-
 drivers/mfd/ab8500-sysctrl.c                       |  26 ++--
 drivers/mfd/axp20x.c                               |  30 ++--
 drivers/mfd/dm355evm_msp.c                         |  18 ++-
 drivers/mfd/max8907.c                              |  24 ++-
 drivers/mfd/palmas.c                               |  30 ++--
 drivers/mfd/retu-mfd.c                             |  33 ++--
 drivers/mfd/tps6586x.c                             |  31 +++-
 drivers/mfd/tps65910.c                             |  27 ++--
 drivers/mfd/tps80031.c                             |  30 ++--
 drivers/mfd/twl4030-power.c                        |  25 ++-
 drivers/parisc/power.c                             |   3 +-
 drivers/power/reset/as3722-poweroff.c              |  36 +++--
 drivers/power/reset/gpio-poweroff.c                |  36 ++---
 drivers/power/reset/msm-poweroff.c                 |  13 +-
 drivers/power/reset/qnap-poweroff.c                |  28 ++--
 drivers/power/reset/restart-poweroff.c             |  25 ++-
 drivers/power/reset/vexpress-poweroff.c            |  19 ++-
 drivers/staging/nvec/nvec.c                        |  24 +--
 drivers/staging/nvec/nvec.h                        |   2 +
 include/linux/i2c/twl.h                            |   1 -
 include/linux/mfd/axp20x.h                         |   1 +
 include/linux/mfd/max8907.h                        |   2 +
 include/linux/mfd/palmas.h                         |   3 +
 include/linux/mfd/tps65910.h                       |   3 +
 include/linux/mfd/tps80031.h                       |   2 +
 include/linux/pm.h                                 |  14 +-
 kernel/power/Makefile                              |   1 +
 kernel/power/hibernate.c                           |   2 +-
 kernel/power/poweroff_handler.c                    | 173 +++++++++++++++++++++
 kernel/reboot.c                                    |   4 +-
 169 files changed, 794 insertions(+), 475 deletions(-)
 create mode 100644 kernel/power/poweroff_handler.c