From nobody Sun Feb 8 05:08:19 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CB99EC7EE24 for ; Mon, 5 Jun 2023 19:16:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235346AbjFETQY (ORCPT ); Mon, 5 Jun 2023 15:16:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235297AbjFETQT (ORCPT ); Mon, 5 Jun 2023 15:16:19 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2428DED; Mon, 5 Jun 2023 12:16:18 -0700 (PDT) Date: Mon, 05 Jun 2023 19:16:15 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1685992576; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Z2cLY1ozMTw4KDVSAVub6jpX7BafSFI8k9ZI7soaBJY=; b=DBWlsNUwZWkW4ynyACghcZ+XqiumyBWfzJQ75HnKPKMm2nvUkFX/XtlnPKaflxTAzMKwW7 s/hOcmorgJzdAYfkx7Gu4s+PpSJPivBRHJ5VTsPhbkH9MgP0FzFkgGd8FwbV2Ee3HxlVXc G+DDtMJsHlExoqdyP3uPntRuR/LBXM0twXP7Xu8lYD2sINb+mKTINYt1uXcG+mtWoJ4C9J gp+4b7syTjV4ktOFjJ/RMQpTD1X2B8alvrDKIOBc5hpJYGAaphf14wd3quMnEB6AG2dFw9 GmFYsGChPhDOrFWmCf7dj2qt/7+M9DiAkrEtyEw04ZKyn3TnQg7Qh1vxmuwXAQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1685992576; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Z2cLY1ozMTw4KDVSAVub6jpX7BafSFI8k9ZI7soaBJY=; b=e3Zl6FoYoF6kCrsYUNZgoIjdMEwU59aW8cCHyUMei4JhMwT0NHkkqrapofNIGE13nqD3Jf egGpLY/+R+e+ffDw== From: "tip-bot2 for Peter Zijlstra" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/core] cpuidle: Use local_clock_noinstr() Cc: "Peter Zijlstra (Intel)" , "Rafael J. Wysocki" , Michael Kelley , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230519102716.045980863@infradead.org> References: <20230519102716.045980863@infradead.org> MIME-Version: 1.0 Message-ID: <168599257519.404.12817417791147203587.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the sched/core branch of tip: Commit-ID: e6a15fa9ea8372ad4db973191233f743ae1081d5 Gitweb: https://git.kernel.org/tip/e6a15fa9ea8372ad4db973191233f743a= e1081d5 Author: Peter Zijlstra AuthorDate: Fri, 19 May 2023 12:21:11 +02:00 Committer: Peter Zijlstra CommitterDate: Mon, 05 Jun 2023 21:11:09 +02:00 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) Acked-by: Rafael J. Wysocki Tested-by: Michael Kelley # Hyper-V Link: https://lore.kernel.org/r/20230519102716.045980863@infradead.org --- drivers/cpuidle/cpuidle.c | 8 ++++---- drivers/cpuidle/poll_state.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c index 8e929f6..737a026 100644 --- a/drivers/cpuidle/cpuidle.c +++ b/drivers/cpuidle/cpuidle.c @@ -145,7 +145,7 @@ static noinstr void enter_s2idle_proper(struct cpuidle_= driver *drv, =20 instrumentation_begin(); =20 - time_start =3D ns_to_ktime(local_clock()); + time_start =3D ns_to_ktime(local_clock_noinstr()); =20 tick_freeze(); /* @@ -169,7 +169,7 @@ static noinstr void enter_s2idle_proper(struct cpuidle_= driver *drv, tick_unfreeze(); start_critical_timings(); =20 - time_end =3D ns_to_ktime(local_clock()); + time_end =3D ns_to_ktime(local_clock_noinstr()); =20 dev->states_usage[index].s2idle_time +=3D ktime_us_delta(time_end, time_s= tart); dev->states_usage[index].s2idle_usage++; @@ -243,7 +243,7 @@ noinstr int cpuidle_enter_state(struct cpuidle_device *= dev, sched_idle_set_state(target_state); =20 trace_cpu_idle(index, dev->cpu); - time_start =3D ns_to_ktime(local_clock()); + time_start =3D ns_to_ktime(local_clock_noinstr()); =20 stop_critical_timings(); if (!(target_state->flags & CPUIDLE_FLAG_RCU_IDLE)) { @@ -276,7 +276,7 @@ noinstr int cpuidle_enter_state(struct cpuidle_device *= dev, start_critical_timings(); =20 sched_clock_idle_wakeup_event(); - time_end =3D ns_to_ktime(local_clock()); + time_end =3D ns_to_ktime(local_clock_noinstr()); trace_cpu_idle(PWR_EVENT_EXIT, dev->cpu); =20 /* The cpu is no longer idle or about to enter idle. */ diff --git a/drivers/cpuidle/poll_state.c b/drivers/cpuidle/poll_state.c index bdcfeae..9b6d90a 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; =20 - time_start =3D local_clock(); + time_start =3D local_clock_noinstr(); =20 dev->poll_time_limit =3D false; =20 @@ -32,7 +32,7 @@ static int __cpuidle poll_idle(struct cpuidle_device *dev, continue; =20 loop_count =3D 0; - if (local_clock() - time_start > limit) { + if (local_clock_noinstr() - time_start > limit) { dev->poll_time_limit =3D true; break; }