]> err.no Git - linux-2.6/blobdiff - arch/i386/mach-voyager/voyager_basic.c
[PATCH] x86: more asm cleanups
[linux-2.6] / arch / i386 / mach-voyager / voyager_basic.c
index 3e439ce5e1b22e47daa3f6285977d2958222299a..cc69875d979b9445b3ebcc0549906656ee3f2767 100644 (file)
@@ -36,6 +36,7 @@
  * Power off function, if any
  */
 void (*pm_power_off)(void);
+EXPORT_SYMBOL(pm_power_off);
 
 int voyager_level = 0;
 
@@ -233,10 +234,9 @@ voyager_power_off(void)
 #endif
        }
        /* and wait for it to happen */
-       for(;;) {
-               __asm("cli");
-               __asm("hlt");
-       }
+       local_irq_disable();
+       for(;;)
+               halt();
 }
 
 /* copied from process.c */
@@ -250,6 +250,12 @@ kb_wait(void)
                        break;
 }
 
+void
+machine_shutdown(void)
+{
+       /* Architecture specific shutdown needed before a kexec */
+}
+
 void
 machine_restart(char *cmd)
 {
@@ -271,13 +277,17 @@ machine_restart(char *cmd)
                outb(basebd | 0x08, VOYAGER_MC_SETUP);
                outb(0x02, catbase + 0x21);
        }
-       for(;;) {
-               asm("cli");
-               asm("hlt");
-       }
+       local_irq_disable();
+       for(;;)
+               halt();
 }
 
-EXPORT_SYMBOL(machine_restart);
+void
+machine_emergency_restart(void)
+{
+       /*for now, just hook this to a warm restart */
+       machine_restart(NULL);
+}
 
 void
 mca_nmi_hook(void)
@@ -314,12 +324,9 @@ machine_halt(void)
        machine_power_off();
 }
 
-EXPORT_SYMBOL(machine_halt);
-
 void machine_power_off(void)
 {
        if (pm_power_off)
                pm_power_off();
 }
 
-EXPORT_SYMBOL(machine_power_off);