The branch main has been updated by mhorne:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=63d4f044225d1bb86767759b18c0ae63b25a9c03

commit 63d4f044225d1bb86767759b18c0ae63b25a9c03
Author:     Mitchell Horne <[email protected]>
AuthorDate: 2026-07-13 19:15:00 +0000
Commit:     Mitchell Horne <[email protected]>
CommitDate: 2026-07-13 19:40:42 +0000

    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
---
 sys/geom/eli/g_eli.c | 12 +-----------
 1 file changed, 1 insertion(+), 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;

Reply via email to