diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-14 11:58:38 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-03-14 11:58:38 -0700 |
commit | bf9bc995a59d8c152a4d7e6465d6afa1e098b3e8 (patch) | |
tree | b525863daa5aa6e03afd734a3d38e3680569ff5c /arch/parisc/kernel/irq.c | |
parent | 6d71135d635f84b584df55096627ed750c069e61 (diff) | |
parent | e8f208e8f727515bc605f241a5f854b41f77d0ed (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6.29
* git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6.29:
parisc: update defconfigs
parisc: define x->x mmio accessors
parisc: dino: struct device - replace bus_id with dev_name(), dev_set_name()
parisc: convert cpu_check_affinity to new cpumask api
parisc: convert (read|write)bwlq to inlines
parisc: fix use of new cpumask api in irq.c
parisc: update parisc for new irq_desc
parisc: update MAINTAINERS
parisc: fix wrong assumption about bus->self
parisc: fix 64bit build
parisc: add braces around arguments in assembler macros
parisc: fix dev_printk() compile warnings for accessing a device struct
parisc: remove unused local out_putf label
parisc: fix `struct pt_regs' declared inside parameter list warning
parisc: fix section mismatch warnings
parisc: remove klist iterators
parisc: BUG_ON() cleanup
Diffstat (limited to 'arch/parisc/kernel/irq.c')
-rw-r--r-- | arch/parisc/kernel/irq.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c index ac2c822928c..29e70e16ede 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; @@ -120,23 +120,25 @@ int cpu_check_affinity(unsigned int irq, cpumask_t *dest) if (CHECK_IRQ_PER_CPU(irq)) { /* Bad linux design decision. The mask has already * been set; we must reset it */ - irq_desc[irq].affinity = CPU_MASK_ALL; + cpumask_setall(&irq_desc[irq].affinity); return -EINVAL; } /* 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; - irq_desc[irq].affinity = *dest; + cpumask_copy(&irq_desc[irq].affinity, &cpumask_of_cpu(cpu_dest)); } #endif @@ -295,7 +297,7 @@ int txn_alloc_irq(unsigned int bits_wide) unsigned long txn_affinity_addr(unsigned int irq, int cpu) { #ifdef CONFIG_SMP - irq_desc[irq].affinity = cpumask_of_cpu(cpu); + cpumask_copy(&irq_desc[irq].affinity, cpumask_of(cpu)); #endif return per_cpu(cpu_data, cpu).txn_addr; @@ -352,7 +354,7 @@ void do_cpu_irq_mask(struct pt_regs *regs) irq = eirr_to_irq(eirr_val); #ifdef CONFIG_SMP - dest = irq_desc[irq].affinity; + cpumask_copy(&dest, &irq_desc[irq].affinity); if (CHECK_IRQ_PER_CPU(irq_desc[irq].status) && !cpu_isset(smp_processor_id(), dest)) { int cpu = first_cpu(dest); |