linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@gmail.com>
To: mingo@elte.hu, hpa@zytor.com, linux-kernel@vger.kernel.org,
	tglx@linutronix.de, macro@linux-mips.org
Cc: gorcunov@gmail.com
Subject: [patch 2/2] x86: apic unification - merge down enable_NMI_through_LVT0
Date: Thu, 01 Jan 1970 03:00:02 +0300	[thread overview]
Message-ID: <488866b0.2233440a.6886.ffff9b13@mx.google.com> (raw)
In-Reply-To: 20080724112241.164873410@gmail.com

[-- Attachment #1: x86-apic-merge-enable_NMI_through_LVT0 --]
[-- Type: text/plain, Size: 1306 bytes --]

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---

No code change on binary level.

Index: linux-2.6.git/arch/x86/kernel/apic_32.c
===================================================================
--- linux-2.6.git.orig/arch/x86/kernel/apic_32.c	2008-07-24 14:16:55.000000000 +0400
+++ linux-2.6.git/arch/x86/kernel/apic_32.c	2008-07-24 14:22:00.000000000 +0400
@@ -205,11 +205,15 @@ EXPORT_SYMBOL_GPL(apic_ops);
  */
 void __cpuinit enable_NMI_through_LVT0(void)
 {
-	unsigned int v = APIC_DM_NMI;
+	unsigned int v;
+
+	/* unmask and set to NMI */
+	v = APIC_DM_NMI;
 
-	/* Level triggered for 82489DX */
+	/* Level triggered for 82489DX (32bit mode) */
 	if (!lapic_is_integrated())
 		v |= APIC_LVT_LEVEL_TRIGGER;
+
 	apic_write(APIC_LVT0, v);
 }
 
Index: linux-2.6.git/arch/x86/kernel/apic_64.c
===================================================================
--- linux-2.6.git.orig/arch/x86/kernel/apic_64.c	2008-07-24 14:16:55.000000000 +0400
+++ linux-2.6.git/arch/x86/kernel/apic_64.c	2008-07-24 14:22:09.000000000 +0400
@@ -220,6 +220,11 @@ void __cpuinit enable_NMI_through_LVT0(v
 
 	/* unmask and set to NMI */
 	v = APIC_DM_NMI;
+
+	/* Level triggered for 82489DX (32bit mode) */
+	if (!lapic_is_integrated())
+		v |= APIC_LVT_LEVEL_TRIGGER;
+
 	apic_write(APIC_LVT0, v);
 }
 

-- 

  parent reply	other threads:[~2008-07-24 11:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20080724112241.164873410@gmail.com>
1970-01-01  0:00 ` [patch 1/2] x86: apic unification - merge down lapic_get_maxlvt Cyrill Gorcunov
1970-01-01  0:00 ` Cyrill Gorcunov [this message]
2008-07-24 11:43 [patch 0/2] x86 apic - a few function merge v2 Cyrill Gorcunov
1970-01-01  0:00 ` [patch 2/2] x86: apic unification - merge down enable_NMI_through_LVT0 Cyrill Gorcunov

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=488866b0.2233440a.6886.ffff9b13@mx.google.com \
    --to=gorcunov@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=macro@linux-mips.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).