drivers: GICv3: Check IRQ state in gic_set_affinity()
If both irq chip and external interrupt controller implement irq_disable callback then disable_irq() API disables an interrupt at external interrupt controller level but does not disable at GIC level due to lazy approach. During the cpu hotplug gic_set_affinity() checks whether IRQ enabled at GIC level or not and enabling IRQ at external interrupt controller level too after IRQ migration to new cpu even though IRQ was disabled. So add a check in gic_set_affinity() to check whether IRQ was disabled in descriptor before enabling. Change-Id: Iba81881c08102ac0a5960c3a97c1c9f8c477bd56 Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
This commit is contained in:
parent
3f942f9f96
commit
4fa55b9ca3
1 changed files with 8 additions and 0 deletions
|
@ -803,6 +803,14 @@ static int gic_set_affinity(struct irq_data *d, const struct cpumask *mask_val,
|
|||
|
||||
gic_write_irouter(val, reg);
|
||||
|
||||
/*
|
||||
* It is possible that irq is disabled from SW perspective only,
|
||||
* because kernel takes lazy disable approach. Therefore check irq
|
||||
* descriptor if it should kept disabled.
|
||||
*/
|
||||
if (irqd_irq_disabled(d))
|
||||
enabled = 0;
|
||||
|
||||
/*
|
||||
* If the interrupt was enabled, enabled it again. Otherwise,
|
||||
* just wait for the distributor to have digested our changes.
|
||||
|
|
Loading…
Add table
Reference in a new issue