summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2010-05-17 10:19:06 +0200
committerThomas Gleixner <tglx@linutronix.de>2010-05-17 11:20:32 +0200
commit5b6c7b08196ea160f78a9afc1948091dc930b108 (patch)
tree0ed2341e1721e8b4c7ed37fffe8dfc82f281c463
parentd6434af22679ec15d7779f3f41a5d3aebbb704e3 (diff)
downloadlinux-rt-5b6c7b08196ea160f78a9afc1948091dc930b108.tar.gz
net: Make [dis/en]able_irq_*_lockdep() RT safe
The lockdep irqoff protection which is used to prevent lockdep false positives leads to "scheduling while atomic" and "might sleep" bug floods. Make the irq disabling depend on !RT. Reported-by: Olaf Hering <olaf@aepfle.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r--include/linux/interrupt.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index 9f6580a184c9..d363196eb108 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -246,7 +246,7 @@ static inline int irq_select_affinity(unsigned int irq) { return 0; }
static inline void disable_irq_nosync_lockdep(unsigned int irq)
{
disable_irq_nosync(irq);
-#ifdef CONFIG_LOCKDEP
+#if defined(CONFIG_LOCKDEP) && !defined(CONFIG_PREEMPT_RT)
local_irq_disable();
#endif
}
@@ -254,7 +254,7 @@ static inline void disable_irq_nosync_lockdep(unsigned int irq)
static inline void disable_irq_nosync_lockdep_irqsave(unsigned int irq, unsigned long *flags)
{
disable_irq_nosync(irq);
-#ifdef CONFIG_LOCKDEP
+#if defined(CONFIG_LOCKDEP) && !defined(CONFIG_PREEMPT_RT)
local_irq_save(*flags);
#endif
}
@@ -262,14 +262,14 @@ static inline void disable_irq_nosync_lockdep_irqsave(unsigned int irq, unsigned
static inline void disable_irq_lockdep(unsigned int irq)
{
disable_irq(irq);
-#ifdef CONFIG_LOCKDEP
+#if defined(CONFIG_LOCKDEP) && !defined(CONFIG_PREEMPT_RT)
local_irq_disable();
#endif
}
static inline void enable_irq_lockdep(unsigned int irq)
{
-#ifdef CONFIG_LOCKDEP
+#if defined(CONFIG_LOCKDEP) && !defined(CONFIG_PREEMPT_RT)
local_irq_enable();
#endif
enable_irq(irq);
@@ -277,7 +277,7 @@ static inline void enable_irq_lockdep(unsigned int irq)
static inline void enable_irq_lockdep_irqrestore(unsigned int irq, unsigned long *flags)
{
-#ifdef CONFIG_LOCKDEP
+#if defined(CONFIG_LOCKDEP) && !defined(CONFIG_PREEMPT_RT)
local_irq_restore(*flags);
#endif
enable_irq(irq);