On Tuesday, October 16, 2018 1:01:35 AM CEST Bart Van Assche wrote: > On Tue, 2018-10-16 at 00:44 +0200, Rafael J. Wysocki wrote: > > On Tue, Oct 16, 2018 at 12:19 AM Bart Van Assche <bvanassche@xxxxxxx> wrote: > > > > > > This patch avoids that the following warning is reported during hibernation: > > > > Well, what exactly is the problem and why is the patch the right way > > to address it? > > It is not safe to call ktime_get() after having called timekeeping_suspend(). Right, so this really is an ordering issue in "syscore" suspend. There are a couple of ways to address this without changing the ACPICA code. For example, ktime_get_mono_fast_ns() can be used instead of ktime_get() if the system is in deep suspend, like in the patch below (untested). --- drivers/acpi/osl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Index: linux-pm/drivers/acpi/osl.c =================================================================== --- linux-pm.orig/drivers/acpi/osl.c +++ linux-pm/drivers/acpi/osl.c @@ -623,7 +623,8 @@ void acpi_os_stall(u32 us) */ u64 acpi_os_get_timer(void) { - u64 time_ns = ktime_to_ns(ktime_get()); + u64 time_ns = ktime_to_ns(unlikely(system_state == SYSTEM_SUSPEND) ? + ktime_get_mono_fast_ns() : ktime_get()); do_div(time_ns, 100); return time_ns; }