* [PATCH -tip 1/2 resend] x86, nmi: Define a name for NMI control port
@ 2011-03-02 15:32 Cyrill Gorcunov
2011-03-02 18:46 ` [tip:perf/core] " tip-bot for Cyrill Gorcunov
2011-03-02 19:35 ` [PATCH -tip 1/2 resend] " Don Zickus
0 siblings, 2 replies; 4+ messages in thread
From: Cyrill Gorcunov @ 2011-03-02 15:32 UTC (permalink / raw)
To: Ingo Molnar; +Cc: Don Zickus, Huang, Ying, lkml
Also add a comment anout why we need in-out operations.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
---
Ingo I hope this time I've resolved MUA space injection.
arch/x86/include/asm/mach_traps.h | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
Index: linux-2.6.git/arch/x86/include/asm/mach_traps.h
=====================================================================
--- linux-2.6.git.orig/arch/x86/include/asm/mach_traps.h
+++ linux-2.6.git/arch/x86/include/asm/mach_traps.h
@@ -8,6 +8,7 @@
#include <asm/mc146818rtc.h>
#define NMI_REASON_PORT 0x61
+#define NMI_ENABLE_PORT 0x70 /* Real-Time Clock Address Register as well */
#define NMI_REASON_SERR 0x80
#define NMI_REASON_IOCHK 0x40
@@ -30,12 +31,19 @@ static inline void reassert_nmi(void)
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 */
+
+ /*
+ * This will cause the NMI output to transition low
+ * then high if there are any pending NMI sources. The
+ * CPU's NMI input logic will then register a new NMI.
+ */
+ outb(0x8f, NMI_ENABLE_PORT);
+ inb(0x71); /* dummy */
+ outb(0x0f, NMI_ENABLE_PORT);
+ inb(0x71); /* dummy */
+
if (old_reg >= 0)
- outb(old_reg, 0x70);
+ outb(old_reg, NMI_ENABLE_PORT);
else
unlock_cmos();
}
--
Cyrill
^ permalink raw reply [flat|nested] 4+ messages in thread
* [tip:perf/core] x86, nmi: Define a name for NMI control port
2011-03-02 15:32 [PATCH -tip 1/2 resend] x86, nmi: Define a name for NMI control port Cyrill Gorcunov
@ 2011-03-02 18:46 ` tip-bot for Cyrill Gorcunov
2011-03-02 19:35 ` [PATCH -tip 1/2 resend] " Don Zickus
1 sibling, 0 replies; 4+ messages in thread
From: tip-bot for Cyrill Gorcunov @ 2011-03-02 18:46 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, hpa, mingo, gorcunov, ying.huang, tglx, dzickus,
mingo
Commit-ID: 0f5dbad5ecab0921911966e857eab408ef32163c
Gitweb: http://git.kernel.org/tip/0f5dbad5ecab0921911966e857eab408ef32163c
Author: Cyrill Gorcunov <gorcunov@openvz.org>
AuthorDate: Wed, 2 Mar 2011 18:32:30 +0300
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 2 Mar 2011 16:44:44 +0100
x86, nmi: Define a name for NMI control port
Also add a comment about why we need in/out operations.
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Huang Ying <ying.huang@intel.com>
LKML-Reference: <4D6E630E.1070107@openvz.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86/include/asm/mach_traps.h | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/arch/x86/include/asm/mach_traps.h b/arch/x86/include/asm/mach_traps.h
index 72a8b52..7775deb 100644
--- a/arch/x86/include/asm/mach_traps.h
+++ b/arch/x86/include/asm/mach_traps.h
@@ -8,6 +8,7 @@
#include <asm/mc146818rtc.h>
#define NMI_REASON_PORT 0x61
+#define NMI_ENABLE_PORT 0x70 /* Real-Time Clock Address Register as well */
#define NMI_REASON_SERR 0x80
#define NMI_REASON_IOCHK 0x40
@@ -30,12 +31,19 @@ static inline void reassert_nmi(void)
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 */
+
+ /*
+ * This will cause the NMI output to transition low
+ * then high if there are any pending NMI sources. The
+ * CPU's NMI input logic will then register a new NMI.
+ */
+ outb(0x8f, NMI_ENABLE_PORT);
+ inb(0x71); /* dummy */
+ outb(0x0f, NMI_ENABLE_PORT);
+ inb(0x71); /* dummy */
+
if (old_reg >= 0)
- outb(old_reg, 0x70);
+ outb(old_reg, NMI_ENABLE_PORT);
else
unlock_cmos();
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH -tip 1/2 resend] x86, nmi: Define a name for NMI control port
2011-03-02 15:32 [PATCH -tip 1/2 resend] x86, nmi: Define a name for NMI control port Cyrill Gorcunov
2011-03-02 18:46 ` [tip:perf/core] " tip-bot for Cyrill Gorcunov
@ 2011-03-02 19:35 ` Don Zickus
2011-03-02 19:49 ` Cyrill Gorcunov
1 sibling, 1 reply; 4+ messages in thread
From: Don Zickus @ 2011-03-02 19:35 UTC (permalink / raw)
To: Cyrill Gorcunov; +Cc: Ingo Molnar, Huang, Ying, lkml
On Wed, Mar 02, 2011 at 06:32:30PM +0300, Cyrill Gorcunov wrote:
> Also add a comment anout why we need in-out operations.
>
> Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
> ---
>
> Ingo I hope this time I've resolved MUA space injection.
>
> arch/x86/include/asm/mach_traps.h | 18 +++++++++++++-----
> 1 file changed, 13 insertions(+), 5 deletions(-)
>
> Index: linux-2.6.git/arch/x86/include/asm/mach_traps.h
> =====================================================================
> --- linux-2.6.git.orig/arch/x86/include/asm/mach_traps.h
> +++ linux-2.6.git/arch/x86/include/asm/mach_traps.h
> @@ -8,6 +8,7 @@
> #include <asm/mc146818rtc.h>
>
> #define NMI_REASON_PORT 0x61
> +#define NMI_ENABLE_PORT 0x70 /* Real-Time Clock Address Register as well */
>
> #define NMI_REASON_SERR 0x80
> #define NMI_REASON_IOCHK 0x40
> @@ -30,12 +31,19 @@ static inline void reassert_nmi(void)
> old_reg = current_lock_cmos_reg();
> else
> lock_cmos(0); /* register doesn't matter here */
> - outb(0x8f, 0x70);
> - inb(0x71); /* dummy */
I was wondering if 0x71 should get a name change too. Then again I can't
find the Intel doc that tells me what 0x70 is either (I remember seeing it
somewhere).
Cheers,
Don
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -tip 1/2 resend] x86, nmi: Define a name for NMI control port
2011-03-02 19:35 ` [PATCH -tip 1/2 resend] " Don Zickus
@ 2011-03-02 19:49 ` Cyrill Gorcunov
0 siblings, 0 replies; 4+ messages in thread
From: Cyrill Gorcunov @ 2011-03-02 19:49 UTC (permalink / raw)
To: Don Zickus; +Cc: Ingo Molnar, Huang, Ying, lkml
On 03/02/2011 10:35 PM, Don Zickus wrote:
> On Wed, Mar 02, 2011 at 06:32:30PM +0300, Cyrill Gorcunov wrote:
>> Also add a comment anout why we need in-out operations.
>>
>> Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
>> ---
>>
>> Ingo I hope this time I've resolved MUA space injection.
>>
>> arch/x86/include/asm/mach_traps.h | 18 +++++++++++++-----
>> 1 file changed, 13 insertions(+), 5 deletions(-)
>>
>> Index: linux-2.6.git/arch/x86/include/asm/mach_traps.h
>> =====================================================================
>> --- linux-2.6.git.orig/arch/x86/include/asm/mach_traps.h
>> +++ linux-2.6.git/arch/x86/include/asm/mach_traps.h
>> @@ -8,6 +8,7 @@
>> #include <asm/mc146818rtc.h>
>>
>> #define NMI_REASON_PORT 0x61
>> +#define NMI_ENABLE_PORT 0x70 /* Real-Time Clock Address Register as well */
>>
>> #define NMI_REASON_SERR 0x80
>> #define NMI_REASON_IOCHK 0x40
>> @@ -30,12 +31,19 @@ static inline void reassert_nmi(void)
>> old_reg = current_lock_cmos_reg();
>> else
>> lock_cmos(0); /* register doesn't matter here */
>> - outb(0x8f, 0x70);
>> - inb(0x71); /* dummy */
>
> I was wondering if 0x71 should get a name change too. Then again I can't
> find the Intel doc that tells me what 0x70 is either (I remember seeing it
> somewhere).
>
> Cheers,
> Don
Well, me specs are on another machine (which I didn't copied back yet :) but
if my memory doesn't betray me it can be found in ICH specification. For 0x71 i
simply don't remember how it's named in spec but it stands for RTC ram target
register iirc.
--
Cyrill
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-03-02 19:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-02 15:32 [PATCH -tip 1/2 resend] x86, nmi: Define a name for NMI control port Cyrill Gorcunov
2011-03-02 18:46 ` [tip:perf/core] " tip-bot for Cyrill Gorcunov
2011-03-02 19:35 ` [PATCH -tip 1/2 resend] " Don Zickus
2011-03-02 19:49 ` Cyrill Gorcunov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox