Files
linux/include/linux
Thomas Gleixner c1a957d170 PM / suspend: Prevent might sleep splats
timekeeping suspend/resume calls read_persistent_clock() which takes
rtc_lock. That results in might sleep warnings because at that point
we run with interrupts disabled.

We cannot convert rtc_lock to a raw spinlock as that would trigger
other might sleep warnings.

As a workaround we disable the might sleep warnings by setting
system_state to SYSTEM_SUSPEND before calling sysdev_suspend() and
restoring it to SYSTEM_RUNNING afer sysdev_resume(). There is no lock
contention because hibernate / suspend to RAM is single-CPU at this
point.

In s2idle's case the system_state is set to SYSTEM_SUSPEND before
timekeeping_suspend() which is invoked by the last CPU. In the resume
case it set back to SYSTEM_RUNNING after timekeeping_resume() which is
invoked by the first CPU in the resume case. The other CPUs will block
on tick_freeze_lock.

Signed-off-by: Thomas Gleixner <[email protected]>
[bigeasy: cover s2idle in tick_freeze() / tick_unfreeze()]
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
2018-05-27 11:55:02 +02:00
..
…
2018-02-14 09:43:22 -08:00
…
…
…
…
…
…
…
…
…
2018-02-20 11:34:54 +00:00
2018-03-08 13:56:24 +05:30
2018-03-29 14:29:55 -04:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2018-04-20 17:18:35 -07:00
…
…
2018-04-11 10:28:37 -07:00
…
…
…
…
2018-03-16 10:56:13 +01:00
2018-03-31 02:15:18 +02:00
2018-03-31 02:16:26 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
2018-03-16 15:45:51 -07:00
…
…
…
…
…
…
…
…
…
2018-03-16 10:55:47 +01:00
…
…
…
…
…
2018-03-26 15:09:38 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2018-03-26 15:56:44 +02:00
…
…
…
…
…
…
2018-03-31 02:15:18 +02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
2018-04-26 09:02:01 -06:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2018-02-22 21:13:03 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
2018-03-26 08:53:43 -06:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2018-04-11 10:28:38 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2018-03-13 13:29:10 -07:00
…
…
…
…
…
…
…
…
…
…
2018-04-12 09:41:19 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2018-04-11 10:28:32 -07:00
…
…
…
…
…
…
…
2018-03-26 13:14:43 -04:00
2018-03-26 13:14:43 -04:00
2018-03-26 13:14:43 -04:00
…
…
…
…
…
2018-03-30 12:56:22 -04:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2018-04-11 10:28:39 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2018-05-11 17:28:45 -07:00
2018-05-11 17:28:45 -07:00
…
…
2018-02-20 16:12:26 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2018-03-17 14:20:55 +01:00
…
2018-03-01 08:33:05 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2018-04-05 21:36:24 -07:00
2018-04-05 21:36:27 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2018-02-06 18:32:47 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2018-02-20 16:10:25 -08:00
…
…
…
…
…
…
…
…
…
…
2018-02-06 18:32:44 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…