aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sparc64/system.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2007-10-31 00:11:28 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-31 18:30:56 -0400
commit52eb053b7191f1d3017a56e921753e3097876c47 (patch)
tree494c5212f096642d815f62472325235b5abecf35 /include/asm-sparc64/system.h
parentd6898556e90ba9842e59ac9c2425b42ea33019b4 (diff)
[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/system.h')
-rw-r--r--include/asm-sparc64/system.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/asm-sparc64/system.h b/include/asm-sparc64/system.h
index 159e62b51d70..99a669c190c7 100644
--- a/include/asm-sparc64/system.h
+++ b/include/asm-sparc64/system.h
@@ -178,7 +178,9 @@ do { if (test_thread_flag(TIF_PERFCTR)) { \
178 "ldx [%%g6 + %9], %%g4\n\t" \ 178 "ldx [%%g6 + %9], %%g4\n\t" \
179 "brz,pt %%o7, 1f\n\t" \ 179 "brz,pt %%o7, 1f\n\t" \
180 " mov %%g7, %0\n\t" \ 180 " mov %%g7, %0\n\t" \
181 "b,a ret_from_syscall\n\t" \ 181 "sethi %%hi(ret_from_syscall), %%g1\n\t" \
182 "jmpl %%g1 + %%lo(ret_from_syscall), %%g0\n\t" \
183 " nop\n\t" \
182 "1:\n\t" \ 184 "1:\n\t" \
183 : "=&r" (last), "=r" (current), "=r" (current_thread_info_reg), \ 185 : "=&r" (last), "=r" (current), "=r" (current_thread_info_reg), \
184 "=r" (__local_per_cpu_offset) \ 186 "=r" (__local_per_cpu_offset) \