Skip to contentSkip to conversation

: softirq: Define and use NR_SOFTIRQ

PATCH In review David Miller 1 participant 1 message Sep 20, 2008

Subsystems (2)
lore
Share & tools
lore

David Miller

author maintainer
#0 lore raw

PATCH 1/2 : softirq: Define and use NR_SOFTIRQ

softirq: Define and use NR_SOFTIRQ

The softirq tables use a magic value "32" for sizing.

Define a proper NR_SOFTIRQ value instead.

---
 include/linux/interrupt.h |    1 +
 kernel/softirq.c          |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
include/linux/interrupt.h +1 -0
index 58ff4e7..fdd7b90 100644
@@ -252,6 +252,7 @@ enum
 	HRTIMER_SOFTIRQ,
 #endif
 	RCU_SOFTIRQ, 	/* Preferable RCU should always be the last softirq */
+	NR_SOFTIRQ
 };
 
 /* softirq mask and active fields moved to irq_cpustat_t in
kernel/softirq.c +1 -1
index c506f26..27642a2 100644
@@ -46,7 +46,7 @@ irq_cpustat_t irq_stat[NR_CPUS] ____cacheline_aligned;
 EXPORT_SYMBOL(irq_stat);
 #endif
 
-static struct softirq_action softirq_vec[32] __cacheline_aligned_in_smp;
+static struct softirq_action softirq_vec[NR_SOFTIRQ] __cacheline_aligned_in_smp;
 
 static DEFINE_PER_CPU(struct task_struct *, ksoftirqd);
 
Signature · 1 line
1.5.6.5