summaryrefslogtreecommitdiff
path: root/common/x86_power.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/x86_power.c')
-rw-r--r--common/x86_power.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/common/x86_power.c b/common/x86_power.c
index 4d9f5bbcfe..1a31749cd2 100644
--- a/common/x86_power.c
+++ b/common/x86_power.c
@@ -446,8 +446,12 @@ void x86_power_task(void)
system_hibernate(0, 0);
}
else {
+ uint64_t wait = target_time - time_now;
+ if (wait > TASK_MAX_WAIT_US)
+ wait = TASK_MAX_WAIT_US;
+
/* Wait for a message */
- task_wait_event(target_time - time_now);
+ task_wait_event(wait);
}
}