diff options
author | Kyle McMartin <kyle@shortfin.cabal.ca> | 2009-02-16 03:20:54 -0500 |
---|---|---|
committer | Kyle McMartin <kyle@treachery.i.cabal.ca> | 2009-03-13 01:20:27 -0400 |
commit | 8b6649c575e0d8312f62fe643ae43558892da2e1 (patch) | |
tree | efbb8966d9b607ac9d46113255e792f645d05d49 /arch/parisc | |
parent | 9dfe914da83ebc88f85d94b4d30d0e45882766d1 (diff) | |
download | op-kernel-dev-8b6649c575e0d8312f62fe643ae43558892da2e1.zip op-kernel-dev-8b6649c575e0d8312f62fe643ae43558892da2e1.tar.gz |
parisc: convert cpu_check_affinity to new cpumask api
cpumask arg to the affinity function is now const, sort
that out through the irq_desc implementations.
Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
Diffstat (limited to 'arch/parisc')
-rw-r--r-- | arch/parisc/include/asm/irq.h | 2 | ||||
-rw-r--r-- | arch/parisc/kernel/irq.c | 12 |
2 files changed, 8 insertions, 6 deletions
diff --git a/arch/parisc/include/asm/irq.h b/arch/parisc/include/asm/irq.h index 399c819..dfa26b6 100644 --- a/arch/parisc/include/asm/irq.h +++ b/arch/parisc/include/asm/irq.h @@ -49,7 +49,7 @@ extern unsigned long txn_alloc_addr(unsigned int); extern unsigned long txn_affinity_addr(unsigned int irq, int cpu); extern int cpu_claim_irq(unsigned int irq, struct irq_chip *, void *); -extern int cpu_check_affinity(unsigned int irq, cpumask_t *dest); +extern int cpu_check_affinity(unsigned int irq, const struct cpumask *dest); /* soft power switch support (power.c) */ extern struct tasklet_struct power_tasklet; diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c index a572112..29e70e1 100644 --- a/arch/parisc/kernel/irq.c +++ b/arch/parisc/kernel/irq.c @@ -112,7 +112,7 @@ void cpu_end_irq(unsigned int irq) } #ifdef CONFIG_SMP -int cpu_check_affinity(unsigned int irq, cpumask_t *dest) +int cpu_check_affinity(unsigned int irq, const struct cpumask *dest) { int cpu_dest; @@ -126,17 +126,19 @@ int cpu_check_affinity(unsigned int irq, cpumask_t *dest) /* whatever mask they set, we just allow one CPU */ cpu_dest = first_cpu(*dest); - *dest = cpumask_of_cpu(cpu_dest); - return 0; + return cpu_dest; } static void cpu_set_affinity_irq(unsigned int irq, const struct cpumask *dest) { - if (cpu_check_affinity(irq, dest)) + int cpu_dest; + + cpu_dest = cpu_check_affinity(irq, dest); + if (cpu_dest < 0) return; - cpumask_copy(&irq_desc[irq].affinity, dest); + cpumask_copy(&irq_desc[irq].affinity, &cpumask_of_cpu(cpu_dest)); } #endif |