diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-23 19:19:14 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-23 19:19:14 -0700 |
commit | 5579a782ad7ffa162b1060993e4a298dd50e7a33 (patch) | |
tree | 17a039c29af04579bdbae8323fe322e7dd9b1ec1 /arch/sparc64 | |
parent | 969907a956752f88dde4aa23fa8c033b9a939aee (diff) | |
parent | 60b8267338aafde5315fc65ff385f3d4d75eccfe (diff) | |
download | kernel_samsung_tuna-5579a782ad7ffa162b1060993e4a298dd50e7a33.zip kernel_samsung_tuna-5579a782ad7ffa162b1060993e4a298dd50e7a33.tar.gz kernel_samsung_tuna-5579a782ad7ffa162b1060993e4a298dd50e7a33.tar.bz2 |
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:
math-emu: Fix thinko in _FP_DIV
math-emu: Fix signalling of underflow and inexact while packing result.
sparc: Add checkstack support
sparc: correct section of current_pc()
sparc: correct section of apc_no_idle
sparc64: Fix race in arch/sparc64/kernel/trampoline.S
Diffstat (limited to 'arch/sparc64')
-rw-r--r-- | arch/sparc64/kernel/trampoline.S | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/arch/sparc64/kernel/trampoline.S b/arch/sparc64/kernel/trampoline.S index 704a3af..83abd5a 100644 --- a/arch/sparc64/kernel/trampoline.S +++ b/arch/sparc64/kernel/trampoline.S @@ -328,6 +328,12 @@ after_lock_tlb: wrpr %g0, 0, %wstate + sethi %hi(prom_entry_lock), %g2 +1: ldstub [%g2 + %lo(prom_entry_lock)], %g1 + membar #StoreLoad | #StoreStore + brnz,pn %g1, 1b + nop + /* As a hack, put &init_thread_union into %g6. * prom_world() loads from here to restore the %asi * register. @@ -337,7 +343,7 @@ after_lock_tlb: sethi %hi(is_sun4v), %o0 lduw [%o0 + %lo(is_sun4v)], %o0 - brz,pt %o0, 1f + brz,pt %o0, 2f nop TRAP_LOAD_TRAP_BLOCK(%g2, %g3) @@ -369,10 +375,10 @@ after_lock_tlb: call %o1 add %sp, (2047 + 128), %o0 - ba,pt %xcc, 2f + ba,pt %xcc, 3f nop -1: sethi %hi(sparc64_ttable_tl0), %o0 +2: sethi %hi(sparc64_ttable_tl0), %o0 set prom_set_trap_table_name, %g2 stx %g2, [%sp + 2047 + 128 + 0x00] mov 1, %g2 @@ -386,7 +392,11 @@ after_lock_tlb: call %o1 add %sp, (2047 + 128), %o0 -2: ldx [%l0], %g6 +3: sethi %hi(prom_entry_lock), %g2 + stb %g0, [%g2 + %lo(prom_entry_lock)] + membar #StoreStore | #StoreLoad + + ldx [%l0], %g6 ldx [%g6 + TI_TASK], %g4 mov 1, %g5 |