]> err.no Git - linux-2.6/commitdiff
ftrace, POWERPC: add irqs_disabled_flags to ppc
authorSteven Rostedt <rostedt@goodmis.org>
Thu, 15 May 2008 03:49:43 +0000 (23:49 -0400)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 23 May 2008 20:37:23 +0000 (22:37 +0200)
PPC doesn't have the irqs_disabled_flags needed by ftrace.
This patch adds it.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
include/asm-powerpc/hw_irq.h

index ad8c9f7fd0e359f8edb08db45e645b4632b9c5c8..f75a5fc64d2e64c8eb117c3faacb0c35f804b919 100644 (file)
@@ -59,6 +59,11 @@ extern void iseries_handle_interrupts(void);
                get_paca()->hard_enabled = 0;   \
        } while(0)
 
+static inline int irqs_disabled_flags(unsigned long flags)
+{
+       return flags == 0;
+}
+
 #else
 
 #if defined(CONFIG_BOOKE)
@@ -113,6 +118,11 @@ static inline void local_irq_save_ptr(unsigned long *flags)
 #define hard_irq_enable()      local_irq_enable()
 #define hard_irq_disable()     local_irq_disable()
 
+static inline int irqs_disabled_flags(unsigned long flags)
+{
+       return (flags & MSR_EE) == 0;
+}
+
 #endif /* CONFIG_PPC64 */
 
 /*