mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC 1/4]x86: cleanup vector usage
@ 2010-11-03  6:44 Shaohua Li
  2010-11-05 20:55 ` Cyrill Gorcunov
  0 siblings, 1 reply; 4+ messages in thread
From: Shaohua Li @ 2010-11-03  6:44 UTC (permalink / raw)
  To: lkml; +Cc: Ingo Molnar, Andi Kleen, hpa

Cleanup the vector usage and make them continuous if possible.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
---
 arch/x86/include/asm/irq_vectors.h |   40 +++++++++++++++++++------------------
 1 file changed, 21 insertions(+), 19 deletions(-)

Index: linux/arch/x86/include/asm/irq_vectors.h
===================================================================
--- linux.orig/arch/x86/include/asm/irq_vectors.h	2010-11-02 10:31:51.000000000 +0800
+++ linux/arch/x86/include/asm/irq_vectors.h	2010-11-02 14:41:01.000000000 +0800
@@ -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
 



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC 1/4]x86: cleanup vector usage
  2010-11-03  6:44 [RFC 1/4]x86: cleanup vector usage Shaohua Li
@ 2010-11-05 20:55 ` Cyrill Gorcunov
  2010-11-06  5:45   ` Shaohua Li
  0 siblings, 1 reply; 4+ messages in thread
From: Cyrill Gorcunov @ 2010-11-05 20:55 UTC (permalink / raw)
  To: Shaohua Li; +Cc: lkml, Ingo Molnar, Andi Kleen, hpa

On Wed, Nov 03, 2010 at 02:44:18PM +0800, Shaohua Li wrote:
> Cleanup the vector usage and make them continuous if possible.
> 
> Signed-off-by: Shaohua Li <shaohua.li@intel.com>
> ---
...
> -#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
> +

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC 1/4]x86: cleanup vector usage
  2010-11-05 20:55 ` Cyrill Gorcunov
@ 2010-11-06  5:45   ` Shaohua Li
  2010-11-06  9:10     ` Cyrill Gorcunov
  0 siblings, 1 reply; 4+ messages in thread
From: Shaohua Li @ 2010-11-06  5:45 UTC (permalink / raw)
  To: Cyrill Gorcunov; +Cc: lkml, Ingo Molnar, Andi Kleen, hpa

On Sat, 2010-11-06 at 04:55 +0800, Cyrill Gorcunov wrote:
> On Wed, Nov 03, 2010 at 02:44:18PM +0800, Shaohua Li wrote:
> > Cleanup the vector usage and make them continuous if possible.
> > 
> > Signed-off-by: Shaohua Li <shaohua.li@intel.com>
> > ---
> ...
> > -#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
> > +
> 
>  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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC 1/4]x86: cleanup vector usage
  2010-11-06  5:45   ` Shaohua Li
@ 2010-11-06  9:10     ` Cyrill Gorcunov
  0 siblings, 0 replies; 4+ messages in thread
From: Cyrill Gorcunov @ 2010-11-06  9:10 UTC (permalink / raw)
  To: Shaohua Li; +Cc: lkml, Ingo Molnar, Andi Kleen, hpa

On Sat, Nov 06, 2010 at 01:45:34PM +0800, Shaohua Li wrote:
> On Sat, 2010-11-06 at 04:55 +0800, Cyrill Gorcunov wrote:
> > On Wed, Nov 03, 2010 at 02:44:18PM +0800, Shaohua Li wrote:
> > > Cleanup the vector usage and make them continuous if possible.
> > > 
> > > Signed-off-by: Shaohua Li <shaohua.li@intel.com>
> > > ---
...
> >  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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-11-06  9:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-03  6:44 [RFC 1/4]x86: cleanup vector usage Shaohua Li
2010-11-05 20:55 ` Cyrill Gorcunov
2010-11-06  5:45   ` Shaohua Li
2010-11-06  9:10     ` Cyrill Gorcunov

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®