aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/irq
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-06-29 05:24:38 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-29 13:26:22 -0400
commita53da52fd743fd637637572838c0a7af23a2d038 (patch)
treeb62c205b609356db5bca378c6d04d6d899bfd499 /kernel/irq
parent74ffd553a3a7fbae34be70b751852d5b6fe5acac (diff)
[PATCH] genirq: cleanup: merge irq_affinity[] into irq_desc[]
Consolidation: remove the irq_affinity[NR_IRQS] array and move it into the irq_desc[NR_IRQS].affinity field. [akpm@osdl.org: sparc64 build fix] Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/irq')
-rw-r--r--kernel/irq/handle.c5
-rw-r--r--kernel/irq/manage.c2
-rw-r--r--kernel/irq/proc.c4
3 files changed, 6 insertions, 5 deletions
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c
index f9d95705a4ac..cc786aaf30d6 100644
--- a/kernel/irq/handle.c
+++ b/kernel/irq/handle.c
@@ -32,7 +32,10 @@ irq_desc_t irq_desc[NR_IRQS] __cacheline_aligned = {
32 [0 ... NR_IRQS-1] = { 32 [0 ... NR_IRQS-1] = {
33 .status = IRQ_DISABLED, 33 .status = IRQ_DISABLED,
34 .chip = &no_irq_type, 34 .chip = &no_irq_type,
35 .lock = SPIN_LOCK_UNLOCKED 35 .lock = SPIN_LOCK_UNLOCKED,
36#ifdef CONFIG_SMP
37 .affinity = CPU_MASK_ALL
38#endif
36 } 39 }
37}; 40};
38 41
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 31ee1f3bfcf9..c53662edc73d 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -16,8 +16,6 @@
16 16
17#ifdef CONFIG_SMP 17#ifdef CONFIG_SMP
18 18
19cpumask_t irq_affinity[NR_IRQS] = { [0 ... NR_IRQS-1] = CPU_MASK_ALL };
20
21#if defined (CONFIG_GENERIC_PENDING_IRQ) || defined (CONFIG_IRQBALANCE) 19#if defined (CONFIG_GENERIC_PENDING_IRQ) || defined (CONFIG_IRQBALANCE)
22cpumask_t __cacheline_aligned pending_irq_cpumask[NR_IRQS]; 20cpumask_t __cacheline_aligned pending_irq_cpumask[NR_IRQS];
23#endif 21#endif
diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c
index 90fe05f23e69..847b98a611e0 100644
--- a/kernel/irq/proc.c
+++ b/kernel/irq/proc.c
@@ -36,7 +36,7 @@ void proc_set_irq_affinity(unsigned int irq, cpumask_t mask_val)
36void proc_set_irq_affinity(unsigned int irq, cpumask_t mask_val) 36void proc_set_irq_affinity(unsigned int irq, cpumask_t mask_val)
37{ 37{
38 set_balance_irq_affinity(irq, mask_val); 38 set_balance_irq_affinity(irq, mask_val);
39 irq_affinity[irq] = mask_val; 39 irq_desc[irq].affinity = mask_val;
40 irq_desc[irq].chip->set_affinity(irq, mask_val); 40 irq_desc[irq].chip->set_affinity(irq, mask_val);
41} 41}
42#endif 42#endif
@@ -44,7 +44,7 @@ void proc_set_irq_affinity(unsigned int irq, cpumask_t mask_val)
44static int irq_affinity_read_proc(char *page, char **start, off_t off, 44static int irq_affinity_read_proc(char *page, char **start, off_t off,
45 int count, int *eof, void *data) 45 int count, int *eof, void *data)
46{ 46{
47 int len = cpumask_scnprintf(page, count, irq_affinity[(long)data]); 47 int len = cpumask_scnprintf(page, count, irq_desc[(long)data].affinity);
48 48
49 if (count - len < 2) 49 if (count - len < 2)
50 return -EINVAL; 50 return -EINVAL;