forked from Minki/linux
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
This commit is contained in:
commit
5579a782ad
@ -31,7 +31,7 @@
|
||||
#define APC_DEVNAME "apc"
|
||||
|
||||
static u8 __iomem *regs;
|
||||
static int apc_no_idle __initdata = 0;
|
||||
static int apc_no_idle __devinitdata = 0;
|
||||
|
||||
#define apc_readb(offs) (sbus_readb(regs+offs))
|
||||
#define apc_writeb(val, offs) (sbus_writeb(val, regs+offs))
|
||||
|
@ -465,6 +465,7 @@ gokernel:
|
||||
mov %o7, %g4 ! Save %o7
|
||||
|
||||
/* Jump to it, and pray... */
|
||||
__INIT
|
||||
current_pc:
|
||||
call 1f
|
||||
nop
|
||||
|
@ -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
|
||||
|
@ -139,18 +139,27 @@ do { \
|
||||
if (X##_e <= _FP_WFRACBITS_##fs) \
|
||||
{ \
|
||||
_FP_FRAC_SRS_##wc(X, X##_e, _FP_WFRACBITS_##fs); \
|
||||
_FP_ROUND(wc, X); \
|
||||
if (_FP_FRAC_HIGH_##fs(X) \
|
||||
& (_FP_OVERFLOW_##fs >> 1)) \
|
||||
{ \
|
||||
X##_e = 1; \
|
||||
_FP_FRAC_SET_##wc(X, _FP_ZEROFRAC_##wc); \
|
||||
FP_SET_EXCEPTION(FP_EX_INEXACT); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
X##_e = 0; \
|
||||
_FP_FRAC_SRL_##wc(X, _FP_WORKBITS); \
|
||||
_FP_ROUND(wc, X); \
|
||||
if (_FP_FRAC_HIGH_##fs(X) \
|
||||
& (_FP_OVERFLOW_##fs >> 1)) \
|
||||
{ \
|
||||
X##_e = 1; \
|
||||
_FP_FRAC_SET_##wc(X, _FP_ZEROFRAC_##wc); \
|
||||
FP_SET_EXCEPTION(FP_EX_INEXACT); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
X##_e = 0; \
|
||||
_FP_FRAC_SRL_##wc(X, _FP_WORKBITS); \
|
||||
} \
|
||||
} \
|
||||
if ((FP_CUR_EXCEPTIONS & FP_EX_INEXACT) || \
|
||||
(FP_TRAPPING_EXCEPTIONS & FP_EX_UNDERFLOW)) \
|
||||
@ -494,6 +503,8 @@ do { \
|
||||
R##_c = FP_CLS_NAN; \
|
||||
_FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs); \
|
||||
FP_SET_EXCEPTION(FP_EX_INVALID | FP_EX_INVALID_IDI);\
|
||||
break; \
|
||||
\
|
||||
case _FP_CLS_COMBINE(FP_CLS_ZERO,FP_CLS_ZERO): \
|
||||
R##_s = _FP_NANSIGN_##fs; \
|
||||
R##_c = FP_CLS_NAN; \
|
||||
|
@ -14,6 +14,7 @@
|
||||
# M68k port by Geert Uytterhoeven and Andreas Schwab
|
||||
# AVR32 port by Haavard Skinnemoen <hskinnemoen@atmel.com>
|
||||
# PARISC port by Kyle McMartin <kyle@parisc-linux.org>
|
||||
# sparc port by Martin Habets <errandir_news@mph.eclipse.co.uk>
|
||||
#
|
||||
# Usage:
|
||||
# objdump -d vmlinux | scripts/checkstack.pl [arch]
|
||||
@ -94,6 +95,9 @@ my (@stack, $re, $dre, $x, $xs);
|
||||
} elsif ($arch =~ /^blackfin$/) {
|
||||
# 0: 00 e8 38 01 LINK 0x4e0;
|
||||
$re = qr/.*[[:space:]]LINK[[:space:]]*(0x$x{1,8})/o;
|
||||
} elsif ($arch eq 'sparc' || $arch eq 'sparc64') {
|
||||
# f0019d10: 9d e3 bf 90 save %sp, -112, %sp
|
||||
$re = qr/.*save.*%sp, -(([0-9]{2}|[3-9])[0-9]{2}), %sp/o;
|
||||
} else {
|
||||
print("wrong or unknown architecture \"$arch\"\n");
|
||||
exit
|
||||
|
Loading…
Reference in New Issue
Block a user