]> git.hungrycats.org Git - linux/commitdiff
PPC32: convert some more save_flags/cli/restore_flags etc. calls.
authorPaul Mackerras <paulus@samba.org>
Tue, 6 Aug 2002 07:36:02 +0000 (17:36 +1000)
committerPaul Mackerras <paulus@samba.org>
Tue, 6 Aug 2002 07:36:02 +0000 (17:36 +1000)
arch/ppc/platforms/apus_setup.c
arch/ppc/platforms/pplus_setup.c
arch/ppc/platforms/prep_setup.c

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