diff options
author | Sebastian Reichel <sre@kernel.org> | 2014-05-06 15:44:50 +0200 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2014-05-06 15:44:50 +0200 |
commit | 695f5ec02203ef23f127eacb86991d23307f3c6f (patch) | |
tree | ecb9c29268fa34559dfa06472d991bc5d92708be /drivers/irqchip/irq-gic.c | |
parent | 5bdeae302496a8ac49848f4fed26b1d87a67d966 (diff) | |
parent | 793ec5f7dccf95c0d6d5d57a925a13261a7cbd2b (diff) | |
download | linux-695f5ec02203ef23f127eacb86991d23307f3c6f.tar.bz2 |
Merge branch 'n900-modem-support' into n900-dt-with-ssin900-dt-with-ssi
Conflicts:
arch/arm/boot/dts/omap3-n900.dts
Diffstat (limited to 'drivers/irqchip/irq-gic.c')
-rw-r--r-- | drivers/irqchip/irq-gic.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c index 4300b6606f5e..57d165e026f4 100644 --- a/drivers/irqchip/irq-gic.c +++ b/drivers/irqchip/irq-gic.c @@ -246,10 +246,14 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val, bool force) { void __iomem *reg = gic_dist_base(d) + GIC_DIST_TARGET + (gic_irq(d) & ~3); - unsigned int shift = (gic_irq(d) % 4) * 8; - unsigned int cpu = cpumask_any_and(mask_val, cpu_online_mask); + unsigned int cpu, shift = (gic_irq(d) % 4) * 8; u32 val, mask, bit; + if (!force) + cpu = cpumask_any_and(mask_val, cpu_online_mask); + else + cpu = cpumask_first(mask_val); + if (cpu >= NR_GIC_CPU_IF || cpu >= nr_cpu_ids) return -EINVAL; |