linux-stable/drivers/base/power
Qingliang Li 56a2038d00 PM: sleep: wakeirq: fix wake irq warning in system suspend
[ Upstream commit e7a7681c85 ]

When driver uses pm_runtime_force_suspend() as the system suspend callback
function and registers the wake irq with reverse enable ordering, the wake
irq will be re-enabled when entering system suspend, triggering an
'Unbalanced enable for IRQ xxx' warning. In this scenario, the call
sequence during system suspend is as follows:
  suspend_devices_and_enter()
    -> dpm_suspend_start()
      -> dpm_run_callback()
        -> pm_runtime_force_suspend()
          -> dev_pm_enable_wake_irq_check()
          -> dev_pm_enable_wake_irq_complete()

    -> suspend_enter()
      -> dpm_suspend_noirq()
        -> device_wakeup_arm_wake_irqs()
          -> dev_pm_arm_wake_irq()

To fix this issue, complete the setting of WAKE_IRQ_DEDICATED_ENABLED flag
in dev_pm_enable_wake_irq_complete() to avoid redundant irq enablement.

Fixes: 8527beb120 ("PM: sleep: wakeirq: fix wake irq arming")
Reviewed-by: Dhruva Gole <d-gole@ti.com>
Signed-off-by: Qingliang Li <qingliang.li@mediatek.com>
Reviewed-by: Johan Hovold <johan+linaro@kernel.org>
Cc: 5.16+ <stable@vger.kernel.org> # 5.16+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-04-03 15:19:30 +02:00
..
clock_ops.c PM: runtime: add devm_pm_clk_create helper 2021-08-26 11:28:07 -07:00
common.c PM: domains: Extend dev_pm_domain_detach() doc 2022-04-13 17:07:58 +02:00
domain.c pmdomain: core: Move the unused cleanup to a _sync initcall 2024-02-23 09:12:47 +01:00
domain_governor.c PM: domains: Allocate governor data dynamically based on a genpd governor 2022-05-19 20:16:05 +02:00
generic_ops.c
main.c PM: sleep: Fix possible deadlocks in core system-wide PM code 2024-01-31 16:17:09 -08:00
Makefile
power.h PM: sleep: wakeirq: fix wake irq arming 2023-08-03 10:24:16 +02:00
qos-test.c
qos.c
runtime.c PM: runtime: Do not call __rpm_callback() from rpm_idle() 2022-12-31 13:31:59 +01:00
sysfs.c drivers core: Miscellaneous changes for sysfs_emit 2020-10-02 13:12:07 +02:00
trace.c rtc: Extend timeout for waiting for UIP to clear to 1s 2024-01-31 16:17:01 -08:00
wakeirq.c PM: sleep: wakeirq: fix wake irq warning in system suspend 2024-04-03 15:19:30 +02:00
wakeup.c PM: wakeup: Add extra debugging statement for multiple active IRQs 2022-09-03 20:04:33 +02:00
wakeup_stats.c PM: wakeup: remove redundant assignment to variable retval 2021-04-22 15:22:38 +02:00