diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2010-10-19 09:00:13 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2010-10-21 10:50:29 -0400 |
commit | f4bc6bb2d562703eafc895c37e7be20906de139d (patch) | |
tree | e80d4ed1bc925a2236773eff7d68163c534efea3 /kernel/softirq.c | |
parent | 750ed158bf6c782d2813da1bca2c824365a0b777 (diff) |
tracing: Cleanup the convoluted softirq tracepoints
With the addition of trace_softirq_raise() the softirq tracepoint got
even more convoluted. Why the tracepoints take two pointers to assign
an integer is beyond my comprehension.
But adding an extra case which treats the first pointer as an unsigned
long when the second pointer is NULL including the back and forth
type casting is just horrible.
Convert the softirq tracepoints to take a single unsigned int argument
for the softirq vector number and fix the call sites.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
LKML-Reference: <alpine.LFD.2.00.1010191428560.6815@localhost6.localdomain6>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: mathieu.desnoyers@efficios.com
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/softirq.c')
-rw-r--r-- | kernel/softirq.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/kernel/softirq.c b/kernel/softirq.c index 07b4f1b1a73a..b3cb1dc15795 100644 --- a/kernel/softirq.c +++ b/kernel/softirq.c | |||
@@ -212,18 +212,20 @@ restart: | |||
212 | 212 | ||
213 | do { | 213 | do { |
214 | if (pending & 1) { | 214 | if (pending & 1) { |
215 | unsigned int vec_nr = h - softirq_vec; | ||
215 | int prev_count = preempt_count(); | 216 | int prev_count = preempt_count(); |
216 | kstat_incr_softirqs_this_cpu(h - softirq_vec); | ||
217 | 217 | ||
218 | trace_softirq_entry(h, softirq_vec); | 218 | kstat_incr_softirqs_this_cpu(vec_nr); |
219 | |||
220 | trace_softirq_entry(vec_nr); | ||
219 | h->action(h); | 221 | h->action(h); |
220 | trace_softirq_exit(h, softirq_vec); | 222 | trace_softirq_exit(vec_nr); |
221 | if (unlikely(prev_count != preempt_count())) { | 223 | if (unlikely(prev_count != preempt_count())) { |
222 | printk(KERN_ERR "huh, entered softirq %td %s %p" | 224 | printk(KERN_ERR "huh, entered softirq %u %s %p" |
223 | "with preempt_count %08x," | 225 | "with preempt_count %08x," |
224 | " exited with %08x?\n", h - softirq_vec, | 226 | " exited with %08x?\n", vec_nr, |
225 | softirq_to_name[h - softirq_vec], | 227 | softirq_to_name[vec_nr], h->action, |
226 | h->action, prev_count, preempt_count()); | 228 | prev_count, preempt_count()); |
227 | preempt_count() = prev_count; | 229 | preempt_count() = prev_count; |
228 | } | 230 | } |
229 | 231 | ||