lkml.org 
[lkml]   [2019]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] MIPS: KGDB: fix kgdb support for SMP platforms.
Hi,

On Wed, Mar 27, 2019 at 8:06 AM qiaochong <qiaochong@loongson.cn> wrote:
>
> 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>

Note that you might want to adjust your git settings. Usually in the
kernel they require that a Signed-off-by have your real name, not just
your username. You probably need to spin your patch to fix this. You
should make sure that the authorship of the patch also has your real
name.


> ---
> 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);
> }

As per my reply on V1, feel free to add:

Reviewed-by: Douglas Anderson <dianders@chromium.org>

\
 
 \ /
  Last update: 2019-03-27 17:25    [W:0.050 / U:3.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site