diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2007-10-30 21:11:28 -0700 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-31 15:30:56 -0700 |
commit | 52eb053b7191f1d3017a56e921753e3097876c47 (patch) | |
tree | 494c5212f096642d815f62472325235b5abecf35 /include/asm-sparc64/uaccess.h | |
parent | d6898556e90ba9842e59ac9c2425b42ea33019b4 (diff) | |
download | kernel_samsung_tuna-52eb053b7191f1d3017a56e921753e3097876c47.zip kernel_samsung_tuna-52eb053b7191f1d3017a56e921753e3097876c47.tar.gz kernel_samsung_tuna-52eb053b7191f1d3017a56e921753e3097876c47.tar.bz2 |
[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/uaccess.h')
-rw-r--r-- | include/asm-sparc64/uaccess.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/asm-sparc64/uaccess.h b/include/asm-sparc64/uaccess.h index afe236b..93720e7 100644 --- a/include/asm-sparc64/uaccess.h +++ b/include/asm-sparc64/uaccess.h @@ -123,7 +123,8 @@ __asm__ __volatile__( \ ".section .fixup,#alloc,#execinstr\n\t" \ ".align 4\n" \ "3:\n\t" \ - "b 2b\n\t" \ + "sethi %%hi(2b), %0\n\t" \ + "jmpl %0 + %%lo(2b), %%g0\n\t" \ " mov %3, %0\n\n\t" \ ".previous\n\t" \ ".section __ex_table,\"a\"\n\t" \ @@ -165,8 +166,9 @@ __asm__ __volatile__( \ ".section .fixup,#alloc,#execinstr\n\t" \ ".align 4\n" \ "3:\n\t" \ + "sethi %%hi(2b), %0\n\t" \ "clr %1\n\t" \ - "b 2b\n\t" \ + "jmpl %0 + %%lo(2b), %%g0\n\t" \ " mov %3, %0\n\n\t" \ ".previous\n\t" \ ".section __ex_table,\"a\"\n\t" \ |