summaryrefslogtreecommitdiffstats
path: root/include/asm-mips/stackframe.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-mips/stackframe.h')
-rw-r--r--include/asm-mips/stackframe.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/include/asm-mips/stackframe.h b/include/asm-mips/stackframe.h
index e33e302c342..de303e96260 100644
--- a/include/asm-mips/stackframe.h
+++ b/include/asm-mips/stackframe.h
@@ -60,7 +60,6 @@
mfc0 k0, CP0_CONTEXT
lui k1, %hi(kernelsp)
srl k0, k0, 23
- sll k0, k0, 2
addu k1, k0
LONG_L k1, %lo(kernelsp)(k1)
#endif
@@ -76,12 +75,12 @@
#endif
#if defined(CONFIG_64BIT) && defined(CONFIG_BUILD_ELF64)
MFC0 k1, CP0_CONTEXT
- dsrl k1, 23
- dsll k1, k1, 3
lui k0, %highest(kernelsp)
+ dsrl k1, 23
daddiu k0, %higher(kernelsp)
dsll k0, k0, 16
daddiu k0, %hi(kernelsp)
+ dsll k0, k0, 16
daddu k1, k1, k0
LONG_L k1, %lo(kernelsp)(k1)
#endif
@@ -91,7 +90,6 @@
#ifdef CONFIG_32BIT
mfc0 \temp, CP0_CONTEXT
srl \temp, 23
- sll \temp, 2
LONG_S \stackp, kernelsp(\temp)
#endif
#if defined(CONFIG_64BIT) && !defined(CONFIG_BUILD_ELF64)
@@ -102,8 +100,8 @@
LONG_S \stackp, %lo(kernelsp)(\temp)
#endif
#if defined(CONFIG_64BIT) && defined(CONFIG_BUILD_ELF64)
- lw \temp, TI_CPU(gp)
- dsll \temp, 3
+ MFC0 \temp, CP0_CONTEXT
+ dsrl \temp, 23
LONG_S \stackp, kernelsp(\temp)
#endif
.endm