From nobody Mon May 25 00:08:59 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8F4453BD25E; Wed, 20 May 2026 08:34:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779266058; cv=none; b=fWCKutu86pdHcyHVIPTd/YExgYKmmy8EcHMjU6c73Fid8nXY6tIl1uOYt+iEtKkruVQbIgPgCiB46bwgpmqywzOO1mhHJ2lMyidcy2iJ/reyVwN33raPXI2wcdb+oM01o7cnCga6gD2EU3Pky5dQ3Q/M+u5nxnwOre7alBW2saw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779266058; c=relaxed/simple; bh=n+Xbmiieqro7Vaa11vCCogrHeu+lh6vrjrOX+aEyrf8=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=KzjQFOzadtxCP3YF8bl7hrpZCYNTsQGPeJYwkB3MU+dRtsUWLoTpefXuLZxVfIpVwfXRPvKyVLL3HoMyhy6oCJXHstPDYnFA1MfFuYaD5MBiPkWJGQWY9qBPCeMMA3ltAMHaqS63DKO4VtJ6A6MmybtCUN24N5XrKbAjYzppjN4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=XC/9DhB5; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=GNB1lBkH; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="XC/9DhB5"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="GNB1lBkH" Date: Wed, 20 May 2026 08:34:13 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1779266055; 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=y8Xlb3S+IjbaZIllzSiDoiS0+uUopxC3i8r3s6PrPcI=; b=XC/9DhB5h4yCZwrJG//vsVKPvfLYTBw5x2DYzeP8+HiZRCOd3VVLinUWUGF81KpiuRMxBk HvjLRqHWDWxXecdy7iU4j76Mgic46tcPFUYmi2FXIoyPDTptklQPqMbH5WGk8O1b6CyA8E wljyGGgXKk8TQiDZ1bmZuOvzR3eDD2sG24ZmKyXgk9aLkWnOCFrbpvJsCRLszu063V+LN8 kI1uI/e14o1o3H+oaChy8gJW2KU4KN4NenRhViZxACAtn6cwOy+NI0MtzEvH8I/ivbTBOG aYxVlN1TRsato3kY/AQOrxnNBOn97HbTGkHNOk/EJAybBSzQJmGM+Y4AvZT2vg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1779266055; 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=y8Xlb3S+IjbaZIllzSiDoiS0+uUopxC3i8r3s6PrPcI=; b=GNB1lBkHYK5y9xjldSB2E0vTUN8jpbTA8+7ySTb9qulgGCgnxi9fDx4jDtHR1Fol69U/Qo vbhXbZUFeq83ueDg== From: "tip-bot2 for Yiyang Chen" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/core] sched/clock: Provide !HAVE_UNSTABLE_SCHED_CLOCK stub for sched_clock_stable() Cc: Yiyang Chen , "Peter Zijlstra (Intel)" , Steven Rostedt , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <56e45338858946cd9581b75c8bd45dd37dba52c5.1778773587.git.cyyzero16@gmail.com> References: <56e45338858946cd9581b75c8bd45dd37dba52c5.1778773587.git.cyyzero16@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <177926605379.711.1062009972352886121.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the sched/core branch of tip: Commit-ID: ea19506013ad13685573e4674fbeddb790e27906 Gitweb: https://git.kernel.org/tip/ea19506013ad13685573e4674fbeddb79= 0e27906 Author: Yiyang Chen AuthorDate: Fri, 15 May 2026 00:05:05 +08:00 Committer: Peter Zijlstra CommitterDate: Tue, 19 May 2026 12:17:35 +02:00 sched/clock: Provide !HAVE_UNSTABLE_SCHED_CLOCK stub for sched_clock_stable= () When CONFIG_HAVE_UNSTABLE_SCHED_CLOCK is disabled, sched_clock() is already assumed to provide stable semantics, but the public header doesn't provide a sched_clock_stable() stub for that case. Add a header stub that always returns true and clean up the duplicate local stub in ring_buffer.c, so callers can use sched_clock_stable() unconditionally. Signed-off-by: Yiyang Chen Signed-off-by: Peter Zijlstra (Intel) Acked-by: Steven Rostedt Link: https://patch.msgid.link/56e45338858946cd9581b75c8bd45dd37dba52c5.177= 8773587.git.cyyzero16@gmail.com --- include/linux/sched/clock.h | 5 +++++ kernel/trace/ring_buffer.c | 7 ------- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/include/linux/sched/clock.h b/include/linux/sched/clock.h index 196f0ca..39f0a7f 100644 --- a/include/linux/sched/clock.h +++ b/include/linux/sched/clock.h @@ -33,6 +33,11 @@ extern u64 sched_clock_cpu(int cpu); extern void sched_clock_init(void); =20 #ifndef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK +static inline int sched_clock_stable(void) +{ + return 1; +} + static inline void sched_clock_tick(void) { } diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index 5326924..02691c3 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c @@ -3769,13 +3769,6 @@ rb_add_time_stamp(struct ring_buffer_per_cpu *cpu_bu= ffer, return skip_time_extend(event); } =20 -#ifndef CONFIG_HAVE_UNSTABLE_SCHED_CLOCK -static inline bool sched_clock_stable(void) -{ - return true; -} -#endif - static void rb_check_timestamp(struct ring_buffer_per_cpu *cpu_buffer, struct rb_event_info *info)