Commit 27b7488e authored by Thomas Gleixner's avatar Thomas Gleixner

Merge branch 'rt/apis' into rt/base

parents 4be3bd78 769610ed
...@@ -3,6 +3,10 @@ ...@@ -3,6 +3,10 @@
#include <linux/compiler.h> #include <linux/compiler.h>
#ifndef __ASSEMBLY__
extern void __WARN_ON(const char *func, const char *file, const int line);
#endif /* __ASSEMBLY__ */
#ifdef CONFIG_BUG #ifdef CONFIG_BUG
#ifdef CONFIG_GENERIC_BUG #ifdef CONFIG_GENERIC_BUG
...@@ -141,4 +145,18 @@ extern void warn_slowpath_null(const char *file, const int line); ...@@ -141,4 +145,18 @@ extern void warn_slowpath_null(const char *file, const int line);
# define WARN_ON_SMP(x) do { } while (0) # define WARN_ON_SMP(x) do { } while (0)
#endif #endif
#ifdef CONFIG_PREEMPT_RT
# define BUG_ON_RT(c) BUG_ON(c)
# define BUG_ON_NONRT(c) do { } while (0)
# define WARN_ON_RT(condition) WARN_ON(condition)
# define WARN_ON_NONRT(condition) do { } while (0)
# define WARN_ON_ONCE_NONRT(condition) do { } while (0)
#else
# define BUG_ON_RT(c) do { } while (0)
# define BUG_ON_NONRT(c) BUG_ON(c)
# define WARN_ON_RT(condition) do { } while (0)
# define WARN_ON_NONRT(condition) WARN_ON(condition)
# define WARN_ON_ONCE_NONRT(condition) WARN_ON_ONCE(condition)
#endif
#endif #endif
...@@ -178,7 +178,7 @@ extern void devm_free_irq(struct device *dev, unsigned int irq, void *dev_id); ...@@ -178,7 +178,7 @@ extern void devm_free_irq(struct device *dev, unsigned int irq, void *dev_id);
#ifdef CONFIG_LOCKDEP #ifdef CONFIG_LOCKDEP
# define local_irq_enable_in_hardirq() do { } while (0) # define local_irq_enable_in_hardirq() do { } while (0)
#else #else
# define local_irq_enable_in_hardirq() local_irq_enable() # define local_irq_enable_in_hardirq() local_irq_enable_nort()
#endif #endif
extern void disable_irq_nosync(unsigned int irq); extern void disable_irq_nosync(unsigned int irq);
...@@ -616,4 +616,19 @@ extern int arch_probe_nr_irqs(void); ...@@ -616,4 +616,19 @@ extern int arch_probe_nr_irqs(void);
extern int arch_early_irq_init(void); extern int arch_early_irq_init(void);
extern int arch_init_chip_data(struct irq_desc *desc, int node); extern int arch_init_chip_data(struct irq_desc *desc, int node);
/*
* local_irq* variants depending on RT/!RT
*/
#ifdef CONFIG_PREEMPT_RT
# define local_irq_disable_nort() do { } while (0)
# define local_irq_enable_nort() do { } while (0)
# define local_irq_save_nort(flags) do { local_save_flags(flags); } while (0)
# define local_irq_restore_nort(flags) do { (void)(flags); } while (0)
#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)
#endif
#endif #endif
...@@ -93,6 +93,18 @@ do { \ ...@@ -93,6 +93,18 @@ do { \
#endif #endif
#ifdef CONFIG_PREEMPT_RT
# define preempt_disable_rt() preempt_disable()
# define preempt_enable_rt() preempt_enable()
# define preempt_disable_nort() do { } while (0)
# define preempt_enable_nort() do { } while (0)
#else
# define preempt_disable_rt() do { } while (0)
# define preempt_enable_rt() do { } while (0)
# define preempt_disable_nort() preempt_disable()
# define preempt_enable_nort() preempt_enable()
#endif
#ifdef CONFIG_PREEMPT_NOTIFIERS #ifdef CONFIG_PREEMPT_NOTIFIERS
struct preempt_notifier; struct preempt_notifier;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment