aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-mips/stackframe.h
diff options
context:
space:
mode:
authorThiemo Seufer <ths@networkno.de>2005-04-01 09:07:13 -0500
committerRalf Baechle <ralf@linux-mips.org>2005-10-29 14:31:00 -0400
commit1b3a6e975cbe81c5abc55e4c1b9f5b5250c5f20e (patch)
tree541db3912172f82d30244cf215b1a1b91d8c6f7f /include/asm-mips/stackframe.h
parent7c2740f1c1a7ff2767a92042f39edad7fad95c92 (diff)
Fix 64bit SMP TLB handler and stack frame handling, optimize 32bit SMP
TLB handlers a bit, match definitions in pgtable-{32,64}.h better. Signed-off-by: Thiemo Seufer <ths@networkno.de> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
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 e33e302c3429..de303e96260e 100644
--- a/include/asm-mips/stackframe.h
+++ b/include/asm-mips/stackframe.h
@@ -60,7 +60,6 @@
60 mfc0 k0, CP0_CONTEXT 60 mfc0 k0, CP0_CONTEXT
61 lui k1, %hi(kernelsp) 61 lui k1, %hi(kernelsp)
62 srl k0, k0, 23 62 srl k0, k0, 23
63 sll k0, k0, 2
64 addu k1, k0 63 addu k1, k0
65 LONG_L k1, %lo(kernelsp)(k1) 64 LONG_L k1, %lo(kernelsp)(k1)
66#endif 65#endif
@@ -76,12 +75,12 @@
76#endif 75#endif
77#if defined(CONFIG_64BIT) && defined(CONFIG_BUILD_ELF64) 76#if defined(CONFIG_64BIT) && defined(CONFIG_BUILD_ELF64)
78 MFC0 k1, CP0_CONTEXT 77 MFC0 k1, CP0_CONTEXT
79 dsrl k1, 23
80 dsll k1, k1, 3
81 lui k0, %highest(kernelsp) 78 lui k0, %highest(kernelsp)
79 dsrl k1, 23
82 daddiu k0, %higher(kernelsp) 80 daddiu k0, %higher(kernelsp)
83 dsll k0, k0, 16 81 dsll k0, k0, 16
84 daddiu k0, %hi(kernelsp) 82 daddiu k0, %hi(kernelsp)
83 dsll k0, k0, 16
85 daddu k1, k1, k0 84 daddu k1, k1, k0
86 LONG_L k1, %lo(kernelsp)(k1) 85 LONG_L k1, %lo(kernelsp)(k1)
87#endif 86#endif
@@ -91,7 +90,6 @@
91#ifdef CONFIG_32BIT 90#ifdef CONFIG_32BIT
92 mfc0 \temp, CP0_CONTEXT 91 mfc0 \temp, CP0_CONTEXT
93 srl \temp, 23 92 srl \temp, 23
94 sll \temp, 2
95 LONG_S \stackp, kernelsp(\temp) 93 LONG_S \stackp, kernelsp(\temp)
96#endif 94#endif
97#if defined(CONFIG_64BIT) && !defined(CONFIG_BUILD_ELF64) 95#if defined(CONFIG_64BIT) && !defined(CONFIG_BUILD_ELF64)
@@ -102,8 +100,8 @@
102 LONG_S \stackp, %lo(kernelsp)(\temp) 100 LONG_S \stackp, %lo(kernelsp)(\temp)
103#endif 101#endif
104#if defined(CONFIG_64BIT) && defined(CONFIG_BUILD_ELF64) 102#if defined(CONFIG_64BIT) && defined(CONFIG_BUILD_ELF64)
105 lw \temp, TI_CPU(gp) 103 MFC0 \temp, CP0_CONTEXT
106 dsll \temp, 3 104 dsrl \temp, 23
107 LONG_S \stackp, kernelsp(\temp) 105 LONG_S \stackp, kernelsp(\temp)
108#endif 106#endif
109 .endm 107 .endm