diff -uNr linux-2.6.8-rc1-eb1/arch/i386/kernel/apic.c linux-2.6.8-rc1-reboot-on-bsp/arch/i386/kernel/apic.c
--- linux-2.6.8-rc1-eb1/arch/i386/kernel/apic.c	Wed Jul 14 19:29:21 2004
+++ linux-2.6.8-rc1-reboot-on-bsp/arch/i386/kernel/apic.c	Wed Jul 14 19:32:04 2004
@@ -26,6 +26,7 @@
 #include <linux/mc146818rtc.h>
 #include <linux/kernel_stat.h>
 #include <linux/sysdev.h>
+#include <linux/reboot.h>
 
 #include <asm/atomic.h>
 #include <asm/smp.h>
@@ -1193,6 +1194,28 @@
 	printk (KERN_INFO "APIC error on CPU%d: %02lx(%02lx)\n",
 	        smp_processor_id(), v , v1);
 	irq_exit();
+}
+
+void stop_apics(void)
+{
+	/* By resetting the APIC's we disable the nmi watchdog */
+#if CONFIG_SMP
+	/*
+	 * Stop all CPUs and turn off local APICs and the IO-APIC, so
+	 * other OSs see a clean IRQ state.
+	 */
+	smp_send_stop();
+#else
+	if (cpu_has_apic) {
+		local_irq_disable();
+		disable_local_APIC();
+		local_irq_enable();
+	}
+#endif
+#if defined(CONFIG_X86_IO_APIC)
+	disable_IO_APIC();
+#endif
+	disconnect_bsp_APIC();
 }
 
 /*
diff -uNr linux-2.6.8-rc1-eb1/arch/i386/kernel/io_apic.c linux-2.6.8-rc1-reboot-on-bsp/arch/i386/kernel/io_apic.c
--- linux-2.6.8-rc1-eb1/arch/i386/kernel/io_apic.c	Wed Jul 14 19:27:50 2004
+++ linux-2.6.8-rc1-reboot-on-bsp/arch/i386/kernel/io_apic.c	Wed Jul 14 19:32:04 2004
@@ -1608,8 +1608,6 @@
 	 * Clear the IO-APIC before rebooting:
 	 */
 	clear_IO_APIC();
-
-	disconnect_bsp_APIC();
 }
 
 /*
diff -uNr linux-2.6.8-rc1-eb1/arch/i386/kernel/reboot.c linux-2.6.8-rc1-reboot-on-bsp/arch/i386/kernel/reboot.c
--- linux-2.6.8-rc1-eb1/arch/i386/kernel/reboot.c	Wed Jul 14 19:27:50 2004
+++ linux-2.6.8-rc1-reboot-on-bsp/arch/i386/kernel/reboot.c	Wed Jul 14 19:32:04 2004
@@ -23,8 +23,7 @@
 int reboot_thru_bios;
 
 #ifdef CONFIG_SMP
-int reboot_smp = 0;
-static int reboot_cpu = -1;
+int reboot_cpu = -1;	  /* specifies the internal linux cpu id, not the apicid */
 /* shamelessly grabbed from lib/vsprintf.c for readability */
 #define is_digit(c)	((c) >= '0' && (c) <= '9')
 #endif
@@ -46,7 +45,6 @@
 			break;
 #ifdef CONFIG_SMP
 		case 's': /* "smp" reboot by executing reset on BSP or other CPU*/
-			reboot_smp = 1;
 			if (is_digit(*(str+1))) {
 				reboot_cpu = (int) (*(str+1) - '0');
 				if (is_digit(*(str+2))) 
@@ -85,33 +83,9 @@
 	return 0;
 }
 
-/*
- * Some machines require the "reboot=s"  commandline option, this quirk makes that automatic.
- */
-static int __init set_smp_reboot(struct dmi_system_id *d)
-{
-#ifdef CONFIG_SMP
-	if (!reboot_smp) {
-		reboot_smp = 1;
-		printk(KERN_INFO "%s series board detected. Selecting SMP-method for reboots.\n", d->ident);
-	}
-#endif
-	return 0;
-}
-
-/*
- * Some machines require the "reboot=b,s"  commandline option, this quirk makes that automatic.
- */
-static int __init set_smp_bios_reboot(struct dmi_system_id *d)
-{
-	set_smp_reboot(d);
-	set_bios_reboot(d);
-	return 0;
-}
-
 static struct dmi_system_id __initdata reboot_dmi_table[] = {
 	{	/* Handle problems with rebooting on Dell 1300's */
-		.callback = set_smp_bios_reboot,
+		.callback = set_bios_reboot,
 		.ident = "Dell PowerEdge 1300",
 		.matches = {
 			DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"),
@@ -297,50 +271,7 @@
 
 void machine_restart(char * __unused)
 {
-#ifdef CONFIG_SMP
-	int cpuid;
-	
-	cpuid = GET_APIC_ID(apic_read(APIC_ID));
-
-	if (reboot_smp) {
-
-		/* check to see if reboot_cpu is valid 
-		   if its not, default to the BSP */
-		if ((reboot_cpu == -1) ||  
-		      (reboot_cpu > (NR_CPUS -1))  || 
-		      !physid_isset(cpuid, phys_cpu_present_map))
-			reboot_cpu = boot_cpu_physical_apicid;
-
-		reboot_smp = 0;  /* use this as a flag to only go through this once*/
-		/* re-run this function on the other CPUs
-		   it will fall though this section since we have 
-		   cleared reboot_smp, and do the reboot if it is the
-		   correct CPU, otherwise it halts. */
-		if (reboot_cpu != cpuid)
-			smp_call_function((void *)machine_restart , NULL, 1, 0);
-	}
-
-	/* if reboot_cpu is still -1, then we want a tradional reboot, 
-	   and if we are not running on the reboot_cpu,, halt */
-	if ((reboot_cpu != -1) && (cpuid != reboot_cpu)) {
-		for (;;)
-		__asm__ __volatile__ ("hlt");
-	}
-	/*
-	 * Stop all CPUs and turn off local APICs and the IO-APIC, so
-	 * other OSs see a clean IRQ state.
-	 */
-	smp_send_stop();
-#elif defined(CONFIG_X86_LOCAL_APIC)
-	if (cpu_has_apic) {
-		local_irq_disable();
-		disable_local_APIC();
-		local_irq_enable();
-	}
-#endif
-#ifdef CONFIG_X86_IO_APIC
-	disable_IO_APIC();
-#endif
+	stop_apics();
 
 	if (!reboot_thru_bios) {
 		if (efi_enabled) {
diff -uNr linux-2.6.8-rc1-eb1/arch/i386/kernel/smp.c linux-2.6.8-rc1-reboot-on-bsp/arch/i386/kernel/smp.c
--- linux-2.6.8-rc1-eb1/arch/i386/kernel/smp.c	Wed Jul 14 19:27:50 2004
+++ linux-2.6.8-rc1-reboot-on-bsp/arch/i386/kernel/smp.c	Wed Jul 14 19:33:39 2004
@@ -566,6 +566,30 @@
 
 void smp_send_stop(void)
 {
+	extern int reboot_cpu;
+	int reboot_cpu_id;
+
+	/* The boot cpu is always logical cpu 0 */
+	reboot_cpu_id = 0;
+
+	/* See if there has been give a command line override.
+	 */
+	if ((reboot_cpu != -1) && !(reboot_cpu >= NR_CPUS) &&
+		cpu_isset(reboot_cpu, cpu_online_map)) {
+		reboot_cpu_id = reboot_cpu;
+	}
+
+	/* Make certain the the cpu I'm rebooting on is online */
+	if (!cpu_isset(reboot_cpu_id, cpu_online_map)) {
+		reboot_cpu_id = smp_processor_id();
+	}
+
+	/* Make certain I only run on the appropriate processor */
+	set_cpus_allowed(current, cpumask_of_cpu(reboot_cpu_id));
+
+	/* O.K. Now that I'm on the appropriate processor, stop
+	 * all of the others.
+	 */
 	smp_call_function(stop_this_cpu, NULL, 1, 0);
 
 	local_irq_disable();
diff -uNr linux-2.6.8-rc1-eb1/include/asm-i386/apic.h linux-2.6.8-rc1-reboot-on-bsp/include/asm-i386/apic.h
--- linux-2.6.8-rc1-eb1/include/asm-i386/apic.h	Wed Jul 14 19:28:11 2004
+++ linux-2.6.8-rc1-reboot-on-bsp/include/asm-i386/apic.h	Wed Jul 14 19:32:04 2004
@@ -101,6 +101,9 @@
 #define NMI_LOCAL_APIC	2
 #define NMI_INVALID	3
 
+extern void stop_apics(void);
+#else
+static inline void stop_apics(void) { }
 #endif /* CONFIG_X86_LOCAL_APIC */
 
 #endif /* __ASM_APIC_H */
