Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0410136f authored by Praveen Chidambaram's avatar Praveen Chidambaram
Browse files

arm: irq: Notify affinity change when migrating IRQs during hotplug



Hotplug causes IRQs affine to a core that is being taken down to migrate
to an online core. This is done by directly calling the irq_set_affinity
associated with the irq_chip structure. Instead using the
irq_set_affinity() api lets the notifications bubble through.

Change-Id: I81340dc6643a8217518212b9fc949c9a808aea05
Signed-off-by: default avatarPraveen Chidambaram <pchidamb@codeaurora.org>
parent acddfa88
Loading
Loading
Loading
Loading
+2 −12
Original line number Diff line number Diff line
@@ -145,8 +145,6 @@ static bool migrate_one_irq(struct irq_desc *desc)
{
	struct irq_data *d = irq_desc_get_irq_data(desc);
	const struct cpumask *affinity = d->affinity;
	struct irq_chip *c;
	bool ret = false;

	/*
	 * If this is a per-CPU interrupt, or the affinity does not
@@ -155,18 +153,10 @@ static bool migrate_one_irq(struct irq_desc *desc)
	if (irqd_is_per_cpu(d) || !cpumask_test_cpu(smp_processor_id(), affinity))
		return false;

	if (cpumask_any_and(affinity, cpu_online_mask) >= nr_cpu_ids) {
	if (cpumask_any_and(affinity, cpu_online_mask) >= nr_cpu_ids)
		affinity = cpu_online_mask;
		ret = true;
	}

	c = irq_data_get_irq_chip(d);
	if (!c->irq_set_affinity)
		pr_debug("IRQ%u: unable to set affinity\n", d->irq);
	else if (c->irq_set_affinity(d, affinity, true) == IRQ_SET_MASK_OK && ret)
		cpumask_copy(d->affinity, affinity);

	return ret;
	return __irq_set_affinity_locked(d, affinity) == 0;
}

/*