X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fi386%2Fmach-voyager%2Fvoyager_basic.c;h=b584060ec004da766c024771b8af916e8d3dc702;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=602aea240e9b55f67b5d1b4b7daf1f4a04b1e405;hpb=cee37fe97739d85991964371c1f3a745c00dd236;p=linux-2.6.git diff --git a/arch/i386/mach-voyager/voyager_basic.c b/arch/i386/mach-voyager/voyager_basic.c index 602aea240..b584060ec 100644 --- a/arch/i386/mach-voyager/voyager_basic.c +++ b/arch/i386/mach-voyager/voyager_basic.c @@ -23,18 +23,21 @@ #include #include #include +#include +#include #include #include #include #include -#include #include #include +#include /* * Power off function, if any */ void (*pm_power_off)(void); +EXPORT_SYMBOL(pm_power_off); int voyager_level = 0; @@ -182,7 +185,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); @@ -233,10 +235,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 +251,12 @@ kb_wait(void) break; } +void +machine_shutdown(void) +{ + /* Architecture specific shutdown needed before a kexec */ +} + void machine_restart(char *cmd) { @@ -271,13 +278,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 +325,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);