diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
commit | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch) | |
tree | a8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /include/linux/hardirq.h | |
parent | 406089d01562f1e2bf9f089fd7637009ebaad589 (diff) |
Patched in Tegra support.
Diffstat (limited to 'include/linux/hardirq.h')
-rw-r--r-- | include/linux/hardirq.h | 38 |
1 files changed, 34 insertions, 4 deletions
diff --git a/include/linux/hardirq.h b/include/linux/hardirq.h index 624ef3f45c8..f743883f769 100644 --- a/include/linux/hardirq.h +++ b/include/linux/hardirq.h | |||
@@ -4,7 +4,6 @@ | |||
4 | #include <linux/preempt.h> | 4 | #include <linux/preempt.h> |
5 | #include <linux/lockdep.h> | 5 | #include <linux/lockdep.h> |
6 | #include <linux/ftrace_irq.h> | 6 | #include <linux/ftrace_irq.h> |
7 | #include <linux/vtime.h> | ||
8 | #include <asm/hardirq.h> | 7 | #include <asm/hardirq.h> |
9 | 8 | ||
10 | /* | 9 | /* |
@@ -23,7 +22,7 @@ | |||
23 | * | 22 | * |
24 | * - bits 16-25 are the hardirq count (max # of nested hardirqs: 1024) | 23 | * - bits 16-25 are the hardirq count (max # of nested hardirqs: 1024) |
25 | * - bit 26 is the NMI_MASK | 24 | * - bit 26 is the NMI_MASK |
26 | * - bit 27 is the PREEMPT_ACTIVE flag | 25 | * - bit 28 is the PREEMPT_ACTIVE flag |
27 | * | 26 | * |
28 | * PREEMPT_MASK: 0x000000ff | 27 | * PREEMPT_MASK: 0x000000ff |
29 | * SOFTIRQ_MASK: 0x0000ff00 | 28 | * SOFTIRQ_MASK: 0x0000ff00 |
@@ -130,7 +129,30 @@ extern void synchronize_irq(unsigned int irq); | |||
130 | # define synchronize_irq(irq) barrier() | 129 | # define synchronize_irq(irq) barrier() |
131 | #endif | 130 | #endif |
132 | 131 | ||
132 | struct task_struct; | ||
133 | |||
134 | #if !defined(CONFIG_VIRT_CPU_ACCOUNTING) && !defined(CONFIG_IRQ_TIME_ACCOUNTING) | ||
135 | static inline void account_system_vtime(struct task_struct *tsk) | ||
136 | { | ||
137 | } | ||
138 | #else | ||
139 | extern void account_system_vtime(struct task_struct *tsk); | ||
140 | #endif | ||
141 | |||
142 | #if defined(CONFIG_NO_HZ) | ||
133 | #if defined(CONFIG_TINY_RCU) || defined(CONFIG_TINY_PREEMPT_RCU) | 143 | #if defined(CONFIG_TINY_RCU) || defined(CONFIG_TINY_PREEMPT_RCU) |
144 | extern void rcu_enter_nohz(void); | ||
145 | extern void rcu_exit_nohz(void); | ||
146 | |||
147 | static inline void rcu_irq_enter(void) | ||
148 | { | ||
149 | rcu_exit_nohz(); | ||
150 | } | ||
151 | |||
152 | static inline void rcu_irq_exit(void) | ||
153 | { | ||
154 | rcu_enter_nohz(); | ||
155 | } | ||
134 | 156 | ||
135 | static inline void rcu_nmi_enter(void) | 157 | static inline void rcu_nmi_enter(void) |
136 | { | 158 | { |
@@ -141,9 +163,17 @@ static inline void rcu_nmi_exit(void) | |||
141 | } | 163 | } |
142 | 164 | ||
143 | #else | 165 | #else |
166 | extern void rcu_irq_enter(void); | ||
167 | extern void rcu_irq_exit(void); | ||
144 | extern void rcu_nmi_enter(void); | 168 | extern void rcu_nmi_enter(void); |
145 | extern void rcu_nmi_exit(void); | 169 | extern void rcu_nmi_exit(void); |
146 | #endif | 170 | #endif |
171 | #else | ||
172 | # define rcu_irq_enter() do { } while (0) | ||
173 | # define rcu_irq_exit() do { } while (0) | ||
174 | # define rcu_nmi_enter() do { } while (0) | ||
175 | # define rcu_nmi_exit() do { } while (0) | ||
176 | #endif /* #if defined(CONFIG_NO_HZ) */ | ||
147 | 177 | ||
148 | /* | 178 | /* |
149 | * It is safe to do non-atomic ops on ->hardirq_context, | 179 | * It is safe to do non-atomic ops on ->hardirq_context, |
@@ -153,7 +183,7 @@ extern void rcu_nmi_exit(void); | |||
153 | */ | 183 | */ |
154 | #define __irq_enter() \ | 184 | #define __irq_enter() \ |
155 | do { \ | 185 | do { \ |
156 | vtime_account_irq_enter(current); \ | 186 | account_system_vtime(current); \ |
157 | add_preempt_count(HARDIRQ_OFFSET); \ | 187 | add_preempt_count(HARDIRQ_OFFSET); \ |
158 | trace_hardirq_enter(); \ | 188 | trace_hardirq_enter(); \ |
159 | } while (0) | 189 | } while (0) |
@@ -169,7 +199,7 @@ extern void irq_enter(void); | |||
169 | #define __irq_exit() \ | 199 | #define __irq_exit() \ |
170 | do { \ | 200 | do { \ |
171 | trace_hardirq_exit(); \ | 201 | trace_hardirq_exit(); \ |
172 | vtime_account_irq_exit(current); \ | 202 | account_system_vtime(current); \ |
173 | sub_preempt_count(HARDIRQ_OFFSET); \ | 203 | sub_preempt_count(HARDIRQ_OFFSET); \ |
174 | } while (0) | 204 | } while (0) |
175 | 205 | ||