Commit 58ee5199 authored by Paul Mackerras's avatar Paul Mackerras

PPC32: convert some more save_flags/cli/restore_flags etc. calls.

parent 547ef85e
...@@ -602,8 +602,7 @@ int __debug_serinit( void ) ...@@ -602,8 +602,7 @@ int __debug_serinit( void )
{ {
unsigned long flags; unsigned long flags;
save_flags (flags); local_irq_save(flags);
cli();
/* turn off Rx and Tx interrupts */ /* turn off Rx and Tx interrupts */
custom.intena = IF_RBF | IF_TBE; custom.intena = IF_RBF | IF_TBE;
...@@ -611,7 +610,7 @@ int __debug_serinit( void ) ...@@ -611,7 +610,7 @@ int __debug_serinit( void )
/* clear any pending interrupt */ /* clear any pending interrupt */
custom.intreq = IF_RBF | IF_TBE; custom.intreq = IF_RBF | IF_TBE;
restore_flags (flags); local_irq_restore(flags);
/* /*
* set the appropriate directions for the modem control flags, * set the appropriate directions for the modem control flags,
......
...@@ -191,11 +191,8 @@ pplus_restart(char *cmd) ...@@ -191,11 +191,8 @@ pplus_restart(char *cmd)
static void static void
pplus_halt(void) pplus_halt(void)
{ {
unsigned long flags;
local_irq_disable();
/* set exception prefix high - to the prom */ /* set exception prefix high - to the prom */
save_flags( flags ); _nmask_and_or_msr(MSR_EE, MSR_IP);
restore_flags( flags|MSR_IP );
/* make sure bit 0 (reset) is a 0 */ /* make sure bit 0 (reset) is a 0 */
outb( inb(0x92) & ~1L , 0x92 ); outb( inb(0x92) & ~1L , 0x92 );
......
...@@ -458,10 +458,6 @@ prep_calibrate_decr(void) ...@@ -458,10 +458,6 @@ prep_calibrate_decr(void)
/* If we didn't get it from the residual data, try this. */ /* If we didn't get it from the residual data, try this. */
if ( res ) { if ( res ) {
unsigned long flags;
save_flags(flags);
#define TIMER0_COUNT 0x40 #define TIMER0_COUNT 0x40
#define TIMER_CONTROL 0x43 #define TIMER_CONTROL 0x43
/* set timer to periodic mode */ /* set timer to periodic mode */
...@@ -476,7 +472,7 @@ prep_calibrate_decr(void) ...@@ -476,7 +472,7 @@ prep_calibrate_decr(void)
/* wait for calibrate */ /* wait for calibrate */
while ( calibrate_steps ) while ( calibrate_steps )
; ;
restore_flags(flags); local_irq_disable();
free_irq( 0, NULL); free_irq( 0, NULL);
} }
} }
...@@ -581,11 +577,8 @@ prep_restart(char *cmd) ...@@ -581,11 +577,8 @@ prep_restart(char *cmd)
static void __prep static void __prep
prep_halt(void) prep_halt(void)
{ {
unsigned long flags;
local_irq_disable();
/* set exception prefix high - to the prom */ /* set exception prefix high - to the prom */
save_flags( flags ); _nmask_and_or_msr(MSR_EE, MSR_IP);
restore_flags( flags|MSR_IP );
/* make sure bit 0 (reset) is a 0 */ /* make sure bit 0 (reset) is a 0 */
outb( inb(0x92) & ~1L , 0x92 ); outb( inb(0x92) & ~1L , 0x92 );
...@@ -648,11 +641,8 @@ static void __prep ...@@ -648,11 +641,8 @@ static void __prep
prep_power_off(void) prep_power_off(void)
{ {
if ( _prep_type == _PREP_IBM) { if ( _prep_type == _PREP_IBM) {
unsigned long flags;
local_irq_disable();
/* set exception prefix high - to the prom */ /* set exception prefix high - to the prom */
save_flags( flags ); _nmask_and_or_msr(MSR_EE, MSR_IP);
restore_flags( flags|MSR_IP );
utah_sig87c750_setbit(21, 5, 1); /* set bit 21.5, "PMEXEC_OFF" */ utah_sig87c750_setbit(21, 5, 1); /* set bit 21.5, "PMEXEC_OFF" */
......
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