Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp482771rdb; Thu, 22 Feb 2024 09:28:54 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWsXQJ7heKcw/rBYJ08s59Tcum1AkSZu+0YcBeZ75iFZn9g2u/z7PWRcDq93+dojuC58Ulkw9h5Y5NKZBtHYVkogbjjcP3+/69Hu+1F4w== X-Google-Smtp-Source: AGHT+IExvyZdizwMS000WDyyIGSdDpPqZ6BBWzMhU9iYypcBPNIS5JBgT9oS0Jz5jOxDvQf2bLRv X-Received: by 2002:a05:6359:4589:b0:17b:5df3:98fd with SMTP id no9-20020a056359458900b0017b5df398fdmr5109854rwb.25.1708622934477; Thu, 22 Feb 2024 09:28:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708622934; cv=pass; d=google.com; s=arc-20160816; b=I54I+aqaxCb2by2QSuQYeIPB3KpnDp+erFBceoC1Qgs7HHjXYBpkyNZfx9NwJSrHQf K9SkNeDto4lcJjExn4szNriy8K6FZQmFuzCRPx5hLJ1a6thOfx38eUUzmiO8n4XDy03o 4JnC3tInW8Aabxi2VGHQBqpV0IgK44+Ett67Z/WI7+IFddDex6Rk70Zc34WTzofkzmZX LBKLQyj8obiruZkLDeUwQ37aiWbPmOujSBscerGEkK/UG+F/qNnFWe3CtJNHPlPgUMMT PjhtNmsLY6ofJZdxbJeUJApl0fgmt8fG8ZkTWXXnWnqeOkA3Xg4NB9ZzVTI3NRREXkHr VgRw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:in-reply-to:cc:subject:to:reply-to:sender :from:dkim-signature:dkim-signature:date; bh=qVBV2k4IF6uEYwFoMSee/IXm9EY81Z+l9OeRL9GrjE8=; fh=IdquJyaazQ3wXWxdOExnpctJRLX4Jw3HEb/tnyKonzY=; b=C3TdtIjAzmWCvB6GUGlCMnR4CXLACeutT/KhtbX4/0qQI8IczHhvE6m9P7E/stNnHP UXgQz2DchPN5XEBEsDlwdx080GC9+uPhMV5vTbOtz+TLQE5Ls30JtCESlPF8QKC51mHf mDLsrtTRx5lFWQMmg8jjN9wRy6ErPP5ixtgSoJ5ThP0BUgJc4OaGz0A8a6dJ6tzcNJL1 Sp/x7cT3vpZu5suUMskxer25e49kgnoFlLB6evPk1alUN9LVOkzkBQljey2iYRPv1F8x Hiz9K9rBEMgdPxdzrs5J6/r5Wmyh7CiijlIKgwbCJebrN1iVoZtIxqEWYVF5WDR7fabU 6o+g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=HJ8zyjHj; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-76949-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76949-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id k6-20020a635a46000000b005c69365abc9si10660619pgm.687.2024.02.22.09.28.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 09:28:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-76949-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=HJ8zyjHj; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-76949-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76949-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 7555FB285C8 for ; Thu, 22 Feb 2024 17:15:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3681B15AAA9; Thu, 22 Feb 2024 17:12:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="HJ8zyjHj"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="fLrk6WXe" 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 CAB8B158D84; Thu, 22 Feb 2024 17:12:18 +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=1708621941; cv=none; b=jB+aXeLbmuyJZMtKBTVMkoWTfyLAuzRMVs1PeahhDC6JqKuWKazRQNPtof+5y2o73pv6wLRgaWBn6SZRIewBsYDT5R7TYl1V3r7JOdGeiaJvtpCfG7VoDnkDK5ZOBV4EnCH60AHwZuRx/cEL7ncLy/5p3dO0JvZPuPXLepD30no= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708621941; c=relaxed/simple; bh=mV2PrR4Usm2PIu4+ErGt4TihHQsC5QqH+o32tIYElZw=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=DdeLPUY2yOJ4JcRjYDN5NBX5CBiPKMP2TXfk7MDy8/Fy7eyjXXoZUzqD16434Ztyp2ygzCRxKTbsf5/QjyWXpC0Sb9/QlXdV36h64FIo+Y5xFeLX84rK5f5zLn6/zFjOP7FSBanEL10Qdu+MUWVYQGvktV8C0AVlihxXDi6SZL4= 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=HJ8zyjHj; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=fLrk6WXe; 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 Date: Thu, 22 Feb 2024 17:12:16 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1708621937; 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=qVBV2k4IF6uEYwFoMSee/IXm9EY81Z+l9OeRL9GrjE8=; b=HJ8zyjHj+lt/48Lmzfyg8BSxVwq9eA4DXhU2MSrOdzqYyfBRObzHJXmki9dStklWpHh17k +mUzytK8obbhjREkJNnNJbvmAtTb4sO6MvPeqJ0GN8JDNTOWTeaKoX6btmGj0pXExeWjeg reOYbg8piXWUB4BKvd0Ivj8x/ZppXW2ftHpnNf+n94VmOy3dzIlV/n68kKzPzCRy4EjAf0 U2aild7Mz3wpD4f1TGMwe7lVtP8oH9Cl20ns6u3PGInEHbOuD8acZs4tqnFJU2GhIAfsK2 iTThCkdirSQfDOmGr/Olju3YVpiWYYd0cVvzOtKWTlzQT6rZzpJogVleyd3quA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708621937; 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=qVBV2k4IF6uEYwFoMSee/IXm9EY81Z+l9OeRL9GrjE8=; b=fLrk6WXeASLDRnyP3X1WKIRPXTgQSRCFR4Flt9hY9h+pewZbVLA/9kH7jF968CEFWw7BSX 9AMY+gO/5J8IVAAg== From: "tip-bot2 for Anna-Maria Behnsen" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/core] timers: Split out get next timer interrupt Cc: "Anna-Maria Behnsen" , Thomas Gleixner , Frederic Weisbecker , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240221090548.36600-3-anna-maria@linutronix.de> References: <20240221090548.36600-3-anna-maria@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <170862193662.398.10028344831805251766.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: 7bit The following commit has been merged into the timers/core branch of tip: Commit-ID: 39ed699fb660c65cef4759c041763c75e0948425 Gitweb: https://git.kernel.org/tip/39ed699fb660c65cef4759c041763c75e0948425 Author: Anna-Maria Behnsen AuthorDate: Wed, 21 Feb 2024 10:05:30 +01:00 Committer: Thomas Gleixner CommitterDate: Thu, 22 Feb 2024 17:52:30 +01:00 timers: Split out get next timer interrupt Split out get_next_timer_interrupt() to be able to extend it and make it reusable for other call sites. No functional change. Signed-off-by: Anna-Maria Behnsen Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20240221090548.36600-3-anna-maria@linutronix.de --- kernel/time/timer.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/kernel/time/timer.c b/kernel/time/timer.c index 316ded6..9f0cdba 100644 --- a/kernel/time/timer.c +++ b/kernel/time/timer.c @@ -1956,15 +1956,7 @@ static u64 cmp_next_hrtimer_event(u64 basem, u64 expires) return DIV_ROUND_UP_ULL(nextevt, TICK_NSEC) * TICK_NSEC; } -/** - * get_next_timer_interrupt - return the time (clock mono) of the next timer - * @basej: base time jiffies - * @basem: base time clock monotonic - * - * Returns the tick aligned clock monotonic time of the next pending - * timer or KTIME_MAX if no timer is pending. - */ -u64 get_next_timer_interrupt(unsigned long basej, u64 basem) +static inline u64 __get_next_timer_interrupt(unsigned long basej, u64 basem) { struct timer_base *base = this_cpu_ptr(&timer_bases[BASE_STD]); unsigned long nextevt = basej + NEXT_TIMER_MAX_DELTA; @@ -2024,6 +2016,19 @@ u64 get_next_timer_interrupt(unsigned long basej, u64 basem) } /** + * get_next_timer_interrupt() - return the time (clock mono) of the next timer + * @basej: base time jiffies + * @basem: base time clock monotonic + * + * Returns the tick aligned clock monotonic time of the next pending + * timer or KTIME_MAX if no timer is pending. + */ +u64 get_next_timer_interrupt(unsigned long basej, u64 basem) +{ + return __get_next_timer_interrupt(basej, basem); +} + +/** * timer_clear_idle - Clear the idle state of the timer base * * Called with interrupts disabled