diff options
Diffstat (limited to 'include/linux/hardirq.h')
| -rw-r--r-- | include/linux/hardirq.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h index d5b387669dab..8a389b608ce3 100644 --- a/include/linux/hardirq.h +++ b/include/linux/hardirq.h | |||
| @@ -8,7 +8,6 @@ | |||
| 8 | #include <linux/lockdep.h> | 8 | #include <linux/lockdep.h> |
| 9 | #include <linux/ftrace_irq.h> | 9 | #include <linux/ftrace_irq.h> |
| 10 | #include <asm/hardirq.h> | 10 | #include <asm/hardirq.h> |
| 11 | #include <asm/system.h> | ||
| 12 | 11 | ||
| 13 | /* | 12 | /* |
| 14 | * We put the hardirq and softirq counter into the preemption | 13 | * We put the hardirq and softirq counter into the preemption |
| @@ -64,6 +63,8 @@ | |||
| 64 | #define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT) | 63 | #define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT) |
| 65 | #define NMI_OFFSET (1UL << NMI_SHIFT) | 64 | #define NMI_OFFSET (1UL << NMI_SHIFT) |
| 66 | 65 | ||
| 66 | #define SOFTIRQ_DISABLE_OFFSET (2 * SOFTIRQ_OFFSET) | ||
| 67 | |||
| 67 | #ifndef PREEMPT_ACTIVE | 68 | #ifndef PREEMPT_ACTIVE |
| 68 | #define PREEMPT_ACTIVE_BITS 1 | 69 | #define PREEMPT_ACTIVE_BITS 1 |
| 69 | #define PREEMPT_ACTIVE_SHIFT (NMI_SHIFT + NMI_BITS) | 70 | #define PREEMPT_ACTIVE_SHIFT (NMI_SHIFT + NMI_BITS) |
| @@ -82,10 +83,13 @@ | |||
| 82 | /* | 83 | /* |
| 83 | * Are we doing bottom half or hardware interrupt processing? | 84 | * Are we doing bottom half or hardware interrupt processing? |
| 84 | * Are we in a softirq context? Interrupt context? | 85 | * Are we in a softirq context? Interrupt context? |
| 86 | * in_softirq - Are we currently processing softirq or have bh disabled? | ||
| 87 | * in_serving_softirq - Are we currently processing softirq? | ||
| 85 | */ | 88 | */ |
| 86 | #define in_irq() (hardirq_count()) | 89 | #define in_irq() (hardirq_count()) |
| 87 | #define in_softirq() (softirq_count()) | 90 | #define in_softirq() (softirq_count()) |
| 88 | #define in_interrupt() (irq_count()) | 91 | #define in_interrupt() (irq_count()) |
| 92 | #define in_serving_softirq() (softirq_count() & SOFTIRQ_OFFSET) | ||
| 89 | 93 | ||
| 90 | /* | 94 | /* |
| 91 | * Are we in NMI context? | 95 | * Are we in NMI context? |
| @@ -132,14 +136,16 @@ extern void synchronize_irq(unsigned int irq); | |||
| 132 | 136 | ||
| 133 | struct task_struct; | 137 | struct task_struct; |
| 134 | 138 | ||
| 135 | #ifndef CONFIG_VIRT_CPU_ACCOUNTING | 139 | #if !defined(CONFIG_VIRT_CPU_ACCOUNTING) && !defined(CONFIG_IRQ_TIME_ACCOUNTING) |
| 136 | static inline void account_system_vtime(struct task_struct *tsk) | 140 | static inline void account_system_vtime(struct task_struct *tsk) |
| 137 | { | 141 | { |
| 138 | } | 142 | } |
| 143 | #else | ||
| 144 | extern void account_system_vtime(struct task_struct *tsk); | ||
| 139 | #endif | 145 | #endif |
| 140 | 146 | ||
| 141 | #if defined(CONFIG_NO_HZ) | 147 | #if defined(CONFIG_NO_HZ) |
| 142 | #if defined(CONFIG_TINY_RCU) | 148 | #if defined(CONFIG_TINY_RCU) || defined(CONFIG_TINY_PREEMPT_RCU) |
| 143 | extern void rcu_enter_nohz(void); | 149 | extern void rcu_enter_nohz(void); |
| 144 | extern void rcu_exit_nohz(void); | 150 | extern void rcu_exit_nohz(void); |
| 145 | 151 | ||
