Received: by 2002:a05:7412:d024:b0:f9:90c9:de9f with SMTP id bd36csp127985rdb; Wed, 20 Dec 2023 08:00:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IEx1ePvxOOwX2jKbU6fs6f/rOdf6Ro6Mv0wva1NogtAC6GIOkpVruIii1v1t2lVSVf+9oHB X-Received: by 2002:a17:902:e5cc:b0:1d3:aaec:e91 with SMTP id u12-20020a170902e5cc00b001d3aaec0e91mr4735037plf.56.1703088045890; Wed, 20 Dec 2023 08:00:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703088045; cv=none; d=google.com; s=arc-20160816; b=fgvQL4b8NNdF6AFRmcv0mKWaYrQ4mnk5xcBnaZPEAs0FfcFop9MteN+C6z8rVTVUFq afYJF32pxjspn8DKfGbODMl3/p9qVF+6nFtoeRUsFbYnvuF9K/xlXR5qOgUlO3hm25KM 6SIjNrox0AQvJ+BtgzcoNwkcCU4OZ6pQ9DsVNKr8tzb+3W0Txt5SBQBjUQQAIVEuDToH SWEDUrI0iywRvcOmgBlIKvsig86HrvCng/KO0DOlaIzBV5SWXBh3zhyt7xfOxRYmMb4U GbvlGeuP9sw5k/zpCB8vAH4MFJ+JscDMC5do7Eab76OMuLk7VsgB2RE3WLi8zrbFgxXG iEIQ== ARC-Message-Signature: i=1; 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=o7xjpCVJjkT15ERbs8ASkY/KG3iwQ75AwhuRfp2uHko=; fh=IdquJyaazQ3wXWxdOExnpctJRLX4Jw3HEb/tnyKonzY=; b=cf0gdIpqbN3B7R/gRDf0KgcxpjkcuN19LXS+I2Htq+kmHdyoiCCa/WvAyMfP28xUNO 53tqEfPRQHOs654a4Ge7cqnb+R7LSi5v58T4yr0PNNN9Fw9Bu2fUccxuoeVPNu8M9Qmv CUPjqOFos1D+AJJf3JR65NmKRXbDNHgKEIaKni9+zOOVvareF4Ma8Ox6OkfNajsxhJWN Vfikb/Ds3ojvkI2oyrlalqZrZtSqAS1zadyHCQFc8D/JzcI0r0jQP/777lmJFk8zjgYa v7zZ026yR7HTuDpem9Yl2mnm1IXwC4ZVZ6Mnc2xARkN/cltbc+RG1Fy/mBbxVzN8CYAT 9CNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Ki3n8obl; dkim=neutral (no key) header.i=@linutronix.de header.b="gsh87/vq"; spf=pass (google.com: domain of linux-kernel+bounces-7227-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7227-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d4-20020a170902b70400b001d0ced77a90si21681842pls.510.2023.12.20.08.00.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 08:00:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-7227-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Ki3n8obl; dkim=neutral (no key) header.i=@linutronix.de header.b="gsh87/vq"; spf=pass (google.com: domain of linux-kernel+bounces-7227-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7227-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 876DF281754 for ; Wed, 20 Dec 2023 16:00:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1B59347A7E; Wed, 20 Dec 2023 15:59:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Ki3n8obl"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="gsh87/vq" X-Original-To: linux-kernel@vger.kernel.org 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 045204778A; Wed, 20 Dec 2023 15:59:08 +0000 (UTC) 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: Wed, 20 Dec 2023 15:59:06 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1703087947; 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=o7xjpCVJjkT15ERbs8ASkY/KG3iwQ75AwhuRfp2uHko=; b=Ki3n8oblgJjMWq+zAyVMwqvcXriNkJzTfAKUgwe6ccE83xm5ReHVhyeOEfuEk3Vrd7W2wP mg/ZkyFXVnuFwGI6dvShdnafOUT6z33Kl9rzpr2h1Jb2llwcek5g9jEirhNcuSjKgYZxQp ncY5pX0TK/ECOZ61YQ7/PaJAycVGGcf3cJUwrHLzPkTbd9q9Kybbnj60uhaYKHh6CnDnoE 7tnrFSfpQRu0pnWb8CYl2D7Aor4kDxZbCs0DtReBI0KC4tYzLQFrfb39rTQZsrokEEh+wn q2iL2GZ5zMnpuorQnAycYGh1ogeEa3dVJFtJDTj8TLnquPJo2SfkrxcXqiqSAA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1703087947; 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=o7xjpCVJjkT15ERbs8ASkY/KG3iwQ75AwhuRfp2uHko=; b=gsh87/vq/OVT8aC5TCUnqvwg4zvoPZYrNGRy82HXSvwJB0M2uIAdA1tg63JpOyqXTH3FdP UDjzAkHNphYIFpAQ== 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: Use already existing function for forwarding timer base Cc: "Anna-Maria Behnsen" , Thomas Gleixner , Frederic Weisbecker , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20231201092654.34614-11-anna-maria@linutronix.de> References: <20231201092654.34614-11-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: <170308794650.398.12509210482975186136.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: 7a39a5080ef0e3cf233d92165f6a778f08a08244 Gitweb: https://git.kernel.org/tip/7a39a5080ef0e3cf233d92165f6a778f08a08244 Author: Anna-Maria Behnsen AuthorDate: Fri, 01 Dec 2023 10:26:32 +01:00 Committer: Thomas Gleixner CommitterDate: Wed, 20 Dec 2023 16:49:38 +01:00 timers: Use already existing function for forwarding timer base There is an already existing function for forwarding the timer base. Forwarding the timer base is implemented directly in get_next_timer_interrupt() as well. Remove the code duplication and invoke __forward_timer_base() instead. Signed-off-by: Anna-Maria Behnsen Signed-off-by: Thomas Gleixner Reviewed-by: Frederic Weisbecker Link: https://lore.kernel.org/r/20231201092654.34614-11-anna-maria@linutronix.de --- kernel/time/timer.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/kernel/time/timer.c b/kernel/time/timer.c index 5b02e16..1a73d39 100644 --- a/kernel/time/timer.c +++ b/kernel/time/timer.c @@ -1939,15 +1939,9 @@ u64 get_next_timer_interrupt(unsigned long basej, u64 basem) /* * We have a fresh next event. Check whether we can forward the - * base. We can only do that when @basej is past base->clk - * otherwise we might rewind base->clk. + * base. */ - if (time_after(basej, base->clk)) { - if (time_after(nextevt, basej)) - base->clk = basej; - else if (time_after(nextevt, base->clk)) - base->clk = nextevt; - } + __forward_timer_base(base, basej); if (time_before_eq(nextevt, basej)) { expires = basem;