Skip to contentSkip to conversation

x86: cleanup vector usage

RFC In review Shaohua Li 2 participants 4 messages Nov 3, 2010 – Nov 6, 2010 x86

lore
Share & tools
lore

Shaohua Li

author
#0 lore raw

RFC 1/4 x86: cleanup vector usage

Cleanup the vector usage and make them continuous if possible.

---
 arch/x86/include/asm/irq_vectors.h |   40 +++++++++++++++++++------------------
 1 file changed, 21 insertions(+), 19 deletions(-)
arch/x86/include/asm/irq_vectors.h +21 -19
Index: linux/arch/x86/include/asm/irq_vectors.h
===================================================================
@@ -1,6 +1,7 @@
 #ifndef _ASM_X86_IRQ_VECTORS_H
 #define _ASM_X86_IRQ_VECTORS_H
 
+#include <linux/threads.h>
 /*
  * Linux IRQ vector layout.
  *
@@ -16,8 +17,8 @@
  *  Vectors   0 ...  31 : system traps and exceptions - hardcoded events
  *  Vectors  32 ... 127 : device interrupts
  *  Vector  128         : legacy int80 syscall interface
- *  Vectors 129 ... 237 : device interrupts
- *  Vectors 238 ... 255 : special interrupts
+ *  Vectors 129 ... 229 : device interrupts
+ *  Vectors 230 ... 255 : special interrupts
  *
  * 64-bit x86 has per CPU IDT tables, 32-bit has one shared IDT table.
  *
@@ -96,37 +97,38 @@
 #define THRESHOLD_APIC_VECTOR		0xf9
 #define REBOOT_VECTOR			0xf8
 
-/* f0-f7 used for spreading out TLB flushes: */
-#define INVALIDATE_TLB_VECTOR_END	0xf7
-#define INVALIDATE_TLB_VECTOR_START	0xf0
-#define NUM_INVALIDATE_TLB_VECTORS	   8
-
-/*
- * Local APIC timer IRQ vector is on a different priority level,
- * to work around the 'lost local interrupt if more than 2 IRQ
- * sources per level' errata.
- */
-#define LOCAL_TIMER_VECTOR		0xef
-
 /*
  * Generic system vector for platform specific use
  */
-#define X86_PLATFORM_IPI_VECTOR		0xed
+#define X86_PLATFORM_IPI_VECTOR		0xf7
 
 /*
  * IRQ work vector:
  */
-#define IRQ_WORK_VECTOR			0xec
+#define IRQ_WORK_VECTOR			0xf6
 
-#define UV_BAU_MESSAGE			0xea
+#define UV_BAU_MESSAGE			0xf5
 
 /*
  * Self IPI vector for machine checks
  */
-#define MCE_SELF_VECTOR			0xeb
+#define MCE_SELF_VECTOR			0xf4
 
 /* Xen vector callback to receive events in a HVM domain */
-#define XEN_HVM_EVTCHN_CALLBACK		0xe9
+#define XEN_HVM_EVTCHN_CALLBACK		0xf3
+
+/*
+ * Local APIC timer IRQ vector is on a different priority level,
+ * to work around the 'lost local interrupt if more than 2 IRQ
+ * sources per level' errata.
+ */
+#define LOCAL_TIMER_VECTOR		0xef
+
+/* f0-f7 used for spreading out TLB flushes: */
+#define NUM_INVALIDATE_TLB_VECTORS	   8
+#define INVALIDATE_TLB_VECTOR_END	0xee
+#define INVALIDATE_TLB_VECTOR_START	\
+	(INVALIDATE_TLB_VECTOR_END - NUM_INVALIDATE_TLB_VECTORS + 1)
 
 #define NR_VECTORS			 256
 
#1 lore raw
Quoted 4 lines · Shaohua Li

Cleanup the vector usage and make them continuous if possible.

---

...

Quoted 12 lines
arch/x86/include/asm/irq_vectors.h +3 -3
-#define X86_PLATFORM_IPI_VECTOR		0xed
+#define X86_PLATFORM_IPI_VECTOR		0xf7
 
 /*
  * IRQ work vector:
  */
-#define IRQ_WORK_VECTOR			0xec
+#define IRQ_WORK_VECTOR			0xf6
 
-#define UV_BAU_MESSAGE			0xea
+#define UV_BAU_MESSAGE			0xf5
 

arch/x86/include/asm/irq_vectors.h line 119

Quoted 10 lines
arch/x86/include/asm/irq_vectors.h +3 -2
 /*
  * Self IPI vector for machine checks
  */
-#define MCE_SELF_VECTOR			0xeb
+#define MCE_SELF_VECTOR			0xf4
 
 /* Xen vector callback to receive events in a HVM domain */
-#define XEN_HVM_EVTCHN_CALLBACK		0xe9
+#define XEN_HVM_EVTCHN_CALLBACK		0xf3
+

Hi Li, this is not just a cleanup -- irq priority were changed as
well, but I suppose it's harmless ;)

Cyrill

author
#2 lore raw
Quoted 24 lines · Cyrill Gorcunov
Quoted 4 lines · Shaohua Li

Cleanup the vector usage and make them continuous if possible.

---

...

Quoted 18 lines
arch/x86/include/asm/irq_vectors.h +4 -4
-#define X86_PLATFORM_IPI_VECTOR		0xed
+#define X86_PLATFORM_IPI_VECTOR		0xf7
 
 /*
  * IRQ work vector:
  */
-#define IRQ_WORK_VECTOR			0xec
+#define IRQ_WORK_VECTOR			0xf6
 
-#define UV_BAU_MESSAGE			0xea
+#define UV_BAU_MESSAGE			0xf5
 
 /*
  * Self IPI vector for machine checks
  */
-#define MCE_SELF_VECTOR			0xeb
+#define MCE_SELF_VECTOR			0xf4
Quoted 7 lines

arch/x86/include/asm/irq_vectors.h line 119

Quoted 4 lines

/* Xen vector callback to receive events in a HVM domain */

arch/x86/include/asm/irq_vectors.h +2 -1
-#define XEN_HVM_EVTCHN_CALLBACK		0xe9
+#define XEN_HVM_EVTCHN_CALLBACK		0xf3
+

Hi Li, this is not just a cleanup -- irq priority were changed as
well, but I suppose it's harmless ;)

I didn't change the local apic timer vector because the comments say the priority is important. For others, I do suppose it's harmless.

#3 lore raw
Quoted 6 lines · Shaohua Li
Quoted 5 lines · Cyrill Gorcunov
Quoted 4 lines · Shaohua Li

Cleanup the vector usage and make them continuous if possible.

---

...

Quoted 5 lines
Quoted 2 lines

Hi Li, this is not just a cleanup -- irq priority were changed as
well, but I suppose it's harmless ;)

I didn't change the local apic timer vector because the comments say the priority is important. For others, I do suppose it's harmless.

ok

Cyrill