Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1583429rbb; Mon, 26 Feb 2024 14:26:01 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX5IpTOWiZyQnJb/S2muN19Z4kEBL/uXdfEZmEmBF02At/vHnGXBvV0pV/FMYJPZCQ1U/N85CbsYhqsW30tkfHOQWAZhjYTfrXxAJgeaA== X-Google-Smtp-Source: AGHT+IHA03ClC9KTJajGJW97PLRLTOvPp7ZUnBGWQ6/AoVYewOFHB7B8cnPYdeweJ6YsIhWM0JV3 X-Received: by 2002:a17:906:f1c9:b0:a43:7653:6e5b with SMTP id gx9-20020a170906f1c900b00a4376536e5bmr2325955ejb.26.1708986361253; Mon, 26 Feb 2024 14:26:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708986361; cv=pass; d=google.com; s=arc-20160816; b=TwYt+zOcqw+AeTXvhxvznmi7RWZQJBafF64mEiS9QsmvmHQ3zRbhT/5uzW90UAXxEI rrOhjCutITrXRtDKeFIbY0BgdjHZagaOYNCK2Fmqm1N6ciDEYGEM1VG1R/CK3MCY9heZ tcKGXO4ncc4dsqF03tvWwOeONW99SS3wODmD6DwBAEnjftqTuKMYbXc9/Vguc0mlOf6I eUyK7K2swA2R9Ds0Gb4GF8sKQ9nS/vVdeh06YOIZVQnKrDeq+pMWCMNoDqxNsgRrXS3C bhXro5qZ84FvO6jVhQZ4A80UxdLfZHVt3jgR3+PsEvv6d7xiIGyPSQJnFJcaEpsSp40s TPxA== 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=ji6WYWcZaLndFA++YglzMqPjmvUsGA2azQ2LS4flAvo=; fh=9Ax9dUTktkw7GUAcxhp/hScrn1H6VeDItxi6qdujZxg=; b=oNLejy8B0m3VDhlsbP455e1DGAyfP1RsQfiNsoyaypt/s8kAYHWWeajTFRIpJAQFIT N6jCdmkcXQX1cWf+t7lOjOg/SjoZb/tfX2vkb5lJD5HWXiFsNlNkeDh4pblJX3mXCN0X uAaOqZQFUP5sfvVBpKBJ78l8octuYe6ORnn2FtU1SoLw0UGfcgclO5NZC457j5o2btic zElw/v6YrGCVESaxqWsPoTBsrnWtIZGQpo7jRXsB84KI9ROkaxEkWv671ovmK+fpSqv8 1HiEnuVVHASJRtbgSqBMxfAgIM/U56EzyhDWSfgPZrZQQFyw5FObg99FChNtZEW+mdPj ZKXA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=zHcapkex; 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-82394-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82394-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 f16-20020a170906139000b00a432aefb5cdsi135140ejc.684.2024.02.26.14.26.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 14:26:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-82394-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=zHcapkex; 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-82394-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82394-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 A6DCC1F24C46 for ; Mon, 26 Feb 2024 22:26:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C1174134CE1; Mon, 26 Feb 2024 22:24:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="zHcapkex"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="KsneVIhc" 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 5E9BC13398F; Mon, 26 Feb 2024 22:24:37 +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=1708986278; cv=none; b=oVD5oc57TrA8vqN1nxYtFlKx49dYnTm0U565leSibneGjD5gsQjS27pRfYCEulxIMZucVKBsrL2CrgIhxN4IpGkx1FKrfIlzZ0ipxsWkMOATsiVPj5ogVEBtzmD3DGGiBR1kZMfXQlM+5FbCcuWMGKRGLl83J1UtFGch1HIJ06k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708986278; c=relaxed/simple; bh=g/P8P0X+m6WFPSRX7M3TBbD2a36axlBRjg9JkTO/dzg=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=LbPz4EDMbFgYJFJKCv+zhMGYjxGC7uHE2QOovFXGH7qUlTpC4oCJX6iuO8NfriF0uFuLI+0E4fQoeOAdf+s1nbgxu5FSH0WHzBV7SWoEC1yIMMkS38aN4yL4JbBJJl+C9ZXeFi1GxCaZvBL7YriTorh1Yxn9E1FeceytpJWttmM= 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=zHcapkex; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=KsneVIhc; 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: Mon, 26 Feb 2024 22:24:34 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1708986275; 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=ji6WYWcZaLndFA++YglzMqPjmvUsGA2azQ2LS4flAvo=; b=zHcapkexf+mzMPspkGzPvALaddWY0ItCnKrAK93ZvKihFsjqGxGjzo5ph+pT7xAdhKo4E3 cPKctWuVQhljsgNEyBgMWqXPC7+idZ45/aKc+4u0d6D9Nrr3RY7gmIYBUKRBGKY3Ik55hN AQxYmc0XpomzZzRwDXPF1/+EqUJ3yTnBCKSEfLsagCLBG8LYM7sIJpVhN5BqV3RyOXemZr eVgddStFbV4muYp6FVTXNdWKAOZss/K1czJCf9eGA7Y0wdFHanXAcgvKb4wa+5zJq3WEae DFV65VngKfJIDTt+oAUhp8lF4FthyywxsZUzl/81VVKOxAxEaAi9IWFVDer9pg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708986275; 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=ji6WYWcZaLndFA++YglzMqPjmvUsGA2azQ2LS4flAvo=; b=KsneVIhcJLYQ033tPYd0v8y5IftbDhazeB9I3upX3PBbPIps1ZOKNL+scRkMjA69ADbFDj UjRtI8CKqLeb+4BQ== From: "tip-bot2 for Frederic Weisbecker" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/core] tick: Move tick cancellation up to CPUHP_AP_TICK_DYING Cc: Frederic Weisbecker , Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240225225508.11587-9-frederic@kernel.org> References: <20240225225508.11587-9-frederic@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <170898627487.398.4565777561745395590.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: f04e51220ad5cf35540f67f3ca15c8617c1f0bef Gitweb: https://git.kernel.org/tip/f04e51220ad5cf35540f67f3ca15c8617c1f0bef Author: Frederic Weisbecker AuthorDate: Sun, 25 Feb 2024 23:55:00 +01:00 Committer: Thomas Gleixner CommitterDate: Mon, 26 Feb 2024 11:37:31 +01:00 tick: Move tick cancellation up to CPUHP_AP_TICK_DYING The tick hrtimer is cancelled right before hrtimers are migrated. This is done from the hrtimer subsystem even though it shouldn't know about its actual users. Move instead the tick hrtimer cancellation to the relevant CPU hotplug state that aims at centralizing high level tick shutdown operations so that the related flow is easy to follow. Signed-off-by: Frederic Weisbecker Signed-off-by: Thomas Gleixner Reviewed-by: Thomas Gleixner Link: https://lore.kernel.org/r/20240225225508.11587-9-frederic@kernel.org --- kernel/time/hrtimer.c | 2 -- kernel/time/tick-common.c | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c index 95f1f35..3e95474 100644 --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c @@ -2229,8 +2229,6 @@ int hrtimers_cpu_dying(unsigned int dying_cpu) int i, ncpu = cpumask_any_and(cpu_active_mask, housekeeping_cpumask(HK_TYPE_TIMER)); struct hrtimer_cpu_base *old_base, *new_base; - tick_cancel_sched_timer(dying_cpu); - old_base = this_cpu_ptr(&hrtimer_bases); new_base = &per_cpu(hrtimer_bases, ncpu); diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c index a89ef45..b4af8c7 100644 --- a/kernel/time/tick-common.c +++ b/kernel/time/tick-common.c @@ -410,6 +410,8 @@ int tick_cpu_dying(unsigned int dying_cpu) if (tick_do_timer_cpu == dying_cpu) tick_do_timer_cpu = cpumask_first(cpu_online_mask); + tick_cancel_sched_timer(dying_cpu); + return 0; }