mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@novell.com>
To: "Andreas Kleen" <ak@suse.de>
Cc: <linux-kernel@vger.kernel.org>, <discuss@x86-64.org>
Subject: [PATCH] add and handle NMI_VECTOR
Date: Thu, 08 Sep 2005 18:07:56 +0200	[thread overview]
Message-ID: <43207DFC0200007800024543@emea1-mh.id2.novell.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1399 bytes --]

(Note: Patch also attached because the inline version is certain to get
line wrapped.)

Declare NMI_VECTOR and handle it in the IPI sending code.

Signed-off-by: Jan Beulich <jbeulich@novell.com>

diff -Npru 2.6.13/include/asm-x86_64/hw_irq.h
2.6.13-x86_64-nmi-ipi/include/asm-x86_64/hw_irq.h
--- 2.6.13/include/asm-x86_64/hw_irq.h	2005-08-29 01:41:01.000000000
+0200
+++ 2.6.13-x86_64-nmi-ipi/include/asm-x86_64/hw_irq.h	2005-03-16
12:24:42.000000000 +0100
@@ -26,6 +26,7 @@
 struct hw_interrupt_type;
 #endif
 
+#define NMI_VECTOR		0x02
 /*
  * IDT vectors usable for external interrupt sources start
  * at 0x20:
diff -Npru 2.6.13/include/asm-x86_64/ipi.h
2.6.13-x86_64-nmi-ipi/include/asm-x86_64/ipi.h
--- 2.6.13/include/asm-x86_64/ipi.h	2005-08-29 01:41:01.000000000
+0200
+++ 2.6.13-x86_64-nmi-ipi/include/asm-x86_64/ipi.h	2005-09-01
11:32:12.000000000 +0200
@@ -31,9 +31,20 @@
 
 static inline unsigned int __prepare_ICR (unsigned int shortcut, int
vector, unsigned int dest)
 {
-	unsigned int icr =  APIC_DM_FIXED | shortcut | vector | dest;
-	if (vector == KDB_VECTOR)
-		icr = (icr & (~APIC_VECTOR_MASK)) | APIC_DM_NMI;
+	unsigned int icr = shortcut | dest;
+
+	switch (vector) {
+	default:
+		icr |= APIC_DM_FIXED | vector;
+		break;
+	case NMI_VECTOR:
+		/*
+		 * Setup KDB IPI to be delivered as an NMI
+		 */
+	case KDB_VECTOR:
+		icr |= APIC_DM_NMI;
+		break;
+	}
 	return icr;
 }
 


[-- Attachment #2: linux-2.6.13-x86_64-nmi-ipi.patch --]
[-- Type: application/octet-stream, Size: 1398 bytes --]

(Note: Patch also attached because the inline version is certain to get
line wrapped.)

Declare NMI_VECTOR and handle it in the IPI sending code.

Signed-off-by: Jan Beulich <jbeulich@novell.com>

diff -Npru 2.6.13/include/asm-x86_64/hw_irq.h 2.6.13-x86_64-nmi-ipi/include/asm-x86_64/hw_irq.h
--- 2.6.13/include/asm-x86_64/hw_irq.h	2005-08-29 01:41:01.000000000 +0200
+++ 2.6.13-x86_64-nmi-ipi/include/asm-x86_64/hw_irq.h	2005-03-16 12:24:42.000000000 +0100
@@ -26,6 +26,7 @@
 struct hw_interrupt_type;
 #endif
 
+#define NMI_VECTOR		0x02
 /*
  * IDT vectors usable for external interrupt sources start
  * at 0x20:
diff -Npru 2.6.13/include/asm-x86_64/ipi.h 2.6.13-x86_64-nmi-ipi/include/asm-x86_64/ipi.h
--- 2.6.13/include/asm-x86_64/ipi.h	2005-08-29 01:41:01.000000000 +0200
+++ 2.6.13-x86_64-nmi-ipi/include/asm-x86_64/ipi.h	2005-09-01 11:32:12.000000000 +0200
@@ -31,9 +31,20 @@
 
 static inline unsigned int __prepare_ICR (unsigned int shortcut, int vector, unsigned int dest)
 {
-	unsigned int icr =  APIC_DM_FIXED | shortcut | vector | dest;
-	if (vector == KDB_VECTOR)
-		icr = (icr & (~APIC_VECTOR_MASK)) | APIC_DM_NMI;
+	unsigned int icr = shortcut | dest;
+
+	switch (vector) {
+	default:
+		icr |= APIC_DM_FIXED | vector;
+		break;
+	case NMI_VECTOR:
+		/*
+		 * Setup KDB IPI to be delivered as an NMI
+		 */
+	case KDB_VECTOR:
+		icr |= APIC_DM_NMI;
+		break;
+	}
 	return icr;
 }
 

             reply	other threads:[~2005-09-08 16:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-08 16:07 Jan Beulich [this message]
2005-09-09  0:20 ` [discuss] " Andi Kleen
2005-09-09  0:43   ` [discuss] [PATCH] add and handle NMI_VECTOR II Andi Kleen
2005-09-09  6:42     ` Jan Beulich
2005-09-09  6:55       ` Andi Kleen
2005-09-09  7:13         ` Jan Beulich
2005-09-09  7:14           ` Andi Kleen
2005-09-09  7:57             ` Jan Beulich
2005-09-09  7:58               ` Andi Kleen
2005-09-09  8:50 ` [discuss] [PATCH] add and handle NMI_VECTOR Andi Kleen
2005-09-09  9:14   ` Jan Beulich

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=43207DFC0200007800024543@emea1-mh.id2.novell.com \
    --to=jbeulich@novell.com \
    --cc=ak@suse.de \
    --cc=discuss@x86-64.org \
    --cc=linux-kernel@vger.kernel.org \
    /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®