Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp479831rdb; Thu, 22 Feb 2024 09:23:27 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVSJxrzw3IIZjBi0ptj0/DpkKuLBYICGsaKXhI8xJ2r7DzLkhA1MyUdVAKW025JEKBIlO5jDyeTtG/Wrwf7RCqMP4TT/mp5bhr3r05aLw== X-Google-Smtp-Source: AGHT+IHc4dEwmG9iusikc92dHWxa1E8iWJOzWerseXYTyvX/yroNq32+F56djmWVQENzMyvxVObO X-Received: by 2002:a17:906:398c:b0:a3e:b3e4:31e2 with SMTP id h12-20020a170906398c00b00a3eb3e431e2mr8332376eje.73.1708622607149; Thu, 22 Feb 2024 09:23:27 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708622607; cv=pass; d=google.com; s=arc-20160816; b=s2p8me88+YQh2KITGbGmWl/JkfbqGCpzWD/d7Jo9nErqu+bRbMx7uQ2M1N/uwDFf0e q8XtcZ04zGGGmWx2pjytKQO+oyJ74eZapIQKC0UlY1ipe9mdwazjmiWhXQWEtnyUphOy AgiYQkOELeAfTPEDPKxj6+7sBWy/pudOJwBxmW3cXoCOUlhUWw8NKVQrSRhNq/8EGPC9 GXw2ZOleIehM/i2taIpUTyfQu/rTyNFZZCJt8xE58nuAG/YoMrObKRYadxUtknwPST0v a37BbYrH7PVy57kkmv5j0bWClEB5a3b2Gjb0rHa+JR9eaZqyQNPOxYXI4stWq0un9iG4 lulg== 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=IjN4cSx6w81HhPEeACaKGE2eN4w6oIBmUtX+lza1qPE=; fh=IdquJyaazQ3wXWxdOExnpctJRLX4Jw3HEb/tnyKonzY=; b=TjBpqPU34Qm8NfwbsLBPjsjdHNsMOmLO1U91KVD8H0eo4FsAUgWRbLwRLQSyCGXKWy fp6BXWORHEODrRqc5zK8+Wens5l70ZdT3g0of4dUguvYCPAx1O43FUgEJmDfdLfENQaZ nk580pKgJCEMLMhOn38qDak3gnjOKBrumpmPY7LU4HfrQLmBB6Y7YAHuvICIcgbjSF3r BUFsVyKO4xgbj6+P2rCt7wKgTV9GI4CkYcNg9NcTn9LXt8T684dn98+a3LJ9DqVWDKn0 bFUorDDe6bNQZLp8Ht9FHcYZaiKTn85o/xXeT8XLfnW12mlDv0GxNgzq0LuKJ66kIMcU j+lw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="IhR/W+a4"; 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-76951-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76951-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id gh21-20020a170906e09500b00a3f4768a8c8si1520781ejb.561.2024.02.22.09.23.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 09:23:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-76951-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="IhR/W+a4"; 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-76951-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-76951-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 2B69E1F2AE99 for ; Thu, 22 Feb 2024 17:15:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C3FA415AAC9; 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="IhR/W+a4"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="cAAATO3m" 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 E05D115956A; Thu, 22 Feb 2024 17:12:19 +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=aiMmHsQ7LsWwMzVC++1KwHpXcCwyR46/UXk3PUOjcAfdShzIKmRjoVwh9ymmjOSIldYh0nHHaIdYyiaW+wdl1KO1uRV78046WYgZECcHfcC2QPKdmb/zi+uYUa2H028OMsf0W6+ZXxK4aajDxUcIpIiE0r6DsWyjkRbO6Ad7KHQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708621941; c=relaxed/simple; bh=BFK93q7x8VcvAeQitpb7x4GJH07K8Y6wwibPvJMxf0M=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=q3+LCLueoYtYc4KYTewSoA/hi6R8305EuO6nNlWV2NHUQ/EsqgaeYx1cAE24goMErq+NmWjtVgH4GIXAjVv+9kZwE0i39KwomBvwyI/1bphumCdkmkLkRXe5doeJKnwx8P0fRBFXxYHDT6SLTX4fgbEgL13n5ME5Cerecfze3hU= 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=IhR/W+a4; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=cAAATO3m; 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:17 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1708621938; 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=IjN4cSx6w81HhPEeACaKGE2eN4w6oIBmUtX+lza1qPE=; b=IhR/W+a430F6AcA9g+m9V0ga75c/0k3qIxp0jD7wBVQR3tOHFJ+XdaqW3UB4i0+jDNddDu 8QBBW2qGQ/11DztBu2c8om1iCYrysyayCeWFqd/F58f5DGNcwc5EVkZG57au2zDPR9iNsG LT622Ujo2AkVG65B+e+WIUvA2JV3FOmXNLZrMKKke7aAj+qPCVH7aXTcEBFb1vb1MMQhas H8q+RhpVz3oBeHVoT6NagwVj0gl+3bQvs67nOrN29KkvrDo+rK+CpQaDTBzNQ5a7Ebn/e3 a2JBcz0pIknjNg8Fc+77Gb9jO/G7cbZ+VGNdLYWRSWJPZ4GHefM1i9td9K8SkQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708621938; 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=IjN4cSx6w81HhPEeACaKGE2eN4w6oIBmUtX+lza1qPE=; b=cAAATO3mGTixw0BcZCH5JJ/Bamred5+rDEhfJqytyJ98/iuheY2fQ4vPuTtsiSEJFQyI2S gzFW+TD0+8ESLgBQ== 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: Restructure 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-2-anna-maria@linutronix.de> References: <20240221090548.36600-2-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: <170862193726.398.15267422855712611141.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: bebed6649e85fe55275bd20104ec8e0bdff1bf54 Gitweb: https://git.kernel.org/tip/bebed6649e85fe55275bd20104ec8e0bdff1bf54 Author: Anna-Maria Behnsen AuthorDate: Wed, 21 Feb 2024 10:05:29 +01:00 Committer: Thomas Gleixner CommitterDate: Thu, 22 Feb 2024 17:52:30 +01:00 timers: Restructure get_next_timer_interrupt() get_next_timer_interrupt() contains two parts for the next timer interrupt calculation. Those two parts are separated by forwarding the base clock. But the second part does not depend on the forwarded base clock. Therefore restructure get_next_timer_interrupt() to keep things together which belong together. 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-2-anna-maria@linutronix.de --- kernel/time/timer.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/kernel/time/timer.c b/kernel/time/timer.c index d44dba1..316ded6 100644 --- a/kernel/time/timer.c +++ b/kernel/time/timer.c @@ -1982,12 +1982,6 @@ u64 get_next_timer_interrupt(unsigned long basej, u64 basem) if (base->next_expiry_recalc) next_expiry_recalc(base); - /* - * We have a fresh next event. Check whether we can forward the - * base. - */ - __forward_timer_base(base, basej); - if (base->timers_pending) { nextevt = base->next_expiry; @@ -2006,6 +2000,12 @@ u64 get_next_timer_interrupt(unsigned long basej, u64 basem) } /* + * We have a fresh next event. Check whether we can forward the + * base. + */ + __forward_timer_base(base, basej); + + /* * Base is idle if the next event is more than a tick away. * * If the base is marked idle then any timer add operation must forward