[PATCH] ppc32: Removed non-inlined versions of local_irq* functions
authorKumar Gala <galak@freescale.com>
Fri, 16 Sep 2005 16:37:33 +0000 (11:37 -0500)
committerPaul Mackerras <paulus@samba.org>
Sun, 18 Sep 2005 23:38:49 +0000 (09:38 +1000)
We always use the inlined versions of local_irq_enable, local_irq_disable,
local_save_flags_ptr, and local_irq_restore on ppc32 so the non-inlined
versions where just taking up space.

Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/ppc/kernel/misc.S
arch/ppc/kernel/ppc_ksyms.c
include/asm-ppc/hw_irq.h

index 90d917d2e856fed7cb98517643fcd9827ec9b5f6..9d2cb79475c60db2b3510bc6f1112efd071343f7 100644 (file)
@@ -273,134 +273,6 @@ _GLOBAL(low_choose_7447a_dfs)
 
 #endif /* CONFIG_CPU_FREQ_PMAC && CONFIG_6xx */
 
-/* void local_save_flags_ptr(unsigned long *flags) */
-_GLOBAL(local_save_flags_ptr)
-       mfmsr   r4
-       stw     r4,0(r3)
-       blr
-       /*
-        * Need these nops here for taking over save/restore to
-        * handle lost intrs
-        * -- Cort
-        */
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-_GLOBAL(local_save_flags_ptr_end)
-
-/* void local_irq_restore(unsigned long flags) */
-_GLOBAL(local_irq_restore)
-/*
- * Just set/clear the MSR_EE bit through restore/flags but do not
- * change anything else.  This is needed by the RT system and makes
- * sense anyway.
- *    -- Cort
- */
-       mfmsr   r4
-       /* Copy all except the MSR_EE bit from r4 (current MSR value)
-          to r3.  This is the sort of thing the rlwimi instruction is
-          designed for.  -- paulus. */
-       rlwimi  r3,r4,0,17,15
-        /* Check if things are setup the way we want _already_. */
-       cmpw    0,r3,r4
-       beqlr
-1:     SYNC
-       mtmsr   r3
-       SYNC
-       blr
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-_GLOBAL(local_irq_restore_end)
-
-_GLOBAL(local_irq_disable)
-       mfmsr   r0              /* Get current interrupt state */
-       rlwinm  r3,r0,16+1,32-1,31      /* Extract old value of 'EE' */
-       rlwinm  r0,r0,0,17,15   /* clear MSR_EE in r0 */
-       SYNC                    /* Some chip revs have problems here... */
-       mtmsr   r0              /* Update machine state */
-       blr                     /* Done */
-       /*
-        * Need these nops here for taking over save/restore to
-        * handle lost intrs
-        * -- Cort
-        */
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-_GLOBAL(local_irq_disable_end)
-
-_GLOBAL(local_irq_enable)
-       mfmsr   r3              /* Get current state */
-       ori     r3,r3,MSR_EE    /* Turn on 'EE' bit */
-       SYNC                    /* Some chip revs have problems here... */
-       mtmsr   r3              /* Update machine state */
-       blr
-       /*
-        * Need these nops here for taking over save/restore to
-        * handle lost intrs
-        * -- Cort
-        */
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-       nop
-_GLOBAL(local_irq_enable_end)
-
 /*
  * complement mask on the msr then "or" some values on.
  *     _nmask_and_or_msr(nmask, value_to_or)
index 88f6bb7b6964ec6ab8ee47c8ab6e0bce7a1cc19b..1545621d44d2d151387446836461fbd4b9990909 100644 (file)
@@ -272,16 +272,6 @@ EXPORT_SYMBOL(screen_info);
 #endif
 
 EXPORT_SYMBOL(__delay);
-#ifndef INLINE_IRQS
-EXPORT_SYMBOL(local_irq_enable);
-EXPORT_SYMBOL(local_irq_enable_end);
-EXPORT_SYMBOL(local_irq_disable);
-EXPORT_SYMBOL(local_irq_disable_end);
-EXPORT_SYMBOL(local_save_flags_ptr);
-EXPORT_SYMBOL(local_save_flags_ptr_end);
-EXPORT_SYMBOL(local_irq_restore);
-EXPORT_SYMBOL(local_irq_restore_end);
-#endif
 EXPORT_SYMBOL(timer_interrupt);
 EXPORT_SYMBOL(irq_desc);
 EXPORT_SYMBOL(tb_ticks_per_jiffy);
index 47dc7990fb26e35645bc4637fc80e3af25049a3b..51a1d7ef525375c76700fd482dfc0f294242a762 100644 (file)
 
 extern void timer_interrupt(struct pt_regs *);
 
-#define INLINE_IRQS
-
 #define irqs_disabled()        ((mfmsr() & MSR_EE) == 0)
 
-#ifdef INLINE_IRQS
-
 static inline void local_irq_disable(void)
 {
        unsigned long msr;
@@ -45,18 +41,6 @@ static inline void local_irq_save_ptr(unsigned long *flags)
 #define local_irq_save(flags)          local_irq_save_ptr(&flags)
 #define local_irq_restore(flags)       mtmsr(flags)
 
-#else
-
-extern void local_irq_enable(void);
-extern void local_irq_disable(void);
-extern void local_irq_restore(unsigned long);
-extern void local_save_flags_ptr(unsigned long *);
-
-#define local_save_flags(flags) local_save_flags_ptr(&flags)
-#define local_irq_save(flags) ({local_save_flags(flags);local_irq_disable();})
-
-#endif
-
 extern void do_lost_interrupts(unsigned long);
 
 #define mask_irq(irq) ({if (irq_desc[irq].handler && irq_desc[irq].handler->disable) irq_desc[irq].handler->disable(irq);})