diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-17 19:38:06 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-17 19:38:06 -0500 |
commit | dbfc985195410dad803c845743c63cd73bd1fe32 (patch) | |
tree | 6bf6dbecb92539285ebb89948e63e691a0947941 /arch/mips/include/asm/stackframe.h | |
parent | 7c508e50be47737b9a72d0f15c3ef1146925e2d2 (diff) | |
parent | 606d62fa02cf1da43c6e21521650fff07a2e56d1 (diff) |
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (71 commits)
MIPS: Lasat: Fix botched changes to sysctl code.
RTC: rtc-cmos.c: Fix warning on MIPS
MIPS: Cleanup random differences beween lmo and Linus' kernel.
MIPS: No longer hardwire CONFIG_EMBEDDED to y
MIPS: Fix and enhance built-in kernel command line
MIPS: eXcite: Remove platform.
MIPS: Loongson: Cleanups of serial port support
MIPS: Lemote 2F: Suspend CS5536 MFGPT Timer
MIPS: Excite: move iodev_remove to .devexit.text
MIPS: Lasat: Convert to proc_fops / seq_file
MIPS: Cleanup signal code initialization
MIPS: Modularize COP2 handling
MIPS: Move EARLY_PRINTK to Kconfig.debug
MIPS: Yeeloong 2F: Cleanup reset logic using the new ec_write function
MIPS: Yeeloong 2F: Add LID open event as the wakeup event
MIPS: Yeeloong 2F: Add basic EC operations
MIPS: Move several variables from .bss to .init.data
MIPS: Tracing: Make function graph tracer work with -mmcount-ra-address
MIPS: Tracing: Reserve $12(t0) for mcount-ra-address of gcc 4.5
MIPS: Tracing: Make ftrace for MIPS work without -fno-omit-frame-pointer
...
Diffstat (limited to 'arch/mips/include/asm/stackframe.h')
-rw-r--r-- | arch/mips/include/asm/stackframe.h | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/arch/mips/include/asm/stackframe.h b/arch/mips/include/asm/stackframe.h index db0fa7b5aeaf..3b6da3330e32 100644 --- a/arch/mips/include/asm/stackframe.h +++ b/arch/mips/include/asm/stackframe.h | |||
@@ -51,9 +51,6 @@ | |||
51 | LONG_S v1, PT_ACX(sp) | 51 | LONG_S v1, PT_ACX(sp) |
52 | #else | 52 | #else |
53 | mfhi v1 | 53 | mfhi v1 |
54 | LONG_S v1, PT_HI(sp) | ||
55 | mflo v1 | ||
56 | LONG_S v1, PT_LO(sp) | ||
57 | #endif | 54 | #endif |
58 | #ifdef CONFIG_32BIT | 55 | #ifdef CONFIG_32BIT |
59 | LONG_S $8, PT_R8(sp) | 56 | LONG_S $8, PT_R8(sp) |
@@ -62,10 +59,17 @@ | |||
62 | LONG_S $10, PT_R10(sp) | 59 | LONG_S $10, PT_R10(sp) |
63 | LONG_S $11, PT_R11(sp) | 60 | LONG_S $11, PT_R11(sp) |
64 | LONG_S $12, PT_R12(sp) | 61 | LONG_S $12, PT_R12(sp) |
62 | #ifndef CONFIG_CPU_HAS_SMARTMIPS | ||
63 | LONG_S v1, PT_HI(sp) | ||
64 | mflo v1 | ||
65 | #endif | ||
65 | LONG_S $13, PT_R13(sp) | 66 | LONG_S $13, PT_R13(sp) |
66 | LONG_S $14, PT_R14(sp) | 67 | LONG_S $14, PT_R14(sp) |
67 | LONG_S $15, PT_R15(sp) | 68 | LONG_S $15, PT_R15(sp) |
68 | LONG_S $24, PT_R24(sp) | 69 | LONG_S $24, PT_R24(sp) |
70 | #ifndef CONFIG_CPU_HAS_SMARTMIPS | ||
71 | LONG_S v1, PT_LO(sp) | ||
72 | #endif | ||
69 | .endm | 73 | .endm |
70 | 74 | ||
71 | .macro SAVE_STATIC | 75 | .macro SAVE_STATIC |
@@ -83,15 +87,19 @@ | |||
83 | #ifdef CONFIG_SMP | 87 | #ifdef CONFIG_SMP |
84 | #ifdef CONFIG_MIPS_MT_SMTC | 88 | #ifdef CONFIG_MIPS_MT_SMTC |
85 | #define PTEBASE_SHIFT 19 /* TCBIND */ | 89 | #define PTEBASE_SHIFT 19 /* TCBIND */ |
90 | #define CPU_ID_REG CP0_TCBIND | ||
91 | #define CPU_ID_MFC0 mfc0 | ||
92 | #elif defined(CONFIG_MIPS_PGD_C0_CONTEXT) | ||
93 | #define PTEBASE_SHIFT 48 /* XCONTEXT */ | ||
94 | #define CPU_ID_REG CP0_XCONTEXT | ||
95 | #define CPU_ID_MFC0 MFC0 | ||
86 | #else | 96 | #else |
87 | #define PTEBASE_SHIFT 23 /* CONTEXT */ | 97 | #define PTEBASE_SHIFT 23 /* CONTEXT */ |
98 | #define CPU_ID_REG CP0_CONTEXT | ||
99 | #define CPU_ID_MFC0 MFC0 | ||
88 | #endif | 100 | #endif |
89 | .macro get_saved_sp /* SMP variation */ | 101 | .macro get_saved_sp /* SMP variation */ |
90 | #ifdef CONFIG_MIPS_MT_SMTC | 102 | CPU_ID_MFC0 k0, CPU_ID_REG |
91 | mfc0 k0, CP0_TCBIND | ||
92 | #else | ||
93 | MFC0 k0, CP0_CONTEXT | ||
94 | #endif | ||
95 | #if defined(CONFIG_32BIT) || defined(KBUILD_64BIT_SYM32) | 103 | #if defined(CONFIG_32BIT) || defined(KBUILD_64BIT_SYM32) |
96 | lui k1, %hi(kernelsp) | 104 | lui k1, %hi(kernelsp) |
97 | #else | 105 | #else |
@@ -107,11 +115,7 @@ | |||
107 | .endm | 115 | .endm |
108 | 116 | ||
109 | .macro set_saved_sp stackp temp temp2 | 117 | .macro set_saved_sp stackp temp temp2 |
110 | #ifdef CONFIG_MIPS_MT_SMTC | 118 | CPU_ID_MFC0 \temp, CPU_ID_REG |
111 | mfc0 \temp, CP0_TCBIND | ||
112 | #else | ||
113 | MFC0 \temp, CP0_CONTEXT | ||
114 | #endif | ||
115 | LONG_SRL \temp, PTEBASE_SHIFT | 119 | LONG_SRL \temp, PTEBASE_SHIFT |
116 | LONG_S \stackp, kernelsp(\temp) | 120 | LONG_S \stackp, kernelsp(\temp) |
117 | .endm | 121 | .endm |
@@ -166,7 +170,6 @@ | |||
166 | LONG_S $0, PT_R0(sp) | 170 | LONG_S $0, PT_R0(sp) |
167 | mfc0 v1, CP0_STATUS | 171 | mfc0 v1, CP0_STATUS |
168 | LONG_S $2, PT_R2(sp) | 172 | LONG_S $2, PT_R2(sp) |
169 | LONG_S v1, PT_STATUS(sp) | ||
170 | #ifdef CONFIG_MIPS_MT_SMTC | 173 | #ifdef CONFIG_MIPS_MT_SMTC |
171 | /* | 174 | /* |
172 | * Ideally, these instructions would be shuffled in | 175 | * Ideally, these instructions would be shuffled in |
@@ -178,20 +181,21 @@ | |||
178 | LONG_S v1, PT_TCSTATUS(sp) | 181 | LONG_S v1, PT_TCSTATUS(sp) |
179 | #endif /* CONFIG_MIPS_MT_SMTC */ | 182 | #endif /* CONFIG_MIPS_MT_SMTC */ |
180 | LONG_S $4, PT_R4(sp) | 183 | LONG_S $4, PT_R4(sp) |
181 | mfc0 v1, CP0_CAUSE | ||
182 | LONG_S $5, PT_R5(sp) | 184 | LONG_S $5, PT_R5(sp) |
183 | LONG_S v1, PT_CAUSE(sp) | 185 | LONG_S v1, PT_STATUS(sp) |
186 | mfc0 v1, CP0_CAUSE | ||
184 | LONG_S $6, PT_R6(sp) | 187 | LONG_S $6, PT_R6(sp) |
185 | MFC0 v1, CP0_EPC | ||
186 | LONG_S $7, PT_R7(sp) | 188 | LONG_S $7, PT_R7(sp) |
189 | LONG_S v1, PT_CAUSE(sp) | ||
190 | MFC0 v1, CP0_EPC | ||
187 | #ifdef CONFIG_64BIT | 191 | #ifdef CONFIG_64BIT |
188 | LONG_S $8, PT_R8(sp) | 192 | LONG_S $8, PT_R8(sp) |
189 | LONG_S $9, PT_R9(sp) | 193 | LONG_S $9, PT_R9(sp) |
190 | #endif | 194 | #endif |
191 | LONG_S v1, PT_EPC(sp) | ||
192 | LONG_S $25, PT_R25(sp) | 195 | LONG_S $25, PT_R25(sp) |
193 | LONG_S $28, PT_R28(sp) | 196 | LONG_S $28, PT_R28(sp) |
194 | LONG_S $31, PT_R31(sp) | 197 | LONG_S $31, PT_R31(sp) |
198 | LONG_S v1, PT_EPC(sp) | ||
195 | ori $28, sp, _THREAD_MASK | 199 | ori $28, sp, _THREAD_MASK |
196 | xori $28, _THREAD_MASK | 200 | xori $28, _THREAD_MASK |
197 | #ifdef CONFIG_CPU_CAVIUM_OCTEON | 201 | #ifdef CONFIG_CPU_CAVIUM_OCTEON |