aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-mips
diff options
context:
space:
mode:
authorThiemo Seufer <ths@networkno.de>2005-07-08 04:03:48 -0400
committerRalf Baechle <ralf@linux-mips.org>2005-10-29 14:31:39 -0400
commit9556ac2fa1b16ec702e200fc558636a09a50f0e0 (patch)
tree39b51399de0785b07d7ad8bbcdc9151fb33fe073 /include/asm-mips
parent4552074577c639da32dd58a617ea11ac3e28912b (diff)
Fix get_saved_sp for 64bit address space. Simplify set_save_sp.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Thiemo Seufer <ths@networkno.de>
Diffstat (limited to 'include/asm-mips')
-rw-r--r--include/asm-mips/stackframe.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/include/asm-mips/stackframe.h b/include/asm-mips/stackframe.h
index de303e96260e..a8919dcc93c8 100644
--- a/include/asm-mips/stackframe.h
+++ b/include/asm-mips/stackframe.h
@@ -90,24 +90,28 @@
90#ifdef CONFIG_32BIT 90#ifdef CONFIG_32BIT
91 mfc0 \temp, CP0_CONTEXT 91 mfc0 \temp, CP0_CONTEXT
92 srl \temp, 23 92 srl \temp, 23
93 LONG_S \stackp, kernelsp(\temp)
94#endif 93#endif
95#if defined(CONFIG_64BIT) && !defined(CONFIG_BUILD_ELF64) 94#if defined(CONFIG_64BIT) && !defined(CONFIG_BUILD_ELF64)
96 lw \temp, TI_CPU(gp) 95 lw \temp, TI_CPU(gp)
97 dsll \temp, 3 96 dsll \temp, 3
98 lui \temp2, %hi(kernelsp)
99 daddu \temp, \temp2
100 LONG_S \stackp, %lo(kernelsp)(\temp)
101#endif 97#endif
102#if defined(CONFIG_64BIT) && defined(CONFIG_BUILD_ELF64) 98#if defined(CONFIG_64BIT) && defined(CONFIG_BUILD_ELF64)
103 MFC0 \temp, CP0_CONTEXT 99 MFC0 \temp, CP0_CONTEXT
104 dsrl \temp, 23 100 dsrl \temp, 23
105 LONG_S \stackp, kernelsp(\temp)
106#endif 101#endif
102 LONG_S \stackp, kernelsp(\temp)
107 .endm 103 .endm
108#else 104#else
109 .macro get_saved_sp /* Uniprocessor variation */ 105 .macro get_saved_sp /* Uniprocessor variation */
106#if defined(CONFIG_64BIT) && defined(CONFIG_BUILD_ELF64)
107 lui k1, %highest(kernelsp)
108 daddiu k1, %higher(kernelsp)
109 dsll k1, k1, 16
110 daddiu k1, %hi(kernelsp)
111 dsll k1, k1, 16
112#else
110 lui k1, %hi(kernelsp) 113 lui k1, %hi(kernelsp)
114#endif
111 LONG_L k1, %lo(kernelsp)(k1) 115 LONG_L k1, %lo(kernelsp)(k1)
112 .endm 116 .endm
113 117