Skip to content

Commit ca15af1

Browse files
author
Russell King
committed
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>
1 parent 5dfc54e commit ca15af1

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

‎arch/arm/kernel/irq.c‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -133,17 +133,15 @@ int __init arch_probe_nr_irqs(void)
133133

134134
static bool migrate_one_irq(struct irq_data *d)
135135
{
136-
unsigned int cpu = cpumask_any_and(d->affinity, cpu_online_mask);
136+
const struct cpumask *affinity = d->affinity;
137137
bool ret = false;
138138

139-
if (cpu >= nr_cpu_ids) {
140-
cpu = cpumask_any(cpu_online_mask);
139+
if (cpumask_any_and(affinity, cpu_online_mask) >= nr_cpu_ids) {
140+
affinity cpu_online_mask;
141141
ret = true;
142142
}
143143

144-
pr_debug("IRQ%u: moving from cpu%u to cpu%u\n", d->irq, d->node, cpu);
145-
146-
d->chip->irq_set_affinity(d, cpumask_of(cpu), true);
144+
d->chip->irq_set_affinity(d, affinity, true);
147145

148146
return ret;
149147
}

0 commit comments

Comments
 (0)