Commit cf2890ac authored by Johan Hovold's avatar Johan Hovold Committed by sanglipeng
Browse files

PM: sleep: wakeirq: fix wake irq arming

stable inclusion
from stable-v5.10.190
commit 86e4e949ea815dbd517c8f96fe06a1f2b770085a
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I928UI

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=86e4e949ea815dbd517c8f96fe06a1f2b770085a



--------------------------------

[ Upstream commit 8527beb1 ]

The decision whether to enable a wake irq during suspend can not be done
based on the runtime PM state directly as a driver may use wake irqs
without implementing runtime PM. Such drivers specifically leave the
state set to the default 'suspended' and the wake irq is thus never
enabled at suspend.

Add a new wake irq flag to track whether a dedicated wake irq has been
enabled at runtime suspend and therefore must not be enabled at system
suspend.

Note that pm_runtime_enabled() can not be used as runtime PM is always
disabled during late suspend.

Fixes: 69728051 ("PM / wakeirq: Fix unbalanced IRQ enable for wakeirq")
Cc: 4.16+ <stable@vger.kernel.org> # 4.16+
Signed-off-by: default avatarJohan Hovold <johan+linaro@kernel.org>
Reviewed-by: default avatarTony Lindgren <tony@atomide.com>
Tested-by: default avatarTony Lindgren <tony@atomide.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 23a0dcbd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment