Mercurial > hg > aboriginal
comparison sources/patches/linux-sparc.patch @ 1473:a584fb153593
Fix sparc kernel's relocation code.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sun, 18 Dec 2011 13:34:35 -0600 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1472:a4673f17b7c0 | 1473:a584fb153593 |
---|---|
1 Subject: Re: Sparc-32 doesn't work in 3.1. | |
2 From: David Miller <davem@davemloft.net> | |
3 Date: Wed, 14 Dec 2011 12:54:43 -0500 (EST) | |
4 | |
5 > The right fix is to simply teach btfixup to be able to patch | |
6 > the 'restore' just as equally as it would patch an 'or'. | |
7 | |
8 Try this: | |
9 | |
10 -------------------- | |
11 sparc32: Be less strict in matching %lo part of relocation. | |
12 | |
13 The "(insn & 0x01800000) != 0x01800000" test matches 'restore' | |
14 but that is a legitimate place to see the %lo() part of a 32-bit | |
15 symbol relocation, particularly in tail calls. | |
16 | |
17 Signed-off-by: David S. Miller <davem@davemloft.net> | |
18 --- | |
19 arch/sparc/mm/btfixup.c | 3 +-- | |
20 1 files changed, 1 insertions(+), 2 deletions(-) | |
21 | |
22 diff --git a/arch/sparc/mm/btfixup.c b/arch/sparc/mm/btfixup.c | |
23 index 5175ac2..8a7f817 100644 | |
24 --- a/arch/sparc/mm/btfixup.c | |
25 +++ b/arch/sparc/mm/btfixup.c | |
26 @@ -302,8 +302,7 @@ void __init btfixup(void) | |
27 case 'i': /* INT */ | |
28 if ((insn & 0xc1c00000) == 0x01000000) /* %HI */ | |
29 set_addr(addr, q[1], fmangled, (insn & 0xffc00000) | (p[1] >> 10)); | |
30 - else if ((insn & 0x80002000) == 0x80002000 && | |
31 - (insn & 0x01800000) != 0x01800000) /* %LO */ | |
32 + else if ((insn & 0x80002000) == 0x80002000) /* %LO */ | |
33 set_addr(addr, q[1], fmangled, (insn & 0xffffe000) | (p[1] & 0x3ff)); | |
34 else { | |
35 prom_printf(insn_i, p, addr, insn); | |
36 -- | |
37 1.7.6.401.g6a319 | |
38 | |
39 |