Commit 45450bff authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Linus Torvalds

[PATCH] Sun-3x core local_irq*() updates

Convert core Sun-3x code to new local_irq*() framework
parent 5e3823ac
...@@ -37,9 +37,9 @@ extern e_vector vectors[256]; /* arch/m68k/kernel/traps.c */ ...@@ -37,9 +37,9 @@ extern e_vector vectors[256]; /* arch/m68k/kernel/traps.c */
void sun3x_halt(void) void sun3x_halt(void)
{ {
unsigned long flags; unsigned long flags;
/* Disable interrupts while we mess with things */ /* Disable interrupts while we mess with things */
save_flags(flags); cli(); local_irq_save(flags);
/* Restore prom vbr */ /* Restore prom vbr */
__asm__ volatile ("movec %0,%%vbr" : : "r" ((void*)sun3x_prom_vbr)); __asm__ volatile ("movec %0,%%vbr" : : "r" ((void*)sun3x_prom_vbr));
...@@ -56,13 +56,13 @@ void sun3x_halt(void) ...@@ -56,13 +56,13 @@ void sun3x_halt(void)
sun3_enable_irq(5); sun3_enable_irq(5);
__asm__ volatile ("movec %0,%%vbr" : : "r" ((void*)vectors)); __asm__ volatile ("movec %0,%%vbr" : : "r" ((void*)vectors));
restore_flags(flags); local_irq_restore(flags);
} }
void sun3x_reboot(void) void sun3x_reboot(void)
{ {
/* This never returns, don't bother saving things */ /* This never returns, don't bother saving things */
cli(); local_irq_disable();
/* Restore prom vbr */ /* Restore prom vbr */
__asm__ volatile ("movec %0,%%vbr" : : "r" ((void*)sun3x_prom_vbr)); __asm__ volatile ("movec %0,%%vbr" : : "r" ((void*)sun3x_prom_vbr));
......
...@@ -45,7 +45,7 @@ int sun3x_hwclk(int set, struct rtc_time *t) ...@@ -45,7 +45,7 @@ int sun3x_hwclk(int set, struct rtc_time *t)
(struct mostek_dt *)(SUN3X_EEPROM+M_CONTROL); (struct mostek_dt *)(SUN3X_EEPROM+M_CONTROL);
unsigned long flags; unsigned long flags;
save_and_cli(flags); local_irq_save(flags);
if(set) { if(set) {
h->csr |= C_WRITE; h->csr |= C_WRITE;
...@@ -69,7 +69,7 @@ int sun3x_hwclk(int set, struct rtc_time *t) ...@@ -69,7 +69,7 @@ int sun3x_hwclk(int set, struct rtc_time *t)
h->csr &= ~C_READ; h->csr &= ~C_READ;
} }
restore_flags(flags); local_irq_restore(flags);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment