lkml.org 
[lkml]   [2010]   [Feb]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] [RFC][x86] move notify_die from nmi.c to traps.c
On Thu, Jan 28, 2010 at 10:46:46AM -0500, Don Zickus wrote:
> On Thu, Jan 28, 2010 at 06:10:25PM +0300, Cyrill Gorcunov wrote:
> > On Wed, Jan 27, 2010 at 03:03:40PM -0500, Don Zickus wrote:
> > ...
> > > diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
> > > index 3339917..3b98dd3 100644
> > > --- a/arch/x86/kernel/traps.c
> > > +++ b/arch/x86/kernel/traps.c
> > > @@ -400,6 +400,11 @@ static notrace __kprobes void default_do_nmi(struct pt_regs *regs)
> > > if (notify_die(DIE_NMI_IPI, "nmi_ipi", regs, reason, 2, SIGINT)
> > > == NOTIFY_STOP)
> > > return;
> > > +
> > > + if (notify_die(DIE_NMI, "nmi", regs, reason, 2, SIGINT)
> > > + == NOTIFY_STOP)
> > > + return;
> > > +
> > > #ifdef CONFIG_X86_LOCAL_APIC
> > > /*
> > > * Ok, so this is none of the documented NMI sources,
> > > --
> >
> > Hi Don, I suppose this notify_die should be in CONFIG_X86_LOCAL_APIC
> > section?
>
> To maintain old behaviour I suppose, yes. Personally I don't think
> notify_die has anything to do with CONFIG_X86_LOCAL_APIC so I put it in
> above the #define.
>

I think it is. It becomes that if some (possible buggy in future) code
notify default_do_nmi via NOTIFY_STOP we may loose unknown_nmi_error
for non-apic configs. And I reckon that even DIE_NMI_IPI is a bit "weird"
by not being under apic here, but this one should stay there in a
sake of kgdb I guess.

All-in-one: I would better not change old behaviour.

Though, it is possbile that I just miss something obvious :)

> Cheers,
> Don
>
-- Cyrill


\
 
 \ /
  Last update: 2010-02-02 19:01    [W:0.062 / U:0.672 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site