diff options
Diffstat (limited to 'arch/mips/kernel/gdb-low.S')
-rw-r--r-- | arch/mips/kernel/gdb-low.S | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/arch/mips/kernel/gdb-low.S b/arch/mips/kernel/gdb-low.S index 235ad9f6bd35..5fd7a8af0c62 100644 --- a/arch/mips/kernel/gdb-low.S +++ b/arch/mips/kernel/gdb-low.S | |||
@@ -54,9 +54,11 @@ | |||
54 | */ | 54 | */ |
55 | mfc0 k0, CP0_CAUSE | 55 | mfc0 k0, CP0_CAUSE |
56 | andi k0, k0, 0x7c | 56 | andi k0, k0, 0x7c |
57 | add k1, k1, k0 | 57 | #ifdef CONFIG_64BIT |
58 | PTR_L k0, saved_vectors(k1) | 58 | dsll k0, k0, 1 |
59 | jr k0 | 59 | #endif |
60 | PTR_L k1, saved_vectors(k0) | ||
61 | jr k1 | ||
60 | nop | 62 | nop |
61 | 1: | 63 | 1: |
62 | move k0, sp | 64 | move k0, sp |
@@ -283,11 +285,33 @@ | |||
283 | */ | 285 | */ |
284 | 286 | ||
285 | 3: | 287 | 3: |
288 | #ifdef CONFIG_MIPS_MT_SMTC | ||
289 | /* Read-modify write of Status must be atomic */ | ||
290 | mfc0 t2, CP0_TCSTATUS | ||
291 | ori t1, t2, TCSTATUS_IXMT | ||
292 | mtc0 t1, CP0_TCSTATUS | ||
293 | andi t2, t2, TCSTATUS_IXMT | ||
294 | ehb | ||
295 | DMT 9 # dmt t1 | ||
296 | jal mips_ihb | ||
297 | nop | ||
298 | #endif /* CONFIG_MIPS_MT_SMTC */ | ||
286 | mfc0 t0, CP0_STATUS | 299 | mfc0 t0, CP0_STATUS |
287 | ori t0, 0x1f | 300 | ori t0, 0x1f |
288 | xori t0, 0x1f | 301 | xori t0, 0x1f |
289 | mtc0 t0, CP0_STATUS | 302 | mtc0 t0, CP0_STATUS |
290 | 303 | #ifdef CONFIG_MIPS_MT_SMTC | |
304 | andi t1, t1, VPECONTROL_TE | ||
305 | beqz t1, 9f | ||
306 | nop | ||
307 | EMT # emt | ||
308 | 9: | ||
309 | mfc0 t1, CP0_TCSTATUS | ||
310 | xori t1, t1, TCSTATUS_IXMT | ||
311 | or t1, t1, t2 | ||
312 | mtc0 t1, CP0_TCSTATUS | ||
313 | ehb | ||
314 | #endif /* CONFIG_MIPS_MT_SMTC */ | ||
291 | LONG_L v0, GDB_FR_STATUS(sp) | 315 | LONG_L v0, GDB_FR_STATUS(sp) |
292 | LONG_L v1, GDB_FR_EPC(sp) | 316 | LONG_L v1, GDB_FR_EPC(sp) |
293 | mtc0 v0, CP0_STATUS | 317 | mtc0 v0, CP0_STATUS |