]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
parisc: convert cpu_check_affinity to new cpumask api
authorKyle McMartin <kyle@shortfin.cabal.ca>
Mon, 16 Feb 2009 08:20:54 +0000 (03:20 -0500)
committerKyle McMartin <kyle@treachery.i.cabal.ca>
Fri, 13 Mar 2009 05:20:27 +0000 (01:20 -0400)
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>
arch/parisc/include/asm/irq.h
arch/parisc/kernel/irq.c
drivers/parisc/iosapic.c

index 399c81981ed5a2081e8a4a32dff54c341d2036af..dfa26b67f919ec3a2415a02285f9765e43670c7b 100644 (file)
@@ -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;
index a572112f5abaf7646a004d081d3be0d97e862367..29e70e16ede8feaa9672f270c13bdf04aadd174a 100644 (file)
@@ -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
 
index 1cdfdea5d7ef0acc41756f234abe37a47898f2d7..501aaf1f253f28c4af811d747d1d0461f790133d 100644 (file)
@@ -708,11 +708,14 @@ static void iosapic_set_affinity_irq(unsigned int irq,
        struct vector_info *vi = iosapic_get_vector(irq);
        u32 d0, d1, dummy_d0;
        unsigned long flags;
+       int dest_cpu;
 
-       if (cpu_check_affinity(irq, dest))
+       dest_cpu = cpu_check_affinity(irq, dest);
+       if (dest_cpu < 0)
                return;
 
-       vi->txn_addr = txn_affinity_addr(irq, cpumask_first(dest));
+       irq_desc[irq].affinity = cpumask_of_cpu(dest_cpu);
+       vi->txn_addr = txn_affinity_addr(irq, dest_cpu);
 
        spin_lock_irqsave(&iosapic_lock, flags);
        /* d1 contains the destination CPU, so only want to set that