diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-29 11:03:48 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-29 11:03:48 -0400 |
commit | c07724e5b868c603f2a65f3855c77b23454db3ed (patch) | |
tree | 658b1f0af5966e418f48a53e8b2f97e10b250f4f /arch/sparc/kernel | |
parent | 302f5bc54448bd2b37d5a8be9b6abc29397827ef (diff) | |
parent | e69f58c037ab5b166b3858fa7b5d7fa470613e8f (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6:
kbuild: add ARCH=sparc32 target
sparc32: fix build failure on CONFIG_SPARC_LEON
sparc: Fixed random SPARC/LEON SMP CPU Stuck problem.
sparc32: remove CONFIG_HAVE_PERF_EVENTS option
sparc: don't #include asm/system.h in asm/jump_label.h
sparc32: Fix unaligned stack handling on trap return.
sparc: keep calling do_signal() as long as pending signals remain
Diffstat (limited to 'arch/sparc/kernel')
-rw-r--r-- | arch/sparc/kernel/irq_32.c | 4 | ||||
-rw-r--r-- | arch/sparc/kernel/leon_smp.c | 4 | ||||
-rw-r--r-- | arch/sparc/kernel/rtrap_32.S | 6 | ||||
-rw-r--r-- | arch/sparc/kernel/rtrap_64.S | 36 |
4 files changed, 10 insertions, 40 deletions
diff --git a/arch/sparc/kernel/irq_32.c b/arch/sparc/kernel/irq_32.c index 0116d8d10def..5ad6e5c5dbb3 100644 --- a/arch/sparc/kernel/irq_32.c +++ b/arch/sparc/kernel/irq_32.c | |||
@@ -365,7 +365,7 @@ static int request_fast_irq(unsigned int irq, | |||
365 | unsigned long flags; | 365 | unsigned long flags; |
366 | unsigned int cpu_irq; | 366 | unsigned int cpu_irq; |
367 | int ret; | 367 | int ret; |
368 | #ifdef CONFIG_SMP | 368 | #if defined CONFIG_SMP && !defined CONFIG_SPARC_LEON |
369 | struct tt_entry *trap_table; | 369 | struct tt_entry *trap_table; |
370 | extern struct tt_entry trapbase_cpu1, trapbase_cpu2, trapbase_cpu3; | 370 | extern struct tt_entry trapbase_cpu1, trapbase_cpu2, trapbase_cpu3; |
371 | #endif | 371 | #endif |
@@ -425,7 +425,7 @@ static int request_fast_irq(unsigned int irq, | |||
425 | table[SP_TRAP_IRQ1+(cpu_irq-1)].inst_four = SPARC_NOP; | 425 | table[SP_TRAP_IRQ1+(cpu_irq-1)].inst_four = SPARC_NOP; |
426 | 426 | ||
427 | INSTANTIATE(sparc_ttable) | 427 | INSTANTIATE(sparc_ttable) |
428 | #ifdef CONFIG_SMP | 428 | #if defined CONFIG_SMP && !defined CONFIG_SPARC_LEON |
429 | trap_table = &trapbase_cpu1; INSTANTIATE(trap_table) | 429 | trap_table = &trapbase_cpu1; INSTANTIATE(trap_table) |
430 | trap_table = &trapbase_cpu2; INSTANTIATE(trap_table) | 430 | trap_table = &trapbase_cpu2; INSTANTIATE(trap_table) |
431 | trap_table = &trapbase_cpu3; INSTANTIATE(trap_table) | 431 | trap_table = &trapbase_cpu3; INSTANTIATE(trap_table) |
diff --git a/arch/sparc/kernel/leon_smp.c b/arch/sparc/kernel/leon_smp.c index e1656fc41ccb..7524689b03d2 100644 --- a/arch/sparc/kernel/leon_smp.c +++ b/arch/sparc/kernel/leon_smp.c | |||
@@ -56,8 +56,8 @@ void __init leon_configure_cache_smp(void); | |||
56 | static inline unsigned long do_swap(volatile unsigned long *ptr, | 56 | static inline unsigned long do_swap(volatile unsigned long *ptr, |
57 | unsigned long val) | 57 | unsigned long val) |
58 | { | 58 | { |
59 | __asm__ __volatile__("swapa [%1] %2, %0\n\t" : "=&r"(val) | 59 | __asm__ __volatile__("swapa [%2] %3, %0\n\t" : "=&r"(val) |
60 | : "r"(ptr), "i"(ASI_LEON_DCACHE_MISS) | 60 | : "0"(val), "r"(ptr), "i"(ASI_LEON_DCACHE_MISS) |
61 | : "memory"); | 61 | : "memory"); |
62 | return val; | 62 | return val; |
63 | } | 63 | } |
diff --git a/arch/sparc/kernel/rtrap_32.S b/arch/sparc/kernel/rtrap_32.S index 4da2e1f66290..5f5f74c2c2ca 100644 --- a/arch/sparc/kernel/rtrap_32.S +++ b/arch/sparc/kernel/rtrap_32.S | |||
@@ -78,9 +78,9 @@ signal_p: | |||
78 | call do_notify_resume | 78 | call do_notify_resume |
79 | add %sp, STACKFRAME_SZ, %o0 ! pt_regs ptr | 79 | add %sp, STACKFRAME_SZ, %o0 ! pt_regs ptr |
80 | 80 | ||
81 | /* Fall through. */ | 81 | b signal_p |
82 | ld [%sp + STACKFRAME_SZ + PT_PSR], %t_psr | 82 | ld [%curptr + TI_FLAGS], %g2 |
83 | clr %l6 | 83 | |
84 | ret_trap_continue: | 84 | ret_trap_continue: |
85 | sethi %hi(PSR_SYSCALL), %g1 | 85 | sethi %hi(PSR_SYSCALL), %g1 |
86 | andn %t_psr, %g1, %t_psr | 86 | andn %t_psr, %g1, %t_psr |
diff --git a/arch/sparc/kernel/rtrap_64.S b/arch/sparc/kernel/rtrap_64.S index 090b9e9ad5e3..77f1b95e0806 100644 --- a/arch/sparc/kernel/rtrap_64.S +++ b/arch/sparc/kernel/rtrap_64.S | |||
@@ -34,37 +34,9 @@ __handle_preemption: | |||
34 | __handle_user_windows: | 34 | __handle_user_windows: |
35 | call fault_in_user_windows | 35 | call fault_in_user_windows |
36 | wrpr %g0, RTRAP_PSTATE, %pstate | 36 | wrpr %g0, RTRAP_PSTATE, %pstate |
37 | wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate | 37 | ba,pt %xcc, __handle_preemption_continue |
38 | /* Redo sched+sig checks */ | 38 | wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate |
39 | ldx [%g6 + TI_FLAGS], %l0 | ||
40 | andcc %l0, _TIF_NEED_RESCHED, %g0 | ||
41 | |||
42 | be,pt %xcc, 1f | ||
43 | nop | ||
44 | call schedule | ||
45 | wrpr %g0, RTRAP_PSTATE, %pstate | ||
46 | wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate | ||
47 | ldx [%g6 + TI_FLAGS], %l0 | ||
48 | |||
49 | 1: andcc %l0, _TIF_DO_NOTIFY_RESUME_MASK, %g0 | ||
50 | be,pt %xcc, __handle_user_windows_continue | ||
51 | nop | ||
52 | mov %l5, %o1 | ||
53 | add %sp, PTREGS_OFF, %o0 | ||
54 | mov %l0, %o2 | ||
55 | |||
56 | call do_notify_resume | ||
57 | wrpr %g0, RTRAP_PSTATE, %pstate | ||
58 | wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate | ||
59 | /* Signal delivery can modify pt_regs tstate, so we must | ||
60 | * reload it. | ||
61 | */ | ||
62 | ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %l1 | ||
63 | sethi %hi(0xf << 20), %l4 | ||
64 | and %l1, %l4, %l4 | ||
65 | ba,pt %xcc, __handle_user_windows_continue | ||
66 | 39 | ||
67 | andn %l1, %l4, %l1 | ||
68 | __handle_userfpu: | 40 | __handle_userfpu: |
69 | rd %fprs, %l5 | 41 | rd %fprs, %l5 |
70 | andcc %l5, FPRS_FEF, %g0 | 42 | andcc %l5, FPRS_FEF, %g0 |
@@ -87,7 +59,7 @@ __handle_signal: | |||
87 | ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %l1 | 59 | ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %l1 |
88 | sethi %hi(0xf << 20), %l4 | 60 | sethi %hi(0xf << 20), %l4 |
89 | and %l1, %l4, %l4 | 61 | and %l1, %l4, %l4 |
90 | ba,pt %xcc, __handle_signal_continue | 62 | ba,pt %xcc, __handle_preemption_continue |
91 | andn %l1, %l4, %l1 | 63 | andn %l1, %l4, %l1 |
92 | 64 | ||
93 | /* When returning from a NMI (%pil==15) interrupt we want to | 65 | /* When returning from a NMI (%pil==15) interrupt we want to |
@@ -177,11 +149,9 @@ __handle_preemption_continue: | |||
177 | bne,pn %xcc, __handle_preemption | 149 | bne,pn %xcc, __handle_preemption |
178 | andcc %l0, _TIF_DO_NOTIFY_RESUME_MASK, %g0 | 150 | andcc %l0, _TIF_DO_NOTIFY_RESUME_MASK, %g0 |
179 | bne,pn %xcc, __handle_signal | 151 | bne,pn %xcc, __handle_signal |
180 | __handle_signal_continue: | ||
181 | ldub [%g6 + TI_WSAVED], %o2 | 152 | ldub [%g6 + TI_WSAVED], %o2 |
182 | brnz,pn %o2, __handle_user_windows | 153 | brnz,pn %o2, __handle_user_windows |
183 | nop | 154 | nop |
184 | __handle_user_windows_continue: | ||
185 | sethi %hi(TSTATE_PEF), %o0 | 155 | sethi %hi(TSTATE_PEF), %o0 |
186 | andcc %l1, %o0, %g0 | 156 | andcc %l1, %o0, %g0 |
187 | 157 | ||