MIPS: KGDB: fix kgdb support for SMP platforms.
authorChong Qiao <qiaochong@loongson.cn>
Wed, 27 Mar 2019 23:08:01 +0000 (07:08 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 May 2019 15:54:07 +0000 (17:54 +0200)
commite6efcbf3cbceadfd24c97a45efb1c2a91faf5978
tree2870ebf403c2af2339ba1d7ac070f61347a810ee
parent09c6954e83e8b34eb7f2c18783b31818c8fd1628
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: Chong Qiao <qiaochong@loongson.cn>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Acked-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Paul 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: Sasha Levin <sashal@kernel.org>
arch/mips/kernel/kgdb.c