Index: src/sys/kern/subr_mbuf.c =================================================================== RCS file: /home/ncvs/src/sys/kern/subr_mbuf.c,v retrieving revision 1.5 diff -u -r1.5 subr_mbuf.c --- src/sys/kern/subr_mbuf.c 2001/07/26 23:08:31 1.5 +++ src/sys/kern/subr_mbuf.c 2001/08/01 00:45:44 @@ -62,21 +62,6 @@ #endif /* - * Macros allowing us to determine whether or not a given CPU's container - * should be configured during mb_init(). - * XXX: Eventually we may want to provide hooks for CPU spinon/spinoff that - * will allow us to configure the containers on spinon/spinoff. As it - * stands, booting with CPU x disactivated and activating CPU x only - * after bootup will lead to disaster and CPU x's container will be - * uninitialized. - */ -#ifdef SMP -#define CPU_ABSENT(x) ((all_cpus & (1 << x)) == 0) -#else -#define CPU_ABSENT(x) 0 -#endif - -/* * The mbuf allocator is heavily based on Alfred Perlstein's * (alfred@FreeBSD.org) "memcache" allocator which is itself based * on concepts from several per-CPU memory allocators. The difference @@ -213,7 +198,11 @@ /* * Local macros for internal allocator structure manipulations. */ +#ifdef SMP #define MB_GET_PCPU_LIST(mb_lst) (mb_lst)->ml_cntlst[PCPU_GET(cpuid)] +#else +#define MB_GET_PCPU_LIST(mb_lst) (mb_lst)->ml_cntlst[0] +#endif #define MB_GET_PCPU_LIST_NUM(mb_lst, num) (mb_lst)->ml_cntlst[(num)] Index: src/sys/sys/smp.h =================================================================== RCS file: /home/ncvs/src/sys/sys/smp.h,v retrieving revision 1.66 diff -u -r1.66 smp.h --- src/sys/sys/smp.h 2001/05/10 17:45:49 1.66 +++ src/sys/sys/smp.h 2001/08/01 00:45:44 @@ -28,6 +28,13 @@ extern volatile u_int stopped_cpus; /* + * Macro allowing us to determine whether a CPU is absent at any given + * time, thus permitting us to configure sparse maps of cpuid-dependent + * (per-CPU) structures. + */ +#define CPU_ABSENT(x_cpu) ((all_cpus & (1 << (x_cpu))) == 0) + +/* * Machine dependent functions used to initialize MP support. * * The cpu_mp_probe() should check to see if MP support is present and return @@ -54,7 +61,8 @@ void (*)(void *), void (*)(void *), void *arg); - +#else /* SMP */ +#define CPU_ABSENT(x_cpu) (0) #endif /* SMP */ #endif /* !LOCORE */ #endif /* _KERNEL */