* What reassert_nmi() in default_do_nmi() is for?
@ 2010-08-30 8:56 Huang Ying
0 siblings, 0 replies; 2+ messages in thread
From: Huang Ying @ 2010-08-30 8:56 UTC (permalink / raw)
To: Ingo Molnar, hpa, Andi Kleen; +Cc: linux-kernel
Hi, All,
When reading NMI handler code, I find there is reassert_nmi() in the end
of default_do_nmi(). And it is only called if the reason & 0xc0 != 0
(reason = inb(0x61)).
The comments for it is as follow:
/*
* Reassert NMI in case it became active meanwhile
* as it's edge-triggered:
*/
reassert_nmi();
The implementation of reassert_nmi is as follow:
static inline void reassert_nmi(void)
{
int old_reg = -1;
if (do_i_have_lock_cmos())
old_reg = current_lock_cmos_reg();
else
lock_cmos(0); /* register doesn't matter here */
outb(0x8f, 0x70);
inb(0x71); /* dummy */
outb(0x0f, 0x70);
inb(0x71); /* dummy */
if (old_reg >= 0)
outb(old_reg, 0x70);
else
unlock_cmos();
}
I can not understand the code and the logic. Can anyone explain it in
more detail?
Thanks,
Huang Ying
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: What reassert_nmi() in default_do_nmi() is for?
@ 2010-08-30 10:51 Paolo Cancedda
0 siblings, 0 replies; 2+ messages in thread
From: Paolo Cancedda @ 2010-08-30 10:51 UTC (permalink / raw)
To: linux-kernel; +Cc: Huang Ying, Paolo Cancedda
> The implementation of reassert_nmi is as follow:
>
> [...]
>
> I can not understand the code and the logic. Can anyone explain it in
> more detail?
It's there since 2.3.20 (!), see
http://www.tm.kernel.org/pub/linux/kernel/v2.3/patch-html/patch-2.3.20/linux_arch_i386_kernel_traps.c.html
Googling around I found this thread:
http://www.gossamer-threads.com/lists/linux/kernel/140216
HTH!
Cheers
P
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-08-30 10:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-30 8:56 What reassert_nmi() in default_do_nmi() is for? Huang Ying
2010-08-30 10:51 Paolo Cancedda
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®