summaryrefslogtreecommitdiff
path: root/drivers/cpuidle/poll_state.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2023-05-19 13:21:11 +0300
committerPeter Zijlstra <peterz@infradead.org>2023-06-05 22:11:09 +0300
commite6a15fa9ea8372ad4db973191233f743ae1081d5 (patch)
tree164eb72493c6e2f23b7cb2ef24aedbb97849988f /drivers/cpuidle/poll_state.c
parentfb7d4948c4da2dbd26da4b7ec76bbd2f19ff862a (diff)
downloadlinux-e6a15fa9ea8372ad4db973191233f743ae1081d5.tar.xz
cpuidle: Use local_clock_noinstr()
With the introduction of local_clock_noinstr(), local_clock() itself is no longer marked noinstr, use the correct function. Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Rafael J. Wysocki <rafael@kernel.org> Tested-by: Michael Kelley <mikelley@microsoft.com> # Hyper-V Link: https://lore.kernel.org/r/20230519102716.045980863@infradead.org
Diffstat (limited to 'drivers/cpuidle/poll_state.c')
-rw-r--r--drivers/cpuidle/poll_state.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/cpuidle/poll_state.c b/drivers/cpuidle/poll_state.c
index bdcfeaecd228..9b6d90a72601 100644
--- a/drivers/cpuidle/poll_state.c
+++ b/drivers/cpuidle/poll_state.c
@@ -15,7 +15,7 @@ static int __cpuidle poll_idle(struct cpuidle_device *dev,
{
u64 time_start;
- time_start = local_clock();
+ time_start = local_clock_noinstr();
dev->poll_time_limit = false;
@@ -32,7 +32,7 @@ static int __cpuidle poll_idle(struct cpuidle_device *dev,
continue;
loop_count = 0;
- if (local_clock() - time_start > limit) {
+ if (local_clock_noinstr() - time_start > limit) {
dev->poll_time_limit = true;
break;
}