aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-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