aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2014-06-23 12:00:00 +0100
committerMark Brown <broonie@linaro.org>2014-06-23 12:00:00 +0100
commitcdb2f0ff6ccb45ed2040f74533bd3fbb386d01b9 (patch)
tree8b7527dec270ef35c4eb94b116f167c06b6e8d79
parent9952ea5aee31bb082ca5f702507fb563ed23431f (diff)
parentf31055c18c14eca21f0c4c6e82fc922ef49c9fd3 (diff)
downloadlinux-linaro-stable-cdb2f0ff6ccb45ed2040f74533bd3fbb386d01b9.tar.gz
Merge remote-tracking branch 'lsk/v3.10/topic/gic-workaround' into linux-linaro-lsk
-rw-r--r--drivers/irqchip/irq-gic.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
index e0a4209..65bc837 100644
--- a/drivers/irqchip/irq-gic.c
+++ b/drivers/irqchip/irq-gic.c
@@ -247,14 +247,10 @@ 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 cpu, shift = (gic_irq(d) % 4) * 8;
+ unsigned int shift = (gic_irq(d) % 4) * 8;
+ unsigned int cpu = cpumask_any_and(mask_val, cpu_online_mask);
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;