Index: largeSMP/gnu/usr.bin/gdb/kgdb/kthr.c =================================================================== --- largeSMP/gnu/usr.bin/gdb/kgdb/kthr.c (revision 221144) +++ largeSMP/gnu/usr.bin/gdb/kgdb/kthr.c (working copy) @@ -28,6 +28,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -48,7 +49,7 @@ static int dumptid; static CORE_ADDR stoppcbs; -static __cpumask_t stopped_cpus; +static cpuset_t stopped_cpus; static struct kthr *first; struct kthr *curkthr; @@ -105,7 +106,7 @@ if (addr != 0) kvm_read(kvm, addr, &stopped_cpus, sizeof(stopped_cpus)); else - stopped_cpus = 0; + CPU_ZERO(&stopped_cpus); stoppcbs = kgdb_lookup("stoppcbs"); @@ -126,7 +127,8 @@ kt->kaddr = addr; if (td.td_tid == dumptid) kt->pcb = dumppcb; - else if (td.td_state == TDS_RUNNING && ((1 << td.td_oncpu) & stopped_cpus) + else if (td.td_state == TDS_RUNNING && stoppcbs != 0 && + CPU_ISSET(td.td_oncpu, &stopped_cpus)) && stoppcbs != 0) kt->pcb = (uintptr_t) stoppcbs + sizeof(struct pcb) * td.td_oncpu; else Index: largeSMP/lib/libmemstat/memstat_uma.c =================================================================== --- largeSMP/lib/libmemstat/memstat_uma.c (revision 221144) +++ largeSMP/lib/libmemstat/memstat_uma.c (working copy) @@ -27,6 +27,7 @@ */ #include +#include #include #define LIBMEMSTAT /* Cause vm_page.h not to include opt_vmpage.h */ @@ -313,7 +314,7 @@ struct uma_keg *kzp, kz; int hint_dontsearch, i, mp_maxid, ret; char name[MEMTYPE_MAXNAME]; - __cpumask_t all_cpus; + cpuset_t all_cpus; kvm_t *kvm; kvm = (kvm_t *)kvm_handle; @@ -407,7 +408,7 @@ if (kz.uk_flags & UMA_ZFLAG_INTERNAL) goto skip_percpu; for (i = 0; i < mp_maxid + 1; i++) { - if ((all_cpus & (1 << i)) == 0) + if (!CPU_ISSET(i, &all_cpus)) continue; ucp = &ucp_array[i]; mtp->mt_numallocs += ucp->uc_allocs;