sparc32: Be less strict in matching %lo part of relocation.
authorDavid S. Miller <davem@davemloft.net>
Wed, 14 Dec 2011 18:05:22 +0000 (10:05 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 14 Dec 2011 18:57:28 +0000 (10:57 -0800)
The "(insn & 0x01800000) != 0x01800000" test matches 'restore'
but that is a legitimate place to see the %lo() part of a 32-bit
symbol relocation, particularly in tail calls.

Signed-off-by: David S. Miller <davem@davemloft.net>
Tested-by: Sergei Trofimovich <slyfox@gentoo.org>
arch/sparc/mm/btfixup.c

index 5175ac2f4820c603d55e5fba0c06b735080edf96..8a7f81743c126b1b8648584e20504dce6111dd48 100644 (file)
@@ -302,8 +302,7 @@ void __init btfixup(void)
                                case 'i':       /* INT */
                                        if ((insn & 0xc1c00000) == 0x01000000) /* %HI */
                                                set_addr(addr, q[1], fmangled, (insn & 0xffc00000) | (p[1] >> 10));
-                                       else if ((insn & 0x80002000) == 0x80002000 &&
-                                                (insn & 0x01800000) != 0x01800000) /* %LO */
+                                       else if ((insn & 0x80002000) == 0x80002000) /* %LO */
                                                set_addr(addr, q[1], fmangled, (insn & 0xffffe000) | (p[1] & 0x3ff));
                                        else {
                                                prom_printf(insn_i, p, addr, insn);