From nobody Thu Sep 03 16:36:40 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4hbQGc5tDMz6rVjY for ; Thu, 03 Sep 2026 16:36:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hbQGc2hb3z3FHT for ; Thu, 03 Sep 2026 16:36:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1788453400; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VDfSggdEfMxY4qw+gXidglGMjmy/ypH0IWEOmRwgGJE=; b=Km8Mzq4NhW7nEQ9V63ZcNqz+5q7iYNykPpLfSkeuKi81mlCsa6oxx2zFjbqtz9D8FVSASB U+TbrX8GHRPy54HlWZyHoHFWIMCagxirZsCvqNoM1mVWF3r/FhBxruaaoTKwkLqQFlXrpZ wNUy9bNXV1hC0WlPfBdISV3RN8LXsziRQPmy0zwGD/fKke8a3CeP2+C8s6de7ldGrcRmgF /aYHjNFyKJGTCmNYJkCBFhmr+rK2MSL1PNLfWp/W3Hre3YB/OZfXI/c/PeD1zBCFTKYlvV KvEFDWFAmmgoyLr16X+7+8G+9RhmKCsq4B3QLJf2FPdpqrqEZtAjxZpkj+FMjg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1788453400; a=rsa-sha256; cv=none; b=fKZlJiyN8PsU0BWE72wlRBmPuSVc4g/bdBF9azwsxzUudc1Le4H05IxrZVRo3aI/leyavu ZcIC/gLZ+Lz0d2ifNh5iwF+c4ndPSW5Gs7ON5jSNlTnS8r/MEHl3vL0S8wA2XbAufOBvZG slEFpbAlcvtWm31i/fWStdMQCPHnMEMTo5Z6KIs7zLAgPEuG0ibCVDsEcpqmbKW29pmpYi 4VSS1E9v7rEZThIHMH8qmWhRmg+4BPAAb8II6Hs03rI4Bvk8Ew72fYrAJOIYUHVttWHF4D 8GqmDjYMelUnTgZuA0CDpZ+rs9/iLIVEDn9xZR3tJpWNX/YVfDRBK+rYaM/nmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1788453400; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VDfSggdEfMxY4qw+gXidglGMjmy/ypH0IWEOmRwgGJE=; b=w3QIqQ+K1Gkbzi9t5Ww6GFp6ybCe4el87Q3WU9hqzUBgOUjq8LmI4l8fZ+e5lxS1kB4fLO HZH4TrbiBO0ZdM74IAu4kB0mbhNP4PVsvm5jPBZHIMYmF+RdI8mtyxCzed4JwOpcLqnPIa RW7oGs6mA5kZ0qSORX46zHgzvbKtlb7HukjO9dWKQLfMERQZnV6yjRUaormvnQB9mAzYu2 H6CVplZXr344hTMl70W3oJwBQWaqbuZr4YJIN+fzfTZoX4+hRzDtwhXzwbsAUczL/C5Dje yqjd2C/T4ha+hvUxCbYKQuCQWdHdgog+R39+88h4GtQVKDUEw3z2TIhcaDSHRw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hbQGc0Pbpz5xG for ; Thu, 03 Sep 2026 16:36:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a800 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 03 Sep 2026 16:36:40 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Mitchell Horne Subject: git: ce2e423045c2 - stable/15 - smp: remove unused hlt_cpus_mask List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: ce2e423045c228d75aa4ff2f26215e63d5371316 Auto-Submitted: auto-generated Date: Thu, 03 Sep 2026 16:36:40 +0000 Message-Id: <6a99a218.3a800.549ab898@gitrepo.freebsd.org> The branch stable/15 has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=ce2e423045c228d75aa4ff2f26215e63d5371316 commit ce2e423045c228d75aa4ff2f26215e63d5371316 Author: Mitchell Horne AuthorDate: 2026-07-13 19:15:19 +0000 Commit: Mitchell Horne CommitDate: 2026-09-03 16:32:36 +0000 smp: remove unused hlt_cpus_mask It is a relic, apparently once populated by a machdep.hlt_cpus sysctl. The sysctl was removed, and ULE has never honored this mask. It is now safe to remove. Remove the mask, and its few remaining references in: sched_4bsd(4), hwpmc(4), and hwt(4). Reviewed by: olce, kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D58158 (cherry picked from commit df0aca0d73064a1a199dbae3857012951f96cf2d) --- sys/dev/hwt/hwt_ioctl.c | 5 ----- sys/dev/hwt/hwt_vm.c | 6 ------ sys/kern/kern_pmc.c | 3 +-- sys/kern/sched_4bsd.c | 17 ----------------- sys/kern/subr_smp.c | 1 - sys/sys/smp.h | 1 - 6 files changed, 1 insertion(+), 32 deletions(-) diff --git a/sys/dev/hwt/hwt_ioctl.c b/sys/dev/hwt/hwt_ioctl.c index 184c7e72f986..7d76a3feee55 100644 --- a/sys/dev/hwt/hwt_ioctl.c +++ b/sys/dev/hwt/hwt_ioctl.c @@ -304,11 +304,6 @@ hwt_ioctl_alloc_mode_cpu(struct thread *td, struct hwt_owner *ho, return (error); CPU_FOREACH_ISSET(cpu_id, &cpu_map) { -#ifdef SMP - /* Ensure CPU is not halted. */ - if (CPU_ISSET(cpu_id, &hlt_cpus_mask)) - return (ENXIO); -#endif #if 0 /* TODO: Check if the owner have this cpu configured already. */ ctx = hwt_owner_lookup_ctx_by_cpu(ho, halloc->cpu); diff --git a/sys/dev/hwt/hwt_vm.c b/sys/dev/hwt/hwt_vm.c index 6c55e218dcec..b8aa8358f437 100644 --- a/sys/dev/hwt/hwt_vm.c +++ b/sys/dev/hwt/hwt_vm.c @@ -213,12 +213,6 @@ hwt_vm_start_cpu_mode(struct hwt_context *ctx) CPU_ZERO(&enable_cpus); CPU_FOREACH_ISSET(cpu_id, &ctx->cpu_map) { -#ifdef SMP - /* Ensure CPU is not halted. */ - if (CPU_ISSET(cpu_id, &hlt_cpus_mask)) - continue; -#endif - hwt_backend_configure(ctx, cpu_id, cpu_id); CPU_SET(cpu_id, &enable_cpus); diff --git a/sys/kern/kern_pmc.c b/sys/kern/kern_pmc.c index 15afe1a46d07..90ce8c6a17c1 100644 --- a/sys/kern/kern_pmc.c +++ b/sys/kern/kern_pmc.c @@ -152,8 +152,7 @@ int pmc_cpu_is_active(int cpu) { #ifdef SMP - return (pmc_cpu_is_present(cpu) && - !CPU_ISSET(cpu, &hlt_cpus_mask)); + return (pmc_cpu_is_present(cpu)); #else return (1); #endif diff --git a/sys/kern/sched_4bsd.c b/sys/kern/sched_4bsd.c index a47fe3ce72c3..043a4d291c9f 100644 --- a/sys/kern/sched_4bsd.c +++ b/sys/kern/sched_4bsd.c @@ -1187,7 +1187,6 @@ forward_wakeup(int cpunum) CPU_SETOF(me, &dontuse); CPU_OR(&dontuse, &dontuse, &stopped_cpus); - CPU_OR(&dontuse, &dontuse, &hlt_cpus_mask); CPU_ZERO(&map2); if (forward_wakeup_use_loop) { STAILQ_FOREACH(pc, &cpuhead, pc_allcpu) { @@ -1389,7 +1388,6 @@ sched_4bsd_add(struct thread *td, int flags) } else { if (!single_cpu) { tidlemsk = idle_cpus_mask; - CPU_ANDNOT(&tidlemsk, &tidlemsk, &hlt_cpus_mask); CPU_CLR(cpuid, &tidlemsk); if (!CPU_ISSET(cpuid, &idle_cpus_mask) && @@ -1827,22 +1825,7 @@ sched_4bsd_affinity(struct thread *td) static bool sched_4bsd_do_timer_accounting(void) { -#ifdef SMP - /* - * Don't do any accounting for the disabled HTT cores, since it - * will provide misleading numbers for the userland. - * - * No locking is necessary here, since even if we lose the race - * when hlt_cpus_mask changes it is not a big deal, really. - * - * Don't do that for ULE, since ULE doesn't consider hlt_cpus_mask - * and unlike other schedulers it actually schedules threads to - * those CPUs. - */ - return (!CPU_ISSET(PCPU_GET(cpuid), &hlt_cpus_mask)); -#else return (true); -#endif } static int diff --git a/sys/kern/subr_smp.c b/sys/kern/subr_smp.c index bd4e5c4b5aeb..a5dca4bfc60d 100644 --- a/sys/kern/subr_smp.c +++ b/sys/kern/subr_smp.c @@ -90,7 +90,6 @@ smp_topo_none(void) volatile cpuset_t stopped_cpus; volatile cpuset_t started_cpus; volatile cpuset_t suspended_cpus; -cpuset_t hlt_cpus_mask; cpuset_t logical_cpus_mask; void (*cpustop_restartfunc)(void); diff --git a/sys/sys/smp.h b/sys/sys/smp.h index a8653cf8314c..864058ad5c84 100644 --- a/sys/sys/smp.h +++ b/sys/sys/smp.h @@ -160,7 +160,6 @@ extern volatile cpuset_t started_cpus; /* cpus to let out of stop pen */ extern volatile cpuset_t stopped_cpus; /* cpus in stop pen */ extern volatile cpuset_t suspended_cpus; /* cpus [near] sleeping in susp pen */ extern volatile cpuset_t toresume_cpus; /* cpus to let out of suspend pen */ -extern cpuset_t hlt_cpus_mask; /* XXX 'mask' is detail in old impl */ extern cpuset_t logical_cpus_mask; #endif /* SMP */