Skip to content

sh-sci / PM: Fix problem with runtime PM callbacks run with interrupts off

Rafael J. Wysocki linux-pm linux-sh lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2PM / Runtime: Introduce pm_runtime_irq_unsafe()Documentation/power/runtime_pm.txt drivers/base/power/runtime.c include/linux/pm_runtime.h+21 -54 replies
1/2PM / Runtime: Introduce pm_runtime_irq_unsafe()Documentation/power/runtime_pm.txt drivers/base/power/runtime.c include/linux/pm_runtime.h+21 -50 replies
2/2sh-sci / PM: Use power.irq_safedrivers/tty/serial/sh-sci.c+7 -10 replies
2/2sh-sci / PM: Use power.irq_safedrivers/tty/serial/sh-sci.c+7 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] sh-sci / PM: Fix problem with runtime PM callbacks run with interrupts off

Hi,

The sh-sci driver uses pm_runtime_get/put_sync() in such a way that they may be run with interrupts off and cause the (recently added) might_sleep_if() to trigger in rpm_suspend/resume().

To avoid that, it's necessary to set the SCI device's power.irq_safe flag to indicate that it's runtime PM callbacks may be executed with interrupts off safely. However, the sh-sci driver needs to be able to clear that flag sometimes, so a new runtime PM helper for doing that is needed.

[1/2] - Add pm_runtime_irq_unsafe() for clearing the power.irq_safe device flag. [2/2] - Make sh-sci use power.irq_safe to indicate that runtime PM callbacks
may be run with interrupts off.

Thanks,
Rafael