Skip to contentSkip to conversation

x86-64: change the size for interrupt array to NR_VECTORS

PATCH In review Yinghai Lu 2 participants 4 messages Nov 25, 2006

lore
Share & tools
lore

Yinghai Lu

author
#0 lore raw

PATCH 2/2 x86-64: change the size for interrupt array to NR_VECTORS

Please check the patch.

[PATCH] x86_64: interrupt array size should be aligned to NR_VECTORS interrupt array is referred for idt vectors instead of NR_IRQS, so change size to NR_VECTORS - FIRST_EXTERNAL_VECTOR. Also change to static.

arch/x86_64/kernel/i8259.c +2 -1
index c4ef801..d73c79e 100644
@@ -76,7 +76,8 @@ #define IRQLIST_16(x) \
 	IRQ(x,8), IRQ(x,9), IRQ(x,a), IRQ(x,b), \
 	IRQ(x,c), IRQ(x,d), IRQ(x,e), IRQ(x,f)
 
-void (*interrupt[NR_IRQS])(void) = {
+/* for the irq vectors */
+static void (*interrupt[NR_VECTORS - FIRST_EXTERNAL_VECTOR])(void) = {
 					  IRQLIST_16(0x2), IRQLIST_16(0x3),
 	IRQLIST_16(0x4), IRQLIST_16(0x5), IRQLIST_16(0x6), IRQLIST_16(0x7),
 	IRQLIST_16(0x8), IRQLIST_16(0x9), IRQLIST_16(0xa), IRQLIST_16(0xb),
Acked-by on v1 2/2
#1 lore raw
Quoted 1 line · Yinghai Lu

Please check the patch.

YH. Please place a newline between your subject and your description in the body of your patches.

Quoted 6 lines

[PATCH] x86_64: interrupt array size should be aligned to NR_VECTORS

interrupt array is referred for idt vectors instead of NR_IRQS, so change size to NR_VECTORS - FIRST_EXTERNAL_VECTOR. Also change to static.

Yep I missed this optimization opportunity :)

Eric

author
#2 lore raw
Quoted 3 lines · Eric W. Biederman

"Yinghai Lu" <[email protected]> writes:
YH. Please place a newline between your subject and your description in the body of your patches.

Next time.

Quoted 1 line

Yep I missed this optimization opportunity :)

You did a great job to clean up the irq_vector mapping.

YH

#3 lore raw
Quoted 10 lines · Yinghai Lu
Quoted 3 lines · Eric W. Biederman

"Yinghai Lu" <[email protected]> writes:
YH. Please place a newline between your subject and your description in the body of your patches.

Next time.

Quoted 1 line

Yep I missed this optimization opportunity :)

You did a great job to clean up the irq_vector mapping.

Yep and created many new optimization and clean up opportunities... Because I didn't take everything to it's full logical conclusion :)

Just enough to make everything architecture specific.

Eric