[PATCH] ppc64: do not return from maple halt, power off, restart

Frank Rowand frowand at mvista.com
Sat Jun 4 09:34:41 EST 2005


The Maple board currently returns from a request to halt, power off, or
restart.  This patch causes all processors to instead spin in these cases
so that the system appears to have halted.

This patch applies against linux-2.6.12-rc5.

Signed-off-by: Frank Rowand <frowand at mvista.com>

Index: linux-2.6.10/arch/ppc64/kernel/maple_setup.c
===================================================================
--- linux-2.6.10.orig/arch/ppc64/kernel/maple_setup.c
+++ linux-2.6.10/arch/ppc64/kernel/maple_setup.c
@@ -81,14 +81,32 @@ extern void add_kgdb_port(void);
 
 static void maple_restart(char *cmd)
 {
+#ifdef CONFIG_SMP
+	smp_send_stop();
+#endif
+	printk(KERN_EMERG "System Halted, OK to turn off power\n");
+	local_irq_disable();
+	while (1) ;
 }
 
 static void maple_power_off(void)
 {
+#ifdef CONFIG_SMP
+	smp_send_stop();
+#endif
+	printk(KERN_EMERG "System Halted, OK to turn off power\n");
+	local_irq_disable();
+	while (1) ;
 }
 
 static void maple_halt(void)
 {
+#ifdef CONFIG_SMP
+	smp_send_stop();
+#endif
+	printk(KERN_EMERG "System Halted, OK to turn off power\n");
+	local_irq_disable();
+	while (1) ;
 }
 
 #ifdef CONFIG_SMP



More information about the Linuxppc64-dev mailing list