summaryrefslogtreecommitdiffstats
path: root/include/asm-sparc64/futex.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2007-10-30 21:11:28 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-31 15:30:56 -0700
commit52eb053b7191f1d3017a56e921753e3097876c47 (patch)
tree494c5212f096642d815f62472325235b5abecf35 /include/asm-sparc64/futex.h
parentd6898556e90ba9842e59ac9c2425b42ea33019b4 (diff)
downloadtalos-op-linux-52eb053b7191f1d3017a56e921753e3097876c47.tar.gz
talos-op-linux-52eb053b7191f1d3017a56e921753e3097876c47.zip
[SPARC64]: Fix linkage of enormous kernels.
This was found by make randconfig If the kernel .text is very large, the .fixup section branches are too far away to be relocated correctly. Use "sethi %hi(label), reg; jmpl reg + %lo(label); %g0" sequence instead of the branch to fix this. There is another case in switch_to() involving a branch, which is fixed similarly. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/asm-sparc64/futex.h')
-rw-r--r--include/asm-sparc64/futex.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/asm-sparc64/futex.h b/include/asm-sparc64/futex.h
index 876312fe82cc..df1097d6ffbe 100644
--- a/include/asm-sparc64/futex.h
+++ b/include/asm-sparc64/futex.h
@@ -17,7 +17,8 @@
"3:\n" \
" .section .fixup,#alloc,#execinstr\n" \
" .align 4\n" \
- "4: ba 3b\n" \
+ "4: sethi %%hi(3b), %0\n" \
+ " jmpl %0 + %%lo(3b), %%g0\n" \
" mov %5, %0\n" \
" .previous\n" \
" .section __ex_table,\"a\"\n" \
@@ -91,7 +92,8 @@ futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval)
"2:\n"
" .section .fixup,#alloc,#execinstr\n"
" .align 4\n"
- "3: ba 2b\n"
+ "3: sethi %%hi(2b), %0\n"
+ " jmpl %0 + %%lo(2b), %%g0\n"
" mov %4, %0\n"
" .previous\n"
" .section __ex_table,\"a\"\n"
OpenPOWER on IntegriCloud