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/smtc.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/smtc.c')
-rw-r--r-- | arch/mips/kernel/smtc.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/arch/mips/kernel/smtc.c b/arch/mips/kernel/smtc.c index a38e3ee95515..23499b5bd9c3 100644 --- a/arch/mips/kernel/smtc.c +++ b/arch/mips/kernel/smtc.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
26 | #include <linux/kernel_stat.h> | 26 | #include <linux/kernel_stat.h> |
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/ftrace.h> | ||
28 | 29 | ||
29 | #include <asm/cpu.h> | 30 | #include <asm/cpu.h> |
30 | #include <asm/processor.h> | 31 | #include <asm/processor.h> |
@@ -939,23 +940,29 @@ static void ipi_call_interrupt(void) | |||
939 | 940 | ||
940 | DECLARE_PER_CPU(struct clock_event_device, mips_clockevent_device); | 941 | DECLARE_PER_CPU(struct clock_event_device, mips_clockevent_device); |
941 | 942 | ||
942 | void ipi_decode(struct smtc_ipi *pipi) | 943 | static void __irq_entry smtc_clock_tick_interrupt(void) |
943 | { | 944 | { |
944 | unsigned int cpu = smp_processor_id(); | 945 | unsigned int cpu = smp_processor_id(); |
945 | struct clock_event_device *cd; | 946 | struct clock_event_device *cd; |
947 | int irq = MIPS_CPU_IRQ_BASE + 1; | ||
948 | |||
949 | irq_enter(); | ||
950 | kstat_incr_irqs_this_cpu(irq, irq_to_desc(irq)); | ||
951 | cd = &per_cpu(mips_clockevent_device, cpu); | ||
952 | cd->event_handler(cd); | ||
953 | irq_exit(); | ||
954 | } | ||
955 | |||
956 | void ipi_decode(struct smtc_ipi *pipi) | ||
957 | { | ||
946 | void *arg_copy = pipi->arg; | 958 | void *arg_copy = pipi->arg; |
947 | int type_copy = pipi->type; | 959 | int type_copy = pipi->type; |
948 | int irq = MIPS_CPU_IRQ_BASE + 1; | ||
949 | 960 | ||
950 | smtc_ipi_nq(&freeIPIq, pipi); | 961 | smtc_ipi_nq(&freeIPIq, pipi); |
951 | 962 | ||
952 | switch (type_copy) { | 963 | switch (type_copy) { |
953 | case SMTC_CLOCK_TICK: | 964 | case SMTC_CLOCK_TICK: |
954 | irq_enter(); | 965 | smtc_clock_tick_interrupt(); |
955 | kstat_incr_irqs_this_cpu(irq, irq_to_desc(irq)); | ||
956 | cd = &per_cpu(mips_clockevent_device, cpu); | ||
957 | cd->event_handler(cd); | ||
958 | irq_exit(); | ||
959 | break; | 966 | break; |
960 | 967 | ||
961 | case LINUX_SMP_IPI: | 968 | case LINUX_SMP_IPI: |