aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/hardirq.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/hardirq.h')
-rw-r--r--include/linux/hardirq.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h
index 8a389b608ce3..32f9fd6619b4 100644
--- a/include/linux/hardirq.h
+++ b/include/linux/hardirq.h
@@ -2,9 +2,6 @@
2#define LINUX_HARDIRQ_H 2#define LINUX_HARDIRQ_H
3 3
4#include <linux/preempt.h> 4#include <linux/preempt.h>
5#ifdef CONFIG_PREEMPT
6#include <linux/smp_lock.h>
7#endif
8#include <linux/lockdep.h> 5#include <linux/lockdep.h>
9#include <linux/ftrace_irq.h> 6#include <linux/ftrace_irq.h>
10#include <asm/hardirq.h> 7#include <asm/hardirq.h>
@@ -96,11 +93,16 @@
96 */ 93 */
97#define in_nmi() (preempt_count() & NMI_MASK) 94#define in_nmi() (preempt_count() & NMI_MASK)
98 95
96#if defined(CONFIG_PREEMPT) && defined(CONFIG_BKL)
97# include <linux/sched.h>
98# define PREEMPT_INATOMIC_BASE (current->lock_depth >= 0)
99#else
100# define PREEMPT_INATOMIC_BASE 0
101#endif
102
99#if defined(CONFIG_PREEMPT) 103#if defined(CONFIG_PREEMPT)
100# define PREEMPT_INATOMIC_BASE kernel_locked()
101# define PREEMPT_CHECK_OFFSET 1 104# define PREEMPT_CHECK_OFFSET 1
102#else 105#else
103# define PREEMPT_INATOMIC_BASE 0
104# define PREEMPT_CHECK_OFFSET 0 106# define PREEMPT_CHECK_OFFSET 0
105#endif 107#endif
106 108