interrupt: mask child interrupt immediately

Masks child interrupt as soon as it's disabled.
We shouldn't wait for the parent to have no children.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
This commit is contained in:
Tomasz Lauda 2018-09-04 11:11:35 +02:00
parent 4c0b1d4712
commit 7322e29f8e
1 changed files with 4 additions and 4 deletions

View File

@ -158,14 +158,14 @@ static uint32_t irq_disable_child(struct irq_desc *parent, int irq)
child->enabled_count) {
child->enabled_count = 0;
parent->enabled_count--;
/* disable the child interrupt */
platform_interrupt_mask(irq, 0);
}
}
if (parent->enabled_count == 0) {
/* disable the child interrupt */
platform_interrupt_mask(irq, 0);
if (parent->enabled_count == 0)
arch_interrupt_disable_mask(1 << SOF_IRQ_NUMBER(irq));
}
spin_unlock(&parent->lock);
return 0;