Skip to content

thermal: core: Fix two issues related to thermal zone resume

Rafael J. Wysocki linux-pm lkml 1 version New

Get series with b4
b4 am 6070114.lOV4Wx5bFT@kreacher

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2thermal: core: Synchronize suspend-prepare and post-suspend actionsdrivers/thermal/thermal_core.c drivers/thermal/thermal_core.h+25 -00 replies
2/2thermal: core: Change PM notifier priority to the minimumdrivers/thermal/thermal_core.c+6 -00 replies

Reviews trailers per patch

None of the 2 patches has a Reviewed-by or Acked-by.

Patch[email protected]
1/2
2/2T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH v1 0/2] thermal: core: Fix two issues related to thermal zone resume

Hi Everyone,

There are two issues resulting from asynchronous suspend of thermal zones.

One of them is platform-specific and related to some firmware issue (I think) causing battery readings to become invalid after a system resume due to interference between ACPI battery resume and a thermal zone update. This can be addressed by running the thermal PM notifier after all of the other PM notifiers (including the ACPI battery one) which is done by patch [2/2].

The other one is mostly theoretical, but I couldn't convince myself that it cannot happen. Namely, a leftover thermal zone resume running during the next system suspend (if it is carried out back-to-back with the previous suspend-resume cycle) can accidentally reset tz->suspended set for a thermal zone by the thermal pre-suspend PM notifier. This is addressed by patch [1/2] (which goes before the second one because the latter increases the likelihood of the issue slightly).

Thanks!