aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChong Qiao <[email protected]>2019-03-28 07:08:01 +0800
committerPaul Burton <[email protected]>2019-03-28 11:35:58 -0700
commitab8a6d821179ab9bea1a9179f535ccba6330c1ed (patch)
treee9570b331de1ac69dc1f00e6d387be7b47a30e72
parent8c2ffd9174779014c3fe1f96d9dc3641d9175f00 (diff)
MIPS: KGDB: fix kgdb support for SMP platforms.
KGDB_call_nmi_hook is called by other cpu through smp call. MIPS smp call is processed in ipi irq handler and regs is saved in handle_int. So kgdb_call_nmi_hook get regs by get_irq_regs and regs will be passed to kgdb_cpu_enter. Signed-off-by: Chong Qiao <[email protected]> Reviewed-by: Douglas Anderson <[email protected]> Acked-by: Daniel Thompson <[email protected]> Signed-off-by: Paul Burton <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: James Hogan <[email protected]> Cc: Will Deacon <[email protected]> Cc: Christophe Leroy <[email protected]> Cc: [email protected] Cc: [email protected] Cc: QiaoChong <[email protected]>
-rw-r--r--arch/mips/kernel/kgdb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/mips/kernel/kgdb.c b/arch/mips/kernel/kgdb.c
index 6e574c02e4c3..ea781b29f7f1 100644
--- a/arch/mips/kernel/kgdb.c
+++ b/arch/mips/kernel/kgdb.c
@@ -33,6 +33,7 @@
#include <asm/processor.h>
#include <asm/sigcontext.h>
#include <linux/uaccess.h>
+#include <asm/irq_regs.h>
static struct hard_trap_info {
unsigned char tt; /* Trap type code for MIPS R3xxx and R4xxx */
@@ -214,7 +215,7 @@ void kgdb_call_nmi_hook(void *ignored)
old_fs = get_fs();
set_fs(KERNEL_DS);
- kgdb_nmicallback(raw_smp_processor_id(), NULL);
+ kgdb_nmicallback(raw_smp_processor_id(), get_irq_regs());
set_fs(old_fs);
}