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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 08, 2013 at 11:48:54AM +0000, thomas.langer@xxxxxxxxxx wrote:

> >  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?

The installation of an NMI handler is platform specific - this handler
however in all its simplicity is generic - or at least trying to.

The NMI on MIPS is notoriously hard to use.  The vectors is pointing to
the boot ROM so firmware first gets its grubby hands on a fresh NMI and
on most systems it'll do the firmware equivalent of a panic or reset
the system outright.  If that's still working - it's about the worst
tested functionality of firmware ...

  Ralf


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux