From: Huang Ying <ying.huang@intel.com>
To: Ingo Molnar <mingo@elte.hu>,
hpa@zytor.com, Andi Kleen <andi@firstfloor.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: What reassert_nmi() in default_do_nmi() is for?
Date: Mon, 30 Aug 2010 16:56:34 +0800 [thread overview]
Message-ID: <1283158594.3397.68.camel@yhuang-dev> (raw)
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
next reply other threads:[~2010-08-30 8:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-30 8:56 Huang Ying [this message]
2010-08-30 10:51 Paolo Cancedda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1283158594.3397.68.camel@yhuang-dev \
--to=ying.huang@intel.com \
--cc=andi@firstfloor.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®