|
@@ -246,10 +246,14 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val,
|
|
bool force)
|
|
bool force)
|
|
{
|
|
{
|
|
void __iomem *reg = gic_dist_base(d) + GIC_DIST_TARGET + (gic_irq(d) & ~3);
|
|
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;
|
|
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)
|
|
if (cpu >= NR_GIC_CPU_IF || cpu >= nr_cpu_ids)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
|