diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /arch/mips/kernel/smtc.c | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'arch/mips/kernel/smtc.c')
-rw-r--r-- | arch/mips/kernel/smtc.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/arch/mips/kernel/smtc.c b/arch/mips/kernel/smtc.c index 24630fd8ef60..a95dea5459c4 100644 --- a/arch/mips/kernel/smtc.c +++ b/arch/mips/kernel/smtc.c | |||
@@ -25,6 +25,8 @@ | |||
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> | ||
29 | #include <linux/slab.h> | ||
28 | 30 | ||
29 | #include <asm/cpu.h> | 31 | #include <asm/cpu.h> |
30 | #include <asm/processor.h> | 32 | #include <asm/processor.h> |
@@ -180,7 +182,7 @@ static int vpemask[2][8] = { | |||
180 | {0, 0, 0, 0, 0, 0, 0, 1} | 182 | {0, 0, 0, 0, 0, 0, 0, 1} |
181 | }; | 183 | }; |
182 | int tcnoprog[NR_CPUS]; | 184 | int tcnoprog[NR_CPUS]; |
183 | static atomic_t idle_hook_initialized = {0}; | 185 | static atomic_t idle_hook_initialized = ATOMIC_INIT(0); |
184 | static int clock_hang_reported[NR_CPUS]; | 186 | static int clock_hang_reported[NR_CPUS]; |
185 | 187 | ||
186 | #endif /* CONFIG_SMTC_IDLE_HOOK_DEBUG */ | 188 | #endif /* CONFIG_SMTC_IDLE_HOOK_DEBUG */ |
@@ -939,23 +941,29 @@ static void ipi_call_interrupt(void) | |||
939 | 941 | ||
940 | DECLARE_PER_CPU(struct clock_event_device, mips_clockevent_device); | 942 | DECLARE_PER_CPU(struct clock_event_device, mips_clockevent_device); |
941 | 943 | ||
942 | void ipi_decode(struct smtc_ipi *pipi) | 944 | static void __irq_entry smtc_clock_tick_interrupt(void) |
943 | { | 945 | { |
944 | unsigned int cpu = smp_processor_id(); | 946 | unsigned int cpu = smp_processor_id(); |
945 | struct clock_event_device *cd; | 947 | struct clock_event_device *cd; |
948 | int irq = MIPS_CPU_IRQ_BASE + 1; | ||
949 | |||
950 | irq_enter(); | ||
951 | kstat_incr_irqs_this_cpu(irq, irq_to_desc(irq)); | ||
952 | cd = &per_cpu(mips_clockevent_device, cpu); | ||
953 | cd->event_handler(cd); | ||
954 | irq_exit(); | ||
955 | } | ||
956 | |||
957 | void ipi_decode(struct smtc_ipi *pipi) | ||
958 | { | ||
946 | void *arg_copy = pipi->arg; | 959 | void *arg_copy = pipi->arg; |
947 | int type_copy = pipi->type; | 960 | int type_copy = pipi->type; |
948 | int irq = MIPS_CPU_IRQ_BASE + 1; | ||
949 | 961 | ||
950 | smtc_ipi_nq(&freeIPIq, pipi); | 962 | smtc_ipi_nq(&freeIPIq, pipi); |
951 | 963 | ||
952 | switch (type_copy) { | 964 | switch (type_copy) { |
953 | case SMTC_CLOCK_TICK: | 965 | case SMTC_CLOCK_TICK: |
954 | irq_enter(); | 966 | 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; | 967 | break; |
960 | 968 | ||
961 | case LINUX_SMP_IPI: | 969 | case LINUX_SMP_IPI: |
@@ -1331,7 +1339,7 @@ void smtc_get_new_mmu_context(struct mm_struct *mm, unsigned long cpu) | |||
1331 | if (!((asid += ASID_INC) & ASID_MASK) ) { | 1339 | if (!((asid += ASID_INC) & ASID_MASK) ) { |
1332 | if (cpu_has_vtag_icache) | 1340 | if (cpu_has_vtag_icache) |
1333 | flush_icache_all(); | 1341 | flush_icache_all(); |
1334 | /* Traverse all online CPUs (hack requires contigous range) */ | 1342 | /* Traverse all online CPUs (hack requires contiguous range) */ |
1335 | for_each_online_cpu(i) { | 1343 | for_each_online_cpu(i) { |
1336 | /* | 1344 | /* |
1337 | * We don't need to worry about our own CPU, nor those of | 1345 | * We don't need to worry about our own CPU, nor those of |