diff options
Diffstat (limited to 'include/linux/hardirq.h')
-rw-r--r-- | include/linux/hardirq.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h index 8246c697863d..6d527ee82b2b 100644 --- a/include/linux/hardirq.h +++ b/include/linux/hardirq.h | |||
@@ -64,6 +64,12 @@ | |||
64 | #define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT) | 64 | #define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT) |
65 | #define NMI_OFFSET (1UL << NMI_SHIFT) | 65 | #define NMI_OFFSET (1UL << NMI_SHIFT) |
66 | 66 | ||
67 | #ifndef PREEMPT_ACTIVE | ||
68 | #define PREEMPT_ACTIVE_BITS 1 | ||
69 | #define PREEMPT_ACTIVE_SHIFT (NMI_SHIFT + NMI_BITS) | ||
70 | #define PREEMPT_ACTIVE (__IRQ_MASK(PREEMPT_ACTIVE_BITS) << PREEMPT_ACTIVE_SHIFT) | ||
71 | #endif | ||
72 | |||
67 | #if PREEMPT_ACTIVE < (1 << (NMI_SHIFT + NMI_BITS)) | 73 | #if PREEMPT_ACTIVE < (1 << (NMI_SHIFT + NMI_BITS)) |
68 | #error PREEMPT_ACTIVE is too low! | 74 | #error PREEMPT_ACTIVE is too low! |
69 | #endif | 75 | #endif |
@@ -132,7 +138,7 @@ static inline void account_system_vtime(struct task_struct *tsk) | |||
132 | } | 138 | } |
133 | #endif | 139 | #endif |
134 | 140 | ||
135 | #if defined(CONFIG_NO_HZ) && !defined(CONFIG_CLASSIC_RCU) | 141 | #if defined(CONFIG_NO_HZ) |
136 | extern void rcu_irq_enter(void); | 142 | extern void rcu_irq_enter(void); |
137 | extern void rcu_irq_exit(void); | 143 | extern void rcu_irq_exit(void); |
138 | extern void rcu_nmi_enter(void); | 144 | extern void rcu_nmi_enter(void); |
@@ -142,7 +148,7 @@ extern void rcu_nmi_exit(void); | |||
142 | # define rcu_irq_exit() do { } while (0) | 148 | # define rcu_irq_exit() do { } while (0) |
143 | # define rcu_nmi_enter() do { } while (0) | 149 | # define rcu_nmi_enter() do { } while (0) |
144 | # define rcu_nmi_exit() do { } while (0) | 150 | # define rcu_nmi_exit() do { } while (0) |
145 | #endif /* #if defined(CONFIG_NO_HZ) && !defined(CONFIG_CLASSIC_RCU) */ | 151 | #endif /* #if defined(CONFIG_NO_HZ) */ |
146 | 152 | ||
147 | /* | 153 | /* |
148 | * It is safe to do non-atomic ops on ->hardirq_context, | 154 | * It is safe to do non-atomic ops on ->hardirq_context, |