[PATCH 1/2] ftrace ppc: add irqs_disabled_flags to ppc

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Steven Rostedt
Date: Wednesday, May 14, 2008 - 8:49 pm

PPC doesn't have the irqs_disabled_flags needed by ftrace.
This patch adds it.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
---
 include/asm-powerpc/hw_irq.h |   10 ++++++++++
 1 file changed, 10 insertions(+)

Index: linux-sched-devel.git/include/asm-powerpc/hw_irq.h
===================================================================
--- linux-sched-devel.git.orig/include/asm-powerpc/hw_irq.h	2008-05-14 18:12:21.000000000 -0700
+++ linux-sched-devel.git/include/asm-powerpc/hw_irq.h	2008-05-14 19:24:59.000000000 -0700
@@ -59,6 +59,11 @@ extern void iseries_handle_interrupts(vo
 		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(un
 #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 */
 
 /*

-- 
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/2] ftrace ppc: add irqs_disabled_flags to ppc, Steven Rostedt, (Wed May 14, 8:49 pm)