aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitchell Horne <mhorne@FreeBSD.org>2026-07-13 19:15:00 +0000
committerMitchell Horne <mhorne@FreeBSD.org>2026-07-13 19:40:42 +0000
commit63d4f044225d1bb86767759b18c0ae63b25a9c03 (patch)
tree4dfdbec329a2186ae4c2268a732e038b0c194698
parent575529a92d7b35628daace82c2965984c6376e2e (diff)
g_eli: better handling of absent/disabled CPUs
Checking hlt_cpus_mask is a no-op, and the mask will be removed in the next commit. However, we can use the more recent CPU_ABSENT() macro to check the status. Reviewed by: olce MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D58157
-rw-r--r--sys/geom/eli/g_eli.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/sys/geom/eli/g_eli.c b/sys/geom/eli/g_eli.c
index 7fca50e7635c..d302d84fc415 100644
--- a/sys/geom/eli/g_eli.c
+++ b/sys/geom/eli/g_eli.c
@@ -869,16 +869,6 @@ g_eli_access(struct g_provider *pp, int dr, int dw, int de)
return (0);
}
-static int
-g_eli_cpu_is_disabled(int cpu)
-{
-#ifdef SMP
- return (CPU_ISSET(cpu, &hlt_cpus_mask));
-#else
- return (0);
-#endif
-}
-
static void
g_eli_init_uma(void)
{
@@ -1095,7 +1085,7 @@ g_eli_create(struct gctl_req *req, struct g_class *mp, struct g_provider *bpp,
threads = mp_ncpus;
sc->sc_cpubind = (mp_ncpus > 1 && threads == mp_ncpus);
for (i = 0; i < threads; i++) {
- if (g_eli_cpu_is_disabled(i)) {
+ if (CPU_ABSENT(i)) {
G_ELI_DEBUG(1, "%s: CPU %u disabled, skipping.",
bpp->name, i);
continue;