diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2008-12-13 05:50:26 -0500 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2008-12-13 05:50:26 -0500 |
commit | 0de26520c7cabf36e1de090ea8092f011a6106ce (patch) | |
tree | 3d02e509b6315fdfd9cdb8c9e0b9ed0a30cf9384 /arch/ia64/kernel/msi_ia64.c | |
parent | 29c0177e6a4ac094302bed54a1d4bbb6b740a9ef (diff) |
cpumask: make irq_set_affinity() take a const struct cpumask
Impact: change existing irq_chip API
Not much point with gentle transition here: the struct irq_chip's
setaffinity method signature needs to change.
Fortunately, not widely used code, but hits a few architectures.
Note: In irq_select_affinity() I save a temporary in by mangling
irq_desc[irq].affinity directly. Ingo, does this break anything?
(Folded in fix from KOSAKI Motohiro)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Mike Travis <travis@sgi.com>
Reviewed-by: Grant Grundler <grundler@parisc-linux.org>
Acked-by: Ingo Molnar <mingo@redhat.com>
Cc: ralf@linux-mips.org
Cc: grundler@parisc-linux.org
Cc: jeremy@xensource.com
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Diffstat (limited to 'arch/ia64/kernel/msi_ia64.c')
-rw-r--r-- | arch/ia64/kernel/msi_ia64.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/ia64/kernel/msi_ia64.c b/arch/ia64/kernel/msi_ia64.c index 702a09c13238..890339339035 100644 --- a/arch/ia64/kernel/msi_ia64.c +++ b/arch/ia64/kernel/msi_ia64.c | |||
@@ -49,11 +49,12 @@ | |||
49 | static struct irq_chip ia64_msi_chip; | 49 | static struct irq_chip ia64_msi_chip; |
50 | 50 | ||
51 | #ifdef CONFIG_SMP | 51 | #ifdef CONFIG_SMP |
52 | static void ia64_set_msi_irq_affinity(unsigned int irq, cpumask_t cpu_mask) | 52 | static void ia64_set_msi_irq_affinity(unsigned int irq, |
53 | const cpumask_t *cpu_mask) | ||
53 | { | 54 | { |
54 | struct msi_msg msg; | 55 | struct msi_msg msg; |
55 | u32 addr, data; | 56 | u32 addr, data; |
56 | int cpu = first_cpu(cpu_mask); | 57 | int cpu = first_cpu(*cpu_mask); |
57 | 58 | ||
58 | if (!cpu_online(cpu)) | 59 | if (!cpu_online(cpu)) |
59 | return; | 60 | return; |
@@ -166,12 +167,11 @@ void arch_teardown_msi_irq(unsigned int irq) | |||
166 | 167 | ||
167 | #ifdef CONFIG_DMAR | 168 | #ifdef CONFIG_DMAR |
168 | #ifdef CONFIG_SMP | 169 | #ifdef CONFIG_SMP |
169 | static void dmar_msi_set_affinity(unsigned int irq, cpumask_t mask) | 170 | static void dmar_msi_set_affinity(unsigned int irq, const struct cpumask *mask) |
170 | { | 171 | { |
171 | struct irq_cfg *cfg = irq_cfg + irq; | 172 | struct irq_cfg *cfg = irq_cfg + irq; |
172 | struct msi_msg msg; | 173 | struct msi_msg msg; |
173 | int cpu = first_cpu(mask); | 174 | int cpu = cpumask_first(mask); |
174 | |||
175 | 175 | ||
176 | if (!cpu_online(cpu)) | 176 | if (!cpu_online(cpu)) |
177 | return; | 177 | return; |
@@ -187,7 +187,7 @@ static void dmar_msi_set_affinity(unsigned int irq, cpumask_t mask) | |||
187 | msg.address_lo |= MSI_ADDR_DESTID_CPU(cpu_physical_id(cpu)); | 187 | msg.address_lo |= MSI_ADDR_DESTID_CPU(cpu_physical_id(cpu)); |
188 | 188 | ||
189 | dmar_msi_write(irq, &msg); | 189 | dmar_msi_write(irq, &msg); |
190 | irq_desc[irq].affinity = mask; | 190 | irq_desc[irq].affinity = *mask; |
191 | } | 191 | } |
192 | #endif /* CONFIG_SMP */ | 192 | #endif /* CONFIG_SMP */ |
193 | 193 | ||