@@ -269,6 +269,17 @@ acpi_status acpi_hw_legacy_wake_prep(u8
return_ACPI_STATUS(status);
}
+static const ktime_t time10ms = { .tv64 = 10 * NSEC_PER_MSEC };
+
+static enum hrtimer_restart acpi_hw_legacy_tmr(struct hrtimer *tmr)
+{
+ hrtimer_forward_now(tmr, time10ms);
+
+ return HRTIMER_RESTART;
+}
+
+
+
/*******************************************************************************
*
* FUNCTION: acpi_hw_legacy_wake
@@ -284,6 +295,7 @@ acpi_status acpi_hw_legacy_wake_prep(u8
acpi_status acpi_hw_legacy_wake(u8 sleep_state)
{
+ struct hrtimer timer;
acpi_status status;
ACPI_FUNCTION_TRACE(hw_legacy_wake);
@@ -311,12 +323,18 @@ acpi_status acpi_hw_legacy_wake(u8 sleep
return_ACPI_STATUS(status);
}
+ hrtimer_init_on_stack(&timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
+ timer.function = acpi_hw_legacy_tmr;
+ hrtimer_start(&timer, time10ms, HRTIMER_MODE_REL);
+
/*
* Now we can execute _WAK, etc. Some machines require that the GPEs
* are enabled before the wake methods are executed.
*/
acpi_hw_execute_sleep_method(METHOD_PATHNAME__WAK, sleep_state);
+ hrtimer_cancel(&timer);
+
/*
* Some BIOS code assumes that WAK_STS will be cleared on resume
* and use it to determine whether the system is rebooting or