parisc: use long branch in fork_like macro
authorJohn David Anglin <dave.anglin@bell.net>
Sat, 4 May 2013 19:16:41 +0000 (19:16 +0000)
committerHelge Deller <deller@gmx.de>
Mon, 6 May 2013 21:09:48 +0000 (23:09 +0200)
The "b" branch instruction used in the fork_like macro only can handle
17-bit pc-relative offsets.
This fails with an out of range offset with some .config files.
Rewrite to use the "be" instruction which
can branch to any address in a space.

Signed-off-by: John David Anglin <dave.anglin@bell.net>
Signed-off-by: Helge Deller <deller@gmx.de>
arch/parisc/kernel/entry.S

index aa486e46ab97d51852019cc3b85e1884f17e28b1..36f4f1dcb7786c8a21d320aabf3e0c1cc87a04f7 100644 (file)
@@ -1702,7 +1702,8 @@ ENTRY(sys_\name\()_wrapper)
        ldo     TASK_REGS(%r1),%r1
        reg_save %r1
        mfctl   %cr27, %r28
-       b       sys_\name
+       ldil    L%sys_\name, %r31
+       be      R%sys_\name(%sr4,%r31)
        STREG   %r28, PT_CR27(%r1)
 ENDPROC(sys_\name\()_wrapper)
        .endm