aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2009-04-23 15:02:28 -0400
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2009-04-23 15:02:28 -0400
commitd66881a2aa11307353b197f47e610692e7bd1875 (patch)
tree6a2a4b98bbc2fe560bb903aac88e516b4901de08
parentc13c6bb71587473e241637698c048887cb877e61 (diff)
sparc64: provide smp_send_pull_timers() implementation
-rw-r--r--arch/sparc64/kernel/smp.c21
-rw-r--r--arch/sparc64/kernel/ttable.S5
-rw-r--r--arch/sparc64/mm/ultra.S5
-rw-r--r--include/asm-sparc64/pil.h1
4 files changed, 32 insertions, 0 deletions
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c
index cd2bc7e289..ebfaaf499c 100644
--- a/arch/sparc64/kernel/smp.c
+++ b/arch/sparc64/kernel/smp.c
@@ -46,6 +46,8 @@
46#include <asm/ldc.h> 46#include <asm/ldc.h>
47#include <asm/hypervisor.h> 47#include <asm/hypervisor.h>
48 48
49#include <litmus/litmus.h>
50
49extern void calibrate_delay(void); 51extern void calibrate_delay(void);
50 52
51int sparc64_multi_core __read_mostly; 53int sparc64_multi_core __read_mostly;
@@ -903,6 +905,7 @@ extern unsigned long xcall_flush_tlb_kernel_range;
903extern unsigned long xcall_report_regs; 905extern unsigned long xcall_report_regs;
904extern unsigned long xcall_receive_signal; 906extern unsigned long xcall_receive_signal;
905extern unsigned long xcall_new_mmu_context_version; 907extern unsigned long xcall_new_mmu_context_version;
908extern unsigned long xcall_pull_timers;
906 909
907#ifdef DCACHE_ALIASING_POSSIBLE 910#ifdef DCACHE_ALIASING_POSSIBLE
908extern unsigned long xcall_flush_dcache_page_cheetah; 911extern unsigned long xcall_flush_dcache_page_cheetah;
@@ -1417,6 +1420,24 @@ void smp_send_reschedule(int cpu)
1417 smp_receive_signal(cpu); 1420 smp_receive_signal(cpu);
1418} 1421}
1419 1422
1423void smp_send_pull_timers(int cpu)
1424{
1425 cpumask_t mask = cpumask_of_cpu(cpu);
1426
1427 if (cpu_online(cpu))
1428 smp_cross_call_masked(&xcall_pull_timers, 0, 0, 0, mask);
1429}
1430
1431void hrtimer_pull(void);
1432
1433void smp_pull_timers_client(int irq, struct pt_regs *regs)
1434{
1435 clear_softint(1 << irq);
1436 TRACE("pull timers interrupt\n");
1437 hrtimer_pull();
1438}
1439
1440
1420/* This is a nop because we capture all other cpus 1441/* This is a nop because we capture all other cpus
1421 * anyways when making the PROM active. 1442 * anyways when making the PROM active.
1422 */ 1443 */
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)
58tl0_irq4: BTRAP(0x44) 58tl0_irq4: BTRAP(0x44)
59#endif 59#endif
60tl0_irq5: TRAP_IRQ(handler_irq, 5) 60tl0_irq5: TRAP_IRQ(handler_irq, 5)
61#ifdef CONFIG_SMP
62tl0_irq6: TRAP_IRQ(smp_pull_timers_client, 6)
63tl0_irq7: BTRAP(0x47) BTRAP(0x48) BTRAP(0x49)
64#else
61tl0_irq6: BTRAP(0x46) BTRAP(0x47) BTRAP(0x48) BTRAP(0x49) 65tl0_irq6: BTRAP(0x46) BTRAP(0x47) BTRAP(0x48) BTRAP(0x49)
66#endif
62tl0_irq10: BTRAP(0x4a) BTRAP(0x4b) BTRAP(0x4c) BTRAP(0x4d) 67tl0_irq10: BTRAP(0x4a) BTRAP(0x4b) BTRAP(0x4c) BTRAP(0x4d)
63tl0_irq14: TRAP_IRQ(timer_interrupt, 14) 68tl0_irq14: TRAP_IRQ(timer_interrupt, 14)
64tl0_irq15: TRAP_IRQ(handler_irq, 15) 69tl0_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
682xcall_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 || \