diff options
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: |