From d4eee4b304ddbf59fdb9eab44c736403d83538d9 Mon Sep 17 00:00:00 2001 From: Russell King Date: Thu, 21 Jul 2011 15:00:57 +0100 Subject: [PATCH] --- yaml --- r: 258201 b: refs/heads/master c: 5dfc54e087c15f823ee9b6541d2f0f314e69cbed h: refs/heads/master i: 258199: e0550d3ec5f14a9f46af833cacd868936184045d v: v3 --- [refs] | 2 +- trunk/arch/arm/common/gic.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index a79a56231d3a..31b263f36284 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2ef75701d1711a1feee2a82b42a2597ddc05f88b +refs/heads/master: 5dfc54e087c15f823ee9b6541d2f0f314e69cbed diff --git a/trunk/arch/arm/common/gic.c b/trunk/arch/arm/common/gic.c index 635d9857b07a..7bdd91766d65 100644 --- a/trunk/arch/arm/common/gic.c +++ b/trunk/arch/arm/common/gic.c @@ -179,10 +179,10 @@ 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; @@ -193,7 +193,7 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val, writel_relaxed(val | bit, reg); spin_unlock(&irq_controller_lock); - return 0; + return IRQ_SET_MASK_OK; } #endif