Re: [PATCH] genirq: Check irq disabled & masked states in irq_shutdown

From: jeffy
Date: Sat May 27 2017 - 00:52:44 EST


Hi Thomas,

On 05/26/2017 09:20 PM, Thomas Gleixner wrote:
On Fri, 26 May 2017, Jeffy Chen wrote:

If irq is already disabled and masked, we would hit a unbalanced irq
shutdown/disable/mask when freeing it.

Errr? What exactly is unbalanced? None of the called functions has any
counter or whatever.

Can you please explain what you are trying to fix?

sorry, i'll try to rewrite the commit message.

for example when a driver(drivers/net/wireless/marvell/mwifiex/main.c) try to do these:

devm_request_irq->irq_startup->irq_enable
disable_irq <-- disabled and masked
devm_free_irq->irq_shutdown <-- disable it again

and the pinctrl-rockchip driver would enable/disable gpio clk in irq_enable/irq_disable, so it would try to disable a disabled clk(due to unbalanced irq disable)



Thanks,

tglx