diff options
author | Wu Zhangjin <wuzhangjin@gmail.com> | 2009-11-20 07:34:33 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2009-12-16 20:57:24 -0500 |
commit | 8f99a162653531ef25a3dd0f92bfb6332cd2b295 (patch) | |
tree | 7dbb95ed810a1fe91c243e05b0d858a7846ec22c /arch/mips/kernel/irq.c | |
parent | 538f19526e40ce7a5a296fad6a3121409c890adc (diff) |
MIPS: Tracing: Add IRQENTRY_EXIT section for MIPS
This patch add a new section for MIPS to record the block of the hardirq
handling for function graph tracer(print_graph_irq) via adding the
__irq_entry annotation to the the entrypoints of the hardirqs(the block
with irq_enter()...irq_exit()).
Thanks goes to Steven & Frederic Weisbecker for their feedbacks.
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Nicholas Mc Guire <der.herr@hofr.at>
Cc: zhangfx@lemote.com
Cc: Wu Zhangjin <wuzhangjin@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: linux-kernel@vger.kernel.org
Cc: linux-mips@linux-mips.org
Reviewed-by: Frederic Weisbecker <fweisbec@gmail.com>
Patchwork: http://patchwork.linux-mips.org/patch/676/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/irq.c')
-rw-r--r-- | arch/mips/kernel/irq.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/arch/mips/kernel/irq.c b/arch/mips/kernel/irq.c index 8b0b4181219f..981f86c26168 100644 --- a/arch/mips/kernel/irq.c +++ b/arch/mips/kernel/irq.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/seq_file.h> | 22 | #include <linux/seq_file.h> |
23 | #include <linux/kallsyms.h> | 23 | #include <linux/kallsyms.h> |
24 | #include <linux/kgdb.h> | 24 | #include <linux/kgdb.h> |
25 | #include <linux/ftrace.h> | ||
25 | 26 | ||
26 | #include <asm/atomic.h> | 27 | #include <asm/atomic.h> |
27 | #include <asm/system.h> | 28 | #include <asm/system.h> |
@@ -150,3 +151,32 @@ void __init init_IRQ(void) | |||
150 | kgdb_early_setup = 1; | 151 | kgdb_early_setup = 1; |
151 | #endif | 152 | #endif |
152 | } | 153 | } |
154 | |||
155 | /* | ||
156 | * do_IRQ handles all normal device IRQ's (the special | ||
157 | * SMP cross-CPU interrupts have their own specific | ||
158 | * handlers). | ||
159 | */ | ||
160 | void __irq_entry do_IRQ(unsigned int irq) | ||
161 | { | ||
162 | irq_enter(); | ||
163 | __DO_IRQ_SMTC_HOOK(irq); | ||
164 | generic_handle_irq(irq); | ||
165 | irq_exit(); | ||
166 | } | ||
167 | |||
168 | #ifdef CONFIG_MIPS_MT_SMTC_IRQAFF | ||
169 | /* | ||
170 | * To avoid inefficient and in some cases pathological re-checking of | ||
171 | * IRQ affinity, we have this variant that skips the affinity check. | ||
172 | */ | ||
173 | |||
174 | void __irq_entry do_IRQ_no_affinity(unsigned int irq) | ||
175 | { | ||
176 | irq_enter(); | ||
177 | __NO_AFFINITY_IRQ_SMTC_HOOK(irq); | ||
178 | generic_handle_irq(irq); | ||
179 | irq_exit(); | ||
180 | } | ||
181 | |||
182 | #endif /* CONFIG_MIPS_MT_SMTC_IRQAFF */ | ||