Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e6efcbf3 authored by Chong Qiao's avatar Chong Qiao Committed by Greg Kroah-Hartman
Browse files

MIPS: KGDB: fix kgdb support for SMP platforms.



[ Upstream commit ab8a6d821179ab9bea1a9179f535ccba6330c1ed ]

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: default avatarChong Qiao <qiaochong@loongson.cn>
Reviewed-by: default avatarDouglas Anderson <dianders@chromium.org>
Acked-by: default avatarDaniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: default avatarPaul Burton <paul.burton@mips.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: James Hogan <jhogan@kernel.org>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Christophe Leroy <christophe.leroy@c-s.fr>
Cc: linux-mips@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: QiaoChong <qiaochong@loongson.cn>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 09c6954e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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 @@ static void kgdb_call_nmi_hook(void *ignored)
	old_fs = get_fs();
	set_fs(get_ds());

	kgdb_nmicallback(raw_smp_processor_id(), NULL);
	kgdb_nmicallback(raw_smp_processor_id(), get_irq_regs());

	set_fs(old_fs);
}