X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fi386%2Fmach-voyager%2Fvoyager_basic.c;h=80b7f2fc4f46ac9038128f852ad11d3e67ad3b03;hb=16c70f8c1b54b61c3b951b6fb220df250fe09b32;hp=61a481423cb94172d56b43cdad1cc3edffc996b5;hpb=9bf4aaab3e101692164d49b7ca357651eb691cb6;p=linux-2.6.git diff --git a/arch/i386/mach-voyager/voyager_basic.c b/arch/i386/mach-voyager/voyager_basic.c index 61a481423..80b7f2fc4 100644 --- a/arch/i386/mach-voyager/voyager_basic.c +++ b/arch/i386/mach-voyager/voyager_basic.c @@ -12,7 +12,6 @@ * voyager_smp.c - Voyager SMP hal (emulates linux smp.c) */ -#include #include #include #include @@ -23,20 +22,21 @@ #include #include #include +#include +#include #include #include #include #include -#include #include #include +#include /* * Power off function, if any */ void (*pm_power_off)(void); - -int reboot_thru_bios; +EXPORT_SYMBOL(pm_power_off); int voyager_level = 0; @@ -53,7 +53,7 @@ voyager_dump(int dummy1, struct pt_regs *dummy2, struct tty_struct *dummy3) static struct sysrq_key_op sysrq_voyager_dump_op = { .handler = voyager_dump, .help_msg = "Voyager", - .action_msg = "Dump Voyager Status\n", + .action_msg = "Dump Voyager Status", }; #endif @@ -184,7 +184,6 @@ voyager_timer_interrupt(struct pt_regs *regs) * and swiftly introduce it to something sharp and * pointy. */ __u16 val; - extern spinlock_t i8253_lock; spin_lock(&i8253_lock); @@ -235,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 */ @@ -252,6 +250,12 @@ kb_wait(void) break; } +void +machine_shutdown(void) +{ + /* Architecture specific shutdown needed before a kexec */ +} + void machine_restart(char *cmd) { @@ -273,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) @@ -316,12 +324,8 @@ 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);