Skip to contentSkip to conversation

CONFIG_PM for ppc64, to allow sysrq o

PATCH In review Olaf Hering 2 participants 3 messages Mar 15, 2005 – Mar 16, 2005

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 CONFIG_PM for ppc64, to allow sysrq o

For some weird reason, sysrq o is hidden behind CONFIG_PM. Why? One can power off just fine without that. Can pm_sysrq_init be moved to a better place? I think it used to be in sysrq.c in 2.4.

Too bad, with this patch radeonfb fails to compile.

arch/ppc64/Kconfig +2 -0
Index: linux-2.6.11-olh/arch/ppc64/Kconfig
===================================================================
@@ -350,6 +350,8 @@ config CMDLINE
 
 endmenu
 
+source "kernel/power/Kconfig"
+
 source "drivers/Kconfig"
 
 source "fs/Kconfig"
#1 lore raw
Quoted 6 lines · Olaf Hering

For some weird reason, sysrq o is hidden behind CONFIG_PM. Why? One can power off just fine without that. Can pm_sysrq_init be moved to a better place? I think it used to be in sysrq.c in 2.4.

Too bad, with this patch radeonfb fails to compile.

After disabling radeon and this additional change, sysrq o powers off. Just dont type too fast over hvc (ctrl o o) ;)

arch/ppc64/kernel/setup.c +3 -0
Index: linux-2.6.11-olh/arch/ppc64/kernel/setup.c
===================================================================
@@ -31,6 +31,7 @@
 #include <linux/unistd.h>
 #include <linux/serial.h>
 #include <linux/serial_8250.h>
+#include <linux/pm.h>
 #include <asm/io.h>
 #include <asm/prom.h>
 #include <asm/processor.h>
@@ -710,6 +711,8 @@ void machine_halt(void)
 
 EXPORT_SYMBOL(machine_halt);
 
+void (*pm_power_off)(void) = machine_power_off;
+
 unsigned long ppc_proc_freq;
 unsigned long ppc_tb_freq;
 
#2 lore raw
In reply to Olaf Hering
Quoted 5 lines · Olaf Hering

For some weird reason, sysrq o is hidden behind CONFIG_PM. Why? One can power off just fine without that. Can pm_sysrq_init be moved to a better place? I think it used to be in sysrq.c in 2.4.

Too bad, with this patch radeonfb fails to compile.

Hehe :)

ppc64 isn't yet ready for CONFIG_PM, though I have some hacks-in-progress ...

Ben.