Skip to contentSkip to conversation

x86: make 32bit MAX_HARDIRQSS_PER_CPU to be NR_VECTORS

PATCH Applied Yinghai Lu 2 participants 3 messages Jan 12, 2009 – Jan 14, 2009 x86

lore
Share & tools
lore

Yinghai Lu

author
#0 lore raw

PATCH 1/1 x86: make 32bit MAX_HARDIRQSS_PER_CPU to be NR_VECTORS

Impact: clean up to be same as 64bit

32bit is use per-cpu vector too, so don't use default NR_IRQS

---
 arch/x86/include/asm/hardirq_32.h  |    3 +++
 arch/x86/include/asm/irq_vectors.h |    4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)
arch/x86/include/asm/hardirq_32.h +3 -0
Index: linux-2.6/arch/x86/include/asm/hardirq_32.h
===================================================================
@@ -20,6 +20,9 @@ typedef struct {
 
 DECLARE_PER_CPU(irq_cpustat_t, irq_stat);
 
+/* We can have at most NR_VECTORS irqs routed to a cpu at a time */
+#define MAX_HARDIRQS_PER_CPU NR_VECTORS
+
 #define __ARCH_IRQ_STAT
 #define __IRQ_STAT(cpu, member) (per_cpu(irq_stat, cpu).member)
 
Applied
#1 lore raw
Quoted 16 lines · Yinghai Lu

Impact: clean up to be same as 64bit

32bit is use per-cpu vector too, so don't use default NR_IRQS

---
 arch/x86/include/asm/hardirq_32.h  |    3 +++
 arch/x86/include/asm/irq_vectors.h |    4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

Index: linux-2.6/arch/x86/include/asm/hardirq_32.h
===================================================================

arch/x86/include/asm/hardirq_32.h typedef struct { · line 27

Quoted 8 lines
arch/x86/include/asm/hardirq_32.h +3 -0
@@ -20,6 +20,9 @@ typedef struct {
 
 DECLARE_PER_CPU(irq_cpustat_t, irq_stat);
 
+/* We can have at most NR_VECTORS irqs routed to a cpu at a time */
+#define MAX_HARDIRQS_PER_CPU NR_VECTORS
+
 #define __ARCH_IRQ_STAT
 #define __IRQ_STAT(cpu, member) (per_cpu(irq_stat, cpu).member)

applied to tip/x86/cleanups. Btw., isnt the irq_vectors.h bit (mentioned in the diffstat) missing?

Ingo

author
#2 lore raw
Quoted 22 lines · Ingo Molnar
Quoted 19 lines · Yinghai Lu

Impact: clean up to be same as 64bit

32bit is use per-cpu vector too, so don't use default NR_IRQS

---
 arch/x86/include/asm/hardirq_32.h  |    3 +++
 arch/x86/include/asm/irq_vectors.h |    4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)

Index: linux-2.6/arch/x86/include/asm/hardirq_32.h
===================================================================

arch/x86/include/asm/hardirq_32.h +0 -0
@@ -20,6 +20,9 @@ typedef struct {
 
 DECLARE_PER_CPU(irq_cpustat_t, irq_stat);
 
Quoted 9 lines

arch/x86/include/asm/hardirq_32.h typedef struct { · line 27

Quoted 5 lines
arch/x86/include/asm/hardirq_32.h +3 -0
+/* We can have at most NR_VECTORS irqs routed to a cpu at a time */
+#define MAX_HARDIRQS_PER_CPU NR_VECTORS
+
 #define __ARCH_IRQ_STAT
 #define __IRQ_STAT(cpu, member) (per_cpu(irq_stat, cpu).member)

applied to tip/x86/cleanups. Btw., isnt the irq_vectors.h bit (mentioned in the diffstat) missing?

copy and modify the patch
forget to do quilt refresh --diffstat

YH