]> git.baikalelectronics.ru Git - kernel.git/commit
irqchip/qcom-pdc: Trim unused levels of the interrupt hierarchy
authorMarc Zyngier <maz@kernel.org>
Mon, 23 Aug 2021 08:04:40 +0000 (13:34 +0530)
committerMarc Zyngier <maz@kernel.org>
Mon, 23 Aug 2021 08:45:31 +0000 (09:45 +0100)
commit6f352276f3368c611438e4cfa251db815e0de4bf
tree819aeb3ba26db80c0ed4601454f1acdde8cd9bcd
parent6ecd8e7132825e03bf1611a1cbb6831571d0a694
irqchip/qcom-pdc: Trim unused levels of the interrupt hierarchy

The QCOM PDC driver creates a bunch of unnecessary levels in
the interrupt hierarchy when dealing with non-wakeup-capable
interrupts. By definition, these lines are terminated at the
PDC level, and everything below this is completely fake.

This also results in additional complexity as most of the
callbacks have to check for the validity of the parent level.
Needless to say, this doesn't look very good.

Solve this by disconnecting the interrupt hierarchy below
the last valid level, and considerably simplify the handling
of all the other interrupts by avoiding now unnecessary cheks.
In most cases, the standard irq_*_parent() handlers are directly
used.

This also cures an issue reporting by Maulik where gpio_to_irq()
returns an error after having observed a set of invalid levels.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
Tested-by: Maulik Shah <mkshah@codeaurora.org>
Link: https://lore.kernel.org/r/1629705880-27877-3-git-send-email-mkshah@codeaurora.org
drivers/irqchip/qcom-pdc.c