60 lines
2.1 KiB
Diff
60 lines
2.1 KiB
Diff
|
From 925577e408d7461ff35299f8e729e74fca79d4e7 Mon Sep 17 00:00:00 2001
|
||
|
From: Thomas Gleixner <tglx@linutronix.de>
|
||
|
Date: Tue, 21 Jul 2009 22:34:14 +0200
|
||
|
Subject: [PATCH 074/365] rt: local_irq_* variants depending on RT/!RT
|
||
|
|
||
|
Add local_irq_*_(no)rt variant which are mainly used to break
|
||
|
interrupt disabled sections on PREEMPT_RT or to explicitely disable
|
||
|
interrupts on PREEMPT_RT.
|
||
|
|
||
|
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
||
|
---
|
||
|
include/linux/interrupt.h | 2 +-
|
||
|
include/linux/irqflags.h | 19 +++++++++++++++++++
|
||
|
2 files changed, 20 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
|
||
|
index 999b7c374645..d28272d1c9ad 100644
|
||
|
--- a/include/linux/interrupt.h
|
||
|
+++ b/include/linux/interrupt.h
|
||
|
@@ -197,7 +197,7 @@ extern void devm_free_irq(struct device *dev, unsigned int irq, void *dev_id);
|
||
|
#ifdef CONFIG_LOCKDEP
|
||
|
# define local_irq_enable_in_hardirq() do { } while (0)
|
||
|
#else
|
||
|
-# define local_irq_enable_in_hardirq() local_irq_enable()
|
||
|
+# define local_irq_enable_in_hardirq() local_irq_enable_nort()
|
||
|
#endif
|
||
|
|
||
|
extern void disable_irq_nosync(unsigned int irq);
|
||
|
diff --git a/include/linux/irqflags.h b/include/linux/irqflags.h
|
||
|
index 5dd1272d1ab2..f8f27cc5546f 100644
|
||
|
--- a/include/linux/irqflags.h
|
||
|
+++ b/include/linux/irqflags.h
|
||
|
@@ -148,4 +148,23 @@
|
||
|
|
||
|
#define irqs_disabled_flags(flags) raw_irqs_disabled_flags(flags)
|
||
|
|
||
|
+/*
|
||
|
+ * local_irq* variants depending on RT/!RT
|
||
|
+ */
|
||
|
+#ifdef CONFIG_PREEMPT_RT_FULL
|
||
|
+# define local_irq_disable_nort() do { } while (0)
|
||
|
+# define local_irq_enable_nort() do { } while (0)
|
||
|
+# define local_irq_save_nort(flags) local_save_flags(flags)
|
||
|
+# define local_irq_restore_nort(flags) (void)(flags)
|
||
|
+# define local_irq_disable_rt() local_irq_disable()
|
||
|
+# define local_irq_enable_rt() local_irq_enable()
|
||
|
+#else
|
||
|
+# define local_irq_disable_nort() local_irq_disable()
|
||
|
+# define local_irq_enable_nort() local_irq_enable()
|
||
|
+# define local_irq_save_nort(flags) local_irq_save(flags)
|
||
|
+# define local_irq_restore_nort(flags) local_irq_restore(flags)
|
||
|
+# define local_irq_disable_rt() do { } while (0)
|
||
|
+# define local_irq_enable_rt() do { } while (0)
|
||
|
+#endif
|
||
|
+
|
||
|
#endif
|
||
|
--
|
||
|
2.28.0
|
||
|
|