diff options
author | Mike Travis <travis@sgi.com> | 2009-01-12 18:27:13 -0500 |
---|---|---|
committer | Mike Travis <travis@sgi.com> | 2009-01-12 18:27:13 -0500 |
commit | e65e49d0f3714f4a6a42f6f6a19926ba33fcda75 (patch) | |
tree | 8b805b51f41c980ceb79f8fad0e56dac428c7c37 /arch/mips | |
parent | 28e08861b9afab4168b758fb7b95aa7a4da0f668 (diff) |
irq: update all arches for new irq_desc
Impact: cleanup, update to new cpumask API
Irq_desc.affinity and irq_desc.pending_mask are now cpumask_var_t's
so access to them should be using the new cpumask API.
Signed-off-by: Mike Travis <travis@sgi.com>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/include/asm/irq.h | 2 | ||||
-rw-r--r-- | arch/mips/kernel/irq-gic.c | 2 | ||||
-rw-r--r-- | arch/mips/kernel/smtc.c | 2 | ||||
-rw-r--r-- | arch/mips/mti-malta/malta-smtc.c | 5 |
4 files changed, 6 insertions, 5 deletions
diff --git a/arch/mips/include/asm/irq.h b/arch/mips/include/asm/irq.h index abc62aa744ac..3214ade02d10 100644 --- a/arch/mips/include/asm/irq.h +++ b/arch/mips/include/asm/irq.h | |||
@@ -66,7 +66,7 @@ extern void smtc_forward_irq(unsigned int irq); | |||
66 | */ | 66 | */ |
67 | #define IRQ_AFFINITY_HOOK(irq) \ | 67 | #define IRQ_AFFINITY_HOOK(irq) \ |
68 | do { \ | 68 | do { \ |
69 | if (!cpu_isset(smp_processor_id(), irq_desc[irq].affinity)) { \ | 69 | if (!cpumask_test_cpu(smp_processor_id(), irq_desc[irq].affinity)) {\ |
70 | smtc_forward_irq(irq); \ | 70 | smtc_forward_irq(irq); \ |
71 | irq_exit(); \ | 71 | irq_exit(); \ |
72 | return; \ | 72 | return; \ |
diff --git a/arch/mips/kernel/irq-gic.c b/arch/mips/kernel/irq-gic.c index 494a49a317e9..87deb8f6c458 100644 --- a/arch/mips/kernel/irq-gic.c +++ b/arch/mips/kernel/irq-gic.c | |||
@@ -187,7 +187,7 @@ static void gic_set_affinity(unsigned int irq, const struct cpumask *cpumask) | |||
187 | set_bit(irq, pcpu_masks[first_cpu(tmp)].pcpu_mask); | 187 | set_bit(irq, pcpu_masks[first_cpu(tmp)].pcpu_mask); |
188 | 188 | ||
189 | } | 189 | } |
190 | irq_desc[irq].affinity = *cpumask; | 190 | cpumask_copy(irq_desc[irq].affinity, cpumask); |
191 | spin_unlock_irqrestore(&gic_lock, flags); | 191 | spin_unlock_irqrestore(&gic_lock, flags); |
192 | 192 | ||
193 | } | 193 | } |
diff --git a/arch/mips/kernel/smtc.c b/arch/mips/kernel/smtc.c index b6cca01ff82b..d2c1ab12425a 100644 --- a/arch/mips/kernel/smtc.c +++ b/arch/mips/kernel/smtc.c | |||
@@ -686,7 +686,7 @@ void smtc_forward_irq(unsigned int irq) | |||
686 | * and efficiency, we just pick the easiest one to find. | 686 | * and efficiency, we just pick the easiest one to find. |
687 | */ | 687 | */ |
688 | 688 | ||
689 | target = first_cpu(irq_desc[irq].affinity); | 689 | target = cpumask_first(irq_desc[irq].affinity); |
690 | 690 | ||
691 | /* | 691 | /* |
692 | * We depend on the platform code to have correctly processed | 692 | * We depend on the platform code to have correctly processed |
diff --git a/arch/mips/mti-malta/malta-smtc.c b/arch/mips/mti-malta/malta-smtc.c index aabd7274507b..5ba31888fefb 100644 --- a/arch/mips/mti-malta/malta-smtc.c +++ b/arch/mips/mti-malta/malta-smtc.c | |||
@@ -116,7 +116,7 @@ struct plat_smp_ops msmtc_smp_ops = { | |||
116 | 116 | ||
117 | void plat_set_irq_affinity(unsigned int irq, const struct cpumask *affinity) | 117 | void plat_set_irq_affinity(unsigned int irq, const struct cpumask *affinity) |
118 | { | 118 | { |
119 | cpumask_t tmask = *affinity; | 119 | cpumask_t tmask; |
120 | int cpu = 0; | 120 | int cpu = 0; |
121 | void smtc_set_irq_affinity(unsigned int irq, cpumask_t aff); | 121 | void smtc_set_irq_affinity(unsigned int irq, cpumask_t aff); |
122 | 122 | ||
@@ -139,11 +139,12 @@ void plat_set_irq_affinity(unsigned int irq, const struct cpumask *affinity) | |||
139 | * be made to forward to an offline "CPU". | 139 | * be made to forward to an offline "CPU". |
140 | */ | 140 | */ |
141 | 141 | ||
142 | cpumask_copy(&tmask, affinity); | ||
142 | for_each_cpu(cpu, affinity) { | 143 | for_each_cpu(cpu, affinity) { |
143 | if ((cpu_data[cpu].vpe_id != 0) || !cpu_online(cpu)) | 144 | if ((cpu_data[cpu].vpe_id != 0) || !cpu_online(cpu)) |
144 | cpu_clear(cpu, tmask); | 145 | cpu_clear(cpu, tmask); |
145 | } | 146 | } |
146 | irq_desc[irq].affinity = tmask; | 147 | cpumask_copy(irq_desc[irq].affinity, &tmask); |
147 | 148 | ||
148 | if (cpus_empty(tmask)) | 149 | if (cpus_empty(tmask)) |
149 | /* | 150 | /* |