diff options
author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2009-12-08 12:35:35 -0500 |
---|---|---|
committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2009-12-08 12:47:45 -0500 |
commit | 0443a922ed2475c192087825d0e24f2d5cc5d3bf (patch) | |
tree | 92797e608278e82a7213a54c733aa6cbc90d54d8 | |
parent | d51bd45799b03ebc04a82602a709e150ea9fae28 (diff) |
add sparc64 timer pulling support
-rw-r--r-- | arch/sparc64/kernel/smp.c | 19 | ||||
-rw-r--r-- | arch/sparc64/kernel/ttable.S | 5 | ||||
-rw-r--r-- | arch/sparc64/mm/ultra.S | 5 | ||||
-rw-r--r-- | include/asm-sparc64/pil.h | 1 |
4 files changed, 30 insertions, 0 deletions
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c index 55f1ebd74f..e0d85ff881 100644 --- a/arch/sparc64/kernel/smp.c +++ b/arch/sparc64/kernel/smp.c | |||
@@ -906,6 +906,7 @@ extern unsigned long xcall_flush_tlb_kernel_range; | |||
906 | extern unsigned long xcall_report_regs; | 906 | extern unsigned long xcall_report_regs; |
907 | extern unsigned long xcall_receive_signal; | 907 | extern unsigned long xcall_receive_signal; |
908 | extern unsigned long xcall_new_mmu_context_version; | 908 | extern unsigned long xcall_new_mmu_context_version; |
909 | extern unsigned long xcall_pull_timers; | ||
909 | 910 | ||
910 | #ifdef DCACHE_ALIASING_POSSIBLE | 911 | #ifdef DCACHE_ALIASING_POSSIBLE |
911 | extern unsigned long xcall_flush_dcache_page_cheetah; | 912 | extern unsigned long xcall_flush_dcache_page_cheetah; |
@@ -1422,6 +1423,24 @@ void smp_send_reschedule(int cpu) | |||
1422 | smp_receive_signal(cpu); | 1423 | smp_receive_signal(cpu); |
1423 | } | 1424 | } |
1424 | 1425 | ||
1426 | void smp_send_pull_timers(int cpu) | ||
1427 | { | ||
1428 | cpumask_t mask = cpumask_of_cpu(cpu); | ||
1429 | |||
1430 | if (cpu_online(cpu)) | ||
1431 | smp_cross_call_masked(&xcall_pull_timers, 0, 0, 0, mask); | ||
1432 | } | ||
1433 | |||
1434 | void hrtimer_pull(void); | ||
1435 | |||
1436 | void smp_pull_timers_client(int irq, struct pt_regs *regs) | ||
1437 | { | ||
1438 | clear_softint(1 << irq); | ||
1439 | TRACE("pull timers interrupt\n"); | ||
1440 | hrtimer_pull(); | ||
1441 | } | ||
1442 | |||
1443 | |||
1425 | /* This is a nop because we capture all other cpus | 1444 | /* This is a nop because we capture all other cpus |
1426 | * anyways when making the PROM active. | 1445 | * anyways when making the PROM active. |
1427 | */ | 1446 | */ |
diff --git a/arch/sparc64/kernel/ttable.S b/arch/sparc64/kernel/ttable.S index 7575aa371d..65a23d3b9d 100644 --- a/arch/sparc64/kernel/ttable.S +++ b/arch/sparc64/kernel/ttable.S | |||
@@ -58,7 +58,12 @@ tl0_irq3: BTRAP(0x43) | |||
58 | tl0_irq4: BTRAP(0x44) | 58 | tl0_irq4: BTRAP(0x44) |
59 | #endif | 59 | #endif |
60 | tl0_irq5: TRAP_IRQ(handler_irq, 5) | 60 | tl0_irq5: TRAP_IRQ(handler_irq, 5) |
61 | #ifdef CONFIG_SMP | ||
62 | tl0_irq6: TRAP_IRQ(smp_pull_timers_client, 6) | ||
63 | tl0_irq7: BTRAP(0x47) BTRAP(0x48) BTRAP(0x49) | ||
64 | #else | ||
61 | tl0_irq6: BTRAP(0x46) BTRAP(0x47) BTRAP(0x48) BTRAP(0x49) | 65 | tl0_irq6: BTRAP(0x46) BTRAP(0x47) BTRAP(0x48) BTRAP(0x49) |
66 | #endif | ||
62 | tl0_irq10: BTRAP(0x4a) BTRAP(0x4b) BTRAP(0x4c) BTRAP(0x4d) | 67 | tl0_irq10: BTRAP(0x4a) BTRAP(0x4b) BTRAP(0x4c) BTRAP(0x4d) |
63 | tl0_irq14: TRAP_IRQ(timer_interrupt, 14) | 68 | tl0_irq14: TRAP_IRQ(timer_interrupt, 14) |
64 | tl0_irq15: TRAP_IRQ(handler_irq, 15) | 69 | tl0_irq15: TRAP_IRQ(handler_irq, 15) |
diff --git a/arch/sparc64/mm/ultra.S b/arch/sparc64/mm/ultra.S index 2865c105b6..3f158cf42c 100644 --- a/arch/sparc64/mm/ultra.S +++ b/arch/sparc64/mm/ultra.S | |||
@@ -678,6 +678,11 @@ xcall_new_mmu_context_version: | |||
678 | wr %g0, (1 << PIL_SMP_CTX_NEW_VERSION), %set_softint | 678 | wr %g0, (1 << PIL_SMP_CTX_NEW_VERSION), %set_softint |
679 | retry | 679 | retry |
680 | 680 | ||
681 | .globl xcall_pull_timers | ||
682 | xcall_pull_timers: | ||
683 | wr %g0, (1 << PIL_SMP_PULL_TIMERS), %set_softint | ||
684 | retry | ||
685 | |||
681 | #endif /* CONFIG_SMP */ | 686 | #endif /* CONFIG_SMP */ |
682 | 687 | ||
683 | 688 | ||
diff --git a/include/asm-sparc64/pil.h b/include/asm-sparc64/pil.h index 72927749ae..5b36432668 100644 --- a/include/asm-sparc64/pil.h +++ b/include/asm-sparc64/pil.h | |||
@@ -18,6 +18,7 @@ | |||
18 | #define PIL_SMP_CAPTURE 3 | 18 | #define PIL_SMP_CAPTURE 3 |
19 | #define PIL_SMP_CTX_NEW_VERSION 4 | 19 | #define PIL_SMP_CTX_NEW_VERSION 4 |
20 | #define PIL_DEVICE_IRQ 5 | 20 | #define PIL_DEVICE_IRQ 5 |
21 | #define PIL_SMP_PULL_TIMERS 6 | ||
21 | 22 | ||
22 | #ifndef __ASSEMBLY__ | 23 | #ifndef __ASSEMBLY__ |
23 | #define PIL_RESERVED(PIL) ((PIL) == PIL_SMP_CALL_FUNC || \ | 24 | #define PIL_RESERVED(PIL) ((PIL) == PIL_SMP_CALL_FUNC || \ |