aboutsummaryrefslogtreecommitdiffstats
path: root/arch
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 /arch
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 'arch')
-rw-r--r--arch/alpha/kernel/irq.c2
-rw-r--r--arch/i386/kernel/irq.c2
-rw-r--r--arch/ia64/kernel/irq.c4
-rw-r--r--arch/parisc/kernel/irq.c8
-rw-r--r--arch/powerpc/kernel/irq.c2
-rw-r--r--arch/powerpc/platforms/pseries/xics.c4
-rw-r--r--arch/powerpc/sysdev/mpic.c2
-rw-r--r--arch/ppc/syslib/open_pic.c4
-rw-r--r--arch/sparc64/kernel/irq.c2
-rw-r--r--arch/x86_64/kernel/irq.c2
10 files changed, 16 insertions, 16 deletions
diff --git a/arch/alpha/kernel/irq.c b/arch/alpha/kernel/irq.c
index ec9d243d42c9..63af36cf7f6e 100644
--- a/arch/alpha/kernel/irq.c
+++ b/arch/alpha/kernel/irq.c
@@ -56,7 +56,7 @@ select_smp_affinity(unsigned int irq)
56 cpu = (cpu < (NR_CPUS-1) ? cpu + 1 : 0); 56 cpu = (cpu < (NR_CPUS-1) ? cpu + 1 : 0);
57 last_cpu = cpu; 57 last_cpu = cpu;
58 58
59 irq_affinity[irq] = cpumask_of_cpu(cpu); 59 irq_desc[irq].affinity = cpumask_of_cpu(cpu);
60 irq_desc[irq].chip->set_affinity(irq, cpumask_of_cpu(cpu)); 60 irq_desc[irq].chip->set_affinity(irq, cpumask_of_cpu(cpu));
61 return 0; 61 return 0;
62} 62}
diff --git a/arch/i386/kernel/irq.c b/arch/i386/kernel/irq.c
index b942a5918dab..3336cef9605a 100644
--- a/arch/i386/kernel/irq.c
+++ b/arch/i386/kernel/irq.c
@@ -291,7 +291,7 @@ void fixup_irqs(cpumask_t map)
291 if (irq == 2) 291 if (irq == 2)
292 continue; 292 continue;
293 293
294 cpus_and(mask, irq_affinity[irq], map); 294 cpus_and(mask, irq_desc[irq].affinity, map);
295 if (any_online_cpu(mask) == NR_CPUS) { 295 if (any_online_cpu(mask) == NR_CPUS) {
296 printk("Breaking affinity for irq %i\n", irq); 296 printk("Breaking affinity for irq %i\n", irq);
297 mask = map; 297 mask = map;
diff --git a/arch/ia64/kernel/irq.c b/arch/ia64/kernel/irq.c
index 2645153dba8a..c4e1b3b60b48 100644
--- a/arch/ia64/kernel/irq.c
+++ b/arch/ia64/kernel/irq.c
@@ -100,7 +100,7 @@ void set_irq_affinity_info (unsigned int irq, int hwid, int redir)
100 cpu_set(cpu_logical_id(hwid), mask); 100 cpu_set(cpu_logical_id(hwid), mask);
101 101
102 if (irq < NR_IRQS) { 102 if (irq < NR_IRQS) {
103 irq_affinity[irq] = mask; 103 irq_desc[irq].affinity = mask;
104 irq_redir[irq] = (char) (redir & 0xff); 104 irq_redir[irq] = (char) (redir & 0xff);
105 } 105 }
106} 106}
@@ -131,7 +131,7 @@ static void migrate_irqs(void)
131 if (desc->status == IRQ_PER_CPU) 131 if (desc->status == IRQ_PER_CPU)
132 continue; 132 continue;
133 133
134 cpus_and(mask, irq_affinity[irq], cpu_online_map); 134 cpus_and(mask, irq_desc[irq].affinity, cpu_online_map);
135 if (any_online_cpu(mask) == NR_CPUS) { 135 if (any_online_cpu(mask) == NR_CPUS) {
136 /* 136 /*
137 * Save it for phase 2 processing 137 * Save it for phase 2 processing
diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c
index 26e69f73fdb0..ea6a55e1a0c5 100644
--- a/arch/parisc/kernel/irq.c
+++ b/arch/parisc/kernel/irq.c
@@ -94,7 +94,7 @@ int cpu_check_affinity(unsigned int irq, cpumask_t *dest)
94 if (irq == TIMER_IRQ || irq == IPI_IRQ) { 94 if (irq == TIMER_IRQ || irq == IPI_IRQ) {
95 /* Bad linux design decision. The mask has already 95 /* Bad linux design decision. The mask has already
96 * been set; we must reset it */ 96 * been set; we must reset it */
97 irq_affinity[irq] = CPU_MASK_ALL; 97 irq_desc[irq].affinity = CPU_MASK_ALL;
98 return -EINVAL; 98 return -EINVAL;
99 } 99 }
100 100
@@ -110,7 +110,7 @@ static void cpu_set_affinity_irq(unsigned int irq, cpumask_t dest)
110 if (cpu_check_affinity(irq, &dest)) 110 if (cpu_check_affinity(irq, &dest))
111 return; 111 return;
112 112
113 irq_affinity[irq] = dest; 113 irq_desc[irq].affinity = dest;
114} 114}
115#endif 115#endif
116 116
@@ -265,7 +265,7 @@ int txn_alloc_irq(unsigned int bits_wide)
265unsigned long txn_affinity_addr(unsigned int irq, int cpu) 265unsigned long txn_affinity_addr(unsigned int irq, int cpu)
266{ 266{
267#ifdef CONFIG_SMP 267#ifdef CONFIG_SMP
268 irq_affinity[irq] = cpumask_of_cpu(cpu); 268 irq_desc[irq].affinity = cpumask_of_cpu(cpu);
269#endif 269#endif
270 270
271 return cpu_data[cpu].txn_addr; 271 return cpu_data[cpu].txn_addr;
@@ -326,7 +326,7 @@ void do_cpu_irq_mask(struct pt_regs *regs)
326 /* Work our way from MSb to LSb...same order we alloc EIRs */ 326 /* Work our way from MSb to LSb...same order we alloc EIRs */
327 for (irq = TIMER_IRQ; eirr_val && bit; bit>>=1, irq++) { 327 for (irq = TIMER_IRQ; eirr_val && bit; bit>>=1, irq++) {
328#ifdef CONFIG_SMP 328#ifdef CONFIG_SMP
329 cpumask_t dest = irq_affinity[irq]; 329 cpumask_t dest = irq_desc[irq].affinity;
330#endif 330#endif
331 if (!(bit & eirr_val)) 331 if (!(bit & eirr_val))
332 continue; 332 continue;
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 8cfc779d882d..24f6050aa4ab 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -164,7 +164,7 @@ void fixup_irqs(cpumask_t map)
164 if (irq_desc[irq].status & IRQ_PER_CPU) 164 if (irq_desc[irq].status & IRQ_PER_CPU)
165 continue; 165 continue;
166 166
167 cpus_and(mask, irq_affinity[irq], map); 167 cpus_and(mask, irq_desc[irq].affinity, map);
168 if (any_online_cpu(mask) == NR_CPUS) { 168 if (any_online_cpu(mask) == NR_CPUS) {
169 printk("Breaking affinity for irq %i\n", irq); 169 printk("Breaking affinity for irq %i\n", irq);
170 mask = map; 170 mask = map;
diff --git a/arch/powerpc/platforms/pseries/xics.c b/arch/powerpc/platforms/pseries/xics.c
index bdc9e26a93cf..19c03dd43000 100644
--- a/arch/powerpc/platforms/pseries/xics.c
+++ b/arch/powerpc/platforms/pseries/xics.c
@@ -238,7 +238,7 @@ static int get_irq_server(unsigned int irq)
238{ 238{
239 unsigned int server; 239 unsigned int server;
240 /* For the moment only implement delivery to all cpus or one cpu */ 240 /* For the moment only implement delivery to all cpus or one cpu */
241 cpumask_t cpumask = irq_affinity[irq]; 241 cpumask_t cpumask = irq_desc[irq].affinity;
242 cpumask_t tmp = CPU_MASK_NONE; 242 cpumask_t tmp = CPU_MASK_NONE;
243 243
244 if (!distribute_irqs) 244 if (!distribute_irqs)
@@ -729,7 +729,7 @@ void xics_migrate_irqs_away(void)
729 729
730 /* Reset affinity to all cpus */ 730 /* Reset affinity to all cpus */
731 desc->chip->set_affinity(virq, CPU_MASK_ALL); 731 desc->chip->set_affinity(virq, CPU_MASK_ALL);
732 irq_affinity[virq] = CPU_MASK_ALL; 732 irq_desc[irq].affinity = CPU_MASK_ALL;
733unlock: 733unlock:
734 spin_unlock_irqrestore(&desc->lock, flags); 734 spin_unlock_irqrestore(&desc->lock, flags);
735 } 735 }
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index f4613ee6b7a2..28df9c827ca6 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -906,7 +906,7 @@ void mpic_setup_this_cpu(void)
906 /* let the mpic know we want intrs. default affinity is 0xffffffff 906 /* let the mpic know we want intrs. default affinity is 0xffffffff
907 * until changed via /proc. That's how it's done on x86. If we want 907 * until changed via /proc. That's how it's done on x86. If we want
908 * it differently, then we should make sure we also change the default 908 * it differently, then we should make sure we also change the default
909 * values of irq_affinity in irq.c. 909 * values of irq_desc[].affinity in irq.c.
910 */ 910 */
911 if (distribute_irqs) { 911 if (distribute_irqs) {
912 for (i = 0; i < mpic->num_sources ; i++) 912 for (i = 0; i < mpic->num_sources ; i++)
diff --git a/arch/ppc/syslib/open_pic.c b/arch/ppc/syslib/open_pic.c
index 822058c2983e..767a0bc95817 100644
--- a/arch/ppc/syslib/open_pic.c
+++ b/arch/ppc/syslib/open_pic.c
@@ -615,8 +615,8 @@ void __devinit do_openpic_setup_cpu(void)
615 /* let the openpic know we want intrs. default affinity 615 /* let the openpic know we want intrs. default affinity
616 * is 0xffffffff until changed via /proc 616 * is 0xffffffff until changed via /proc
617 * That's how it's done on x86. If we want it differently, then 617 * That's how it's done on x86. If we want it differently, then
618 * we should make sure we also change the default values of irq_affinity 618 * we should make sure we also change the default values of
619 * in irq.c. 619 * irq_desc[].affinity in irq.c.
620 */ 620 */
621 for (i = 0; i < NumSources; i++) 621 for (i = 0; i < NumSources; i++)
622 openpic_mapirq(i, msk, CPU_MASK_ALL); 622 openpic_mapirq(i, msk, CPU_MASK_ALL);
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c
index 5d7c821ab7f6..ab9e640df228 100644
--- a/arch/sparc64/kernel/irq.c
+++ b/arch/sparc64/kernel/irq.c
@@ -224,7 +224,7 @@ static inline struct ino_bucket *virt_irq_to_bucket(unsigned int virt_irq)
224#ifdef CONFIG_SMP 224#ifdef CONFIG_SMP
225static int irq_choose_cpu(unsigned int virt_irq) 225static int irq_choose_cpu(unsigned int virt_irq)
226{ 226{
227 cpumask_t mask = irq_affinity[virt_irq]; 227 cpumask_t mask = irq_desc[virt_irq].affinity;
228 int cpuid; 228 int cpuid;
229 229
230 if (cpus_equal(mask, CPU_MASK_ALL)) { 230 if (cpus_equal(mask, CPU_MASK_ALL)) {
diff --git a/arch/x86_64/kernel/irq.c b/arch/x86_64/kernel/irq.c
index 0c2fb2c77bd0..a1f1df5f7bfc 100644
--- a/arch/x86_64/kernel/irq.c
+++ b/arch/x86_64/kernel/irq.c
@@ -146,7 +146,7 @@ void fixup_irqs(cpumask_t map)
146 if (irq == 2) 146 if (irq == 2)
147 continue; 147 continue;
148 148
149 cpus_and(mask, irq_affinity[irq], map); 149 cpus_and(mask, irq_desc[irq].affinity, map);
150 if (any_online_cpu(mask) == NR_CPUS) { 150 if (any_online_cpu(mask) == NR_CPUS) {
151 printk("Breaking affinity for irq %i\n", irq); 151 printk("Breaking affinity for irq %i\n", irq);
152 mask = map; 152 mask = map;