mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] MIPS: KGDB: fix kgdb support for SMP platforms.
@ 2019-03-27 15:05 qiaochong
  2019-03-27 16:25 ` Doug Anderson
  0 siblings, 1 reply; 12+ messages in thread
From: qiaochong @ 2019-03-27 15:05 UTC (permalink / raw)
  To: Ralf Baechle, Paul Burton, James Hogan, Daniel Thompson,
	Douglas Anderson, Will Deacon, Christophe Leroy
  Cc: linux-mips, linux-kernel, QiaoChong

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: qiaochong <qiaochong@loongson.cn>
---
 arch/mips/kernel/kgdb.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/mips/kernel/kgdb.c b/arch/mips/kernel/kgdb.c
index 6e574c02e4c3b..ea781b29f7f17 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);
 }
-- 
2.17.0



^ permalink raw reply	[flat|nested] 12+ messages in thread
* [PATCH] MIPS: KGDB: fix kgdb support for SMP platforms.
@ 2019-03-27 23:08 Chong Qiao
  2019-03-27 23:15 ` Doug Anderson
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Chong Qiao @ 2019-03-27 23:08 UTC (permalink / raw)
  To: Ralf Baechle, Paul Burton, James Hogan, Daniel Thompson,
	Douglas Anderson, Will Deacon, Christophe Leroy
  Cc: linux-mips, linux-kernel, QiaoChong

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 <qiaochong@loongson.cn>
---
 arch/mips/kernel/kgdb.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/mips/kernel/kgdb.c b/arch/mips/kernel/kgdb.c
index 6e574c02e4c3b..ea781b29f7f17 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);
 }
-- 
2.17.0



^ permalink raw reply	[flat|nested] 12+ messages in thread
* [PATCH] MIPS: KGDB: fix kgdb support for SMP platforms.
@ 2019-03-27 13:17 qiaochong
  2019-03-27 14:37 ` Doug Anderson
  0 siblings, 1 reply; 12+ messages in thread
From: qiaochong @ 2019-03-27 13:17 UTC (permalink / raw)
  To: Ralf Baechle, Paul Burton, James Hogan, Daniel Thompson,
	Douglas Anderson, Will Deacon, Christophe Leroy
  Cc: linux-mips, linux-kernel, QiaoChong

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: qiaochong <qiaochong@loongson.cn>
---
 arch/mips/kernel/kgdb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/kernel/kgdb.c b/arch/mips/kernel/kgdb.c
index 6e574c02e4c3b..6c438a0fd2075 100644
--- a/arch/mips/kernel/kgdb.c
+++ b/arch/mips/kernel/kgdb.c
@@ -214,7 +214,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);
 }
-- 
2.17.0



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-03-28 18:36 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-27 15:05 [PATCH] MIPS: KGDB: fix kgdb support for SMP platforms qiaochong
2019-03-27 16:25 ` Doug Anderson
2019-03-27 22:25   ` qiaochong
2019-03-27 22:27     ` Doug Anderson
2019-03-27 23:12       ` qiaochong
2019-03-28  7:03       ` Daniel Thompson
  -- strict thread matches above, loose matches on Subject: below --
2019-03-27 23:08 Chong Qiao
2019-03-27 23:15 ` Doug Anderson
2019-03-28  7:06 ` Daniel Thompson
2019-03-28 18:36 ` Paul Burton
2019-03-27 13:17 qiaochong
2019-03-27 14:37 ` Doug Anderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®