diff options
Diffstat (limited to 'include/asm-mips/stackframe.h')
-rw-r--r-- | include/asm-mips/stackframe.h | 10 |
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 |