ARM: CPU hotplug: pass in proper affinity mask on IRQ migration
Now that the GIC takes care of selecting a target interrupt from the affinity mask, we don't need all this complexity in the core code anymore. Just detect when we need to break affinity. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
Родитель
5dfc54e087
Коммит
ca15af19ac
|
@ -133,17 +133,15 @@ int __init arch_probe_nr_irqs(void)
|
||||||
|
|
||||||
static bool migrate_one_irq(struct irq_data *d)
|
static bool migrate_one_irq(struct irq_data *d)
|
||||||
{
|
{
|
||||||
unsigned int cpu = cpumask_any_and(d->affinity, cpu_online_mask);
|
const struct cpumask *affinity = d->affinity;
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
|
|
||||||
if (cpu >= nr_cpu_ids) {
|
if (cpumask_any_and(affinity, cpu_online_mask) >= nr_cpu_ids) {
|
||||||
cpu = cpumask_any(cpu_online_mask);
|
affinity cpu_online_mask;
|
||||||
ret = true;
|
ret = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
pr_debug("IRQ%u: moving from cpu%u to cpu%u\n", d->irq, d->node, cpu);
|
d->chip->irq_set_affinity(d, affinity, true);
|
||||||
|
|
||||||
d->chip->irq_set_affinity(d, cpumask_of(cpu), true);
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче