diff options
| author | Nicolas Pitre <nicolas.pitre@linaro.org> | 2011-07-22 09:24:52 -0400 |
|---|---|---|
| committer | Nicolas Pitre <nicolas.pitre@linaro.org> | 2011-07-22 09:24:52 -0400 |
| commit | 81f6236c4811b2b2b3ea64a306c071f76788ac4b (patch) | |
| tree | 6827fb1ccf60be85f34552b3bb53628793dde17e /arch/arm/common | |
| parent | 63afdb50e8cd7fbf7fc4a0b2def8e7ba9ec37605 (diff) | |
| parent | 78359cb86b8c4c8946f6732eac2757fa5e1d4de4 (diff) | |
Merge remote-tracking branch 'rmk/fixes' into linaro-3.0
Diffstat (limited to 'arch/arm/common')
| -rw-r--r-- | arch/arm/common/gic.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c index 4ddd0a6ac7f..7bdd91766d6 100644 --- a/arch/arm/common/gic.c +++ b/arch/arm/common/gic.c @@ -179,22 +179,21 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val, { void __iomem *reg = gic_dist_base(d) + GIC_DIST_TARGET + (gic_irq(d) & ~3); unsigned int shift = (d->irq % 4) * 8; - unsigned int cpu = cpumask_first(mask_val); + unsigned int cpu = cpumask_any_and(mask_val, cpu_online_mask); u32 val, mask, bit; - if (cpu >= 8) + if (cpu >= 8 || cpu >= nr_cpu_ids) return -EINVAL; mask = 0xff << shift; bit = 1 << (cpu + shift); spin_lock(&irq_controller_lock); - d->node = cpu; val = readl_relaxed(reg) & ~mask; writel_relaxed(val | bit, reg); spin_unlock(&irq_controller_lock); - return 0; + return IRQ_SET_MASK_OK; } #endif |
