[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Why halt does reboot?



take a look at the kill_arch() function for that machine class, in
arch/alpha/kernel/sys_*.c. you probably need to do something like the patch
i've attached for miatas (which is in alan's 2.4 tree).

On Wed, May 16, 2001 at 02:47:50PM +0200, Francesco P. Lovergine wrote:
> Just installed 2.2r2 on a Alphastation 500. 
> This is a trial for a successive installation of a beowulf cluster.
> The problem is: halt instruction does reboot the machine instead of 
> stopping it. Boot is done by aboot and SRM is the eprom monitor.
> Kernel is 2.2.18pre17.

-- 
Tom Vier <tmv5@home.com>
DSA Key id 0x27371A2C
--- linux-2.4.4-ac4-patched-build/arch/alpha/kernel/sys_miata.c-orig	Fri May  4 17:47:29 2001
+++ linux-2.4.4-ac4-patched-build/arch/alpha/kernel/sys_miata.c	Fri May  4 17:55:54 2001
@@ -14,6 +14,7 @@
 #include <linux/sched.h>
 #include <linux/pci.h>
 #include <linux/init.h>
+#include <linux/reboot.h>
 
 #include <asm/ptrace.h>
 #include <asm/system.h>
@@ -223,11 +224,21 @@
 static void
 miata_kill_arch(int mode)
 {
-	/* Who said DEC engineers have no sense of humor? ;-)  */
-	if (alpha_using_srm) {
-		*(vuip) PYXIS_RESET = 0x0000dead;
-		mb();
+	switch(mode) {
+	case LINUX_REBOOT_CMD_RESTART:
+		/* Who said DEC engineers have no sense of humor? ;-)  */ 
+		if (alpha_using_srm) {
+			*(vuip) PYXIS_RESET = 0x0000dead; 
+			mb(); 
+		}
+		break;
+	case LINUX_REBOOT_CMD_HALT:
+		break;
+	case LINUX_REBOOT_CMD_POWER_OFF:
+		break;
 	}
+
+	halt();
 }
 
 

Reply to: