aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-10-23 22:19:14 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-23 22:19:14 -0400
commit5579a782ad7ffa162b1060993e4a298dd50e7a33 (patch)
tree17a039c29af04579bdbae8323fe322e7dd9b1ec1 /arch
parent969907a956752f88dde4aa23fa8c033b9a939aee (diff)
parent60b8267338aafde5315fc65ff385f3d4d75eccfe (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: 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')
-rw-r--r--arch/sparc/kernel/apc.c2
-rw-r--r--arch/sparc/kernel/head.S1
-rw-r--r--arch/sparc64/kernel/trampoline.S18
3 files changed, 16 insertions, 5 deletions
diff --git a/arch/sparc/kernel/apc.c b/arch/sparc/kernel/apc.c
index 4dd1ba752ce6..9c115823c4b5 100644
--- a/arch/sparc/kernel/apc.c
+++ b/arch/sparc/kernel/apc.c
@@ -31,7 +31,7 @@
31#define APC_DEVNAME "apc" 31#define APC_DEVNAME "apc"
32 32
33static u8 __iomem *regs; 33static u8 __iomem *regs;
34static int apc_no_idle __initdata = 0; 34static int apc_no_idle __devinitdata = 0;
35 35
36#define apc_readb(offs) (sbus_readb(regs+offs)) 36#define apc_readb(offs) (sbus_readb(regs+offs))
37#define apc_writeb(val, offs) (sbus_writeb(val, regs+offs)) 37#define apc_writeb(val, offs) (sbus_writeb(val, regs+offs))
diff --git a/arch/sparc/kernel/head.S b/arch/sparc/kernel/head.S
index 2d325fd84579..2fe2c117e772 100644
--- a/arch/sparc/kernel/head.S
+++ b/arch/sparc/kernel/head.S
@@ -465,6 +465,7 @@ gokernel:
465 mov %o7, %g4 ! Save %o7 465 mov %o7, %g4 ! Save %o7
466 466
467 /* Jump to it, and pray... */ 467 /* Jump to it, and pray... */
468 __INIT
468current_pc: 469current_pc:
469 call 1f 470 call 1f
470 nop 471 nop
diff --git a/arch/sparc64/kernel/trampoline.S b/arch/sparc64/kernel/trampoline.S
index 704a3afcfd06..83abd5ae88a4 100644
--- a/arch/sparc64/kernel/trampoline.S
+++ b/arch/sparc64/kernel/trampoline.S
@@ -328,6 +328,12 @@ after_lock_tlb:
328 328
329 wrpr %g0, 0, %wstate 329 wrpr %g0, 0, %wstate
330 330
331 sethi %hi(prom_entry_lock), %g2
3321: ldstub [%g2 + %lo(prom_entry_lock)], %g1
333 membar #StoreLoad | #StoreStore
334 brnz,pn %g1, 1b
335 nop
336
331 /* As a hack, put &init_thread_union into %g6. 337 /* As a hack, put &init_thread_union into %g6.
332 * prom_world() loads from here to restore the %asi 338 * prom_world() loads from here to restore the %asi
333 * register. 339 * register.
@@ -337,7 +343,7 @@ after_lock_tlb:
337 343
338 sethi %hi(is_sun4v), %o0 344 sethi %hi(is_sun4v), %o0
339 lduw [%o0 + %lo(is_sun4v)], %o0 345 lduw [%o0 + %lo(is_sun4v)], %o0
340 brz,pt %o0, 1f 346 brz,pt %o0, 2f
341 nop 347 nop
342 348
343 TRAP_LOAD_TRAP_BLOCK(%g2, %g3) 349 TRAP_LOAD_TRAP_BLOCK(%g2, %g3)
@@ -369,10 +375,10 @@ after_lock_tlb:
369 call %o1 375 call %o1
370 add %sp, (2047 + 128), %o0 376 add %sp, (2047 + 128), %o0
371 377
372 ba,pt %xcc, 2f 378 ba,pt %xcc, 3f
373 nop 379 nop
374 380
3751: sethi %hi(sparc64_ttable_tl0), %o0 3812: sethi %hi(sparc64_ttable_tl0), %o0
376 set prom_set_trap_table_name, %g2 382 set prom_set_trap_table_name, %g2
377 stx %g2, [%sp + 2047 + 128 + 0x00] 383 stx %g2, [%sp + 2047 + 128 + 0x00]
378 mov 1, %g2 384 mov 1, %g2
@@ -386,7 +392,11 @@ after_lock_tlb:
386 call %o1 392 call %o1
387 add %sp, (2047 + 128), %o0 393 add %sp, (2047 + 128), %o0
388 394
3892: ldx [%l0], %g6 3953: sethi %hi(prom_entry_lock), %g2
396 stb %g0, [%g2 + %lo(prom_entry_lock)]
397 membar #StoreStore | #StoreLoad
398
399 ldx [%l0], %g6
390 ldx [%g6 + TI_TASK], %g4 400 ldx [%g6 + TI_TASK], %g4
391 401
392 mov 1, %g5 402 mov 1, %g5