linux-mips
[Top] [All Lists]

RE: [PATCH] MIPS: Print correct PC in trace dump after NMI exception

To: <markos.chandras@imgtec.com>, <linux-mips@linux-mips.org>
Subject: RE: [PATCH] MIPS: Print correct PC in trace dump after NMI exception
From: <thomas.langer@lantiq.com>
Date: Tue, 8 Oct 2013 11:48:54 +0000
Accept-language: de-DE, en-US
Cc: <Leonid.Yegoshin@imgtec.com>
In-reply-to: <1381232371-25017-1-git-send-email-markos.chandras@imgtec.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1381232371-25017-1-git-send-email-markos.chandras@imgtec.com>
Sender: linux-mips-bounce@linux-mips.org
Thread-index: AQHOxBshqs4+SS5ZNkq49qTjFbXjeJnqr81A
Thread-topic: [PATCH] MIPS: Print correct PC in trace dump after NMI exception
Hello Markos,

Markos Chandras wrote on 2013-10-08:
> From: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
> 
> An NMI exception delivered from YAMON delivers the PC in ErrorPC
> instead of EPC. It's also necessary to clear the Status.BEV
> bit for the page fault exception handler to work properly.
> 
> Signed-off-by: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
> Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
> ---


> @@ -1506,10 +1511,14 @@ int register_nmi_notifier(struct notifier_block
> *nb)
> 
>  void __noreturn nmi_exception_handler(struct pt_regs *regs)
>  {
> +     char str[100];
> +
>       raw_notifier_call_chain(&nmi_chain, 0, regs);
>       bust_spinlocks(1);
> -     printk("NMI taken!!!!\n");
> -     die("NMI", regs);
> +     snprintf(str, 100, "CPU%d NMI taken, CP0_EPC=%lx\n",
> +              smp_processor_id(), regs->cp0_epc);
> +     regs->cp0_epc = read_c0_errorepc();

If this is a YAMON specific fix, why is it done in a common file?

> +     die(str, regs);
>  }
>  
>  #define VECTORSPACING 0x100  /* for EI/VI mode */

Best Regards,
Thomas



<Prev in Thread] Current Thread [Next in Thread>