summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2013-06-13 20:46:03 +0000
committerjeff <jeff@FreeBSD.org>2013-06-13 20:46:03 +0000
commit7ee88fb112275ba704d022b9feebc6bbd4cddf2e (patch)
tree88a1eaa0fdaa8c6f93574ecfb224a95f498892b9 /sys/i386
parent21c714c60959a0ddca57e0500d0f93287099f971 (diff)
downloadFreeBSD-src-7ee88fb112275ba704d022b9feebc6bbd4cddf2e.zip
FreeBSD-src-7ee88fb112275ba704d022b9feebc6bbd4cddf2e.tar.gz
- Add a BIT_FFS() macro and use it to replace cpusetffs_obj()
Discussed with: attilio Sponsored by: EMC / Isilon Storage Division
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/i386/mp_machdep.c4
-rw-r--r--sys/i386/i386/pmap.c2
-rw-r--r--sys/i386/xen/mp_machdep.c4
-rw-r--r--sys/i386/xen/pmap.c2
4 files changed, 6 insertions, 6 deletions
diff --git a/sys/i386/i386/mp_machdep.c b/sys/i386/i386/mp_machdep.c
index a7046d8..9b832ed 100644
--- a/sys/i386/i386/mp_machdep.c
+++ b/sys/i386/i386/mp_machdep.c
@@ -1249,7 +1249,7 @@ smp_targeted_tlb_shootdown(cpuset_t mask, u_int vector, vm_offset_t addr1, vm_of
ipi_all_but_self(vector);
} else {
ncpu = 0;
- while ((cpu = cpusetobj_ffs(&mask)) != 0) {
+ while ((cpu = CPU_FFS(&mask)) != 0) {
cpu--;
CPU_CLR(cpu, &mask);
CTR3(KTR_SMP, "%s: cpu: %d ipi: %x", __func__, cpu,
@@ -1398,7 +1398,7 @@ ipi_selected(cpuset_t cpus, u_int ipi)
if (ipi == IPI_STOP_HARD)
CPU_OR_ATOMIC(&ipi_nmi_pending, &cpus);
- while ((cpu = cpusetobj_ffs(&cpus)) != 0) {
+ while ((cpu = CPU_FFS(&cpus)) != 0) {
cpu--;
CPU_CLR(cpu, &cpus);
CTR3(KTR_SMP, "%s: cpu: %d ipi: %x", __func__, cpu, ipi);
diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c
index d889bf8..0338bb1 100644
--- a/sys/i386/i386/pmap.c
+++ b/sys/i386/i386/pmap.c
@@ -1957,7 +1957,7 @@ pmap_lazyfix(pmap_t pmap)
spins = 50000000;
/* Find least significant set bit. */
- lsb = cpusetobj_ffs(&mask);
+ lsb = CPU_FFS(&mask);
MPASS(lsb != 0);
lsb--;
CPU_SETOF(lsb, &mask);
diff --git a/sys/i386/xen/mp_machdep.c b/sys/i386/xen/mp_machdep.c
index 253cc40..fdfa812 100644
--- a/sys/i386/xen/mp_machdep.c
+++ b/sys/i386/xen/mp_machdep.c
@@ -1039,7 +1039,7 @@ smp_targeted_tlb_shootdown(cpuset_t mask, u_int vector, vm_offset_t addr1, vm_of
ipi_all_but_self(vector);
} else {
ncpu = 0;
- while ((cpu = cpusetobj_ffs(&mask)) != 0) {
+ while ((cpu = CPU_FFS(&mask)) != 0) {
cpu--;
CPU_CLR(cpu, &mask);
CTR3(KTR_SMP, "%s: cpu: %d ipi: %x", __func__, cpu,
@@ -1132,7 +1132,7 @@ ipi_selected(cpuset_t cpus, u_int ipi)
if (ipi == IPI_STOP_HARD)
CPU_OR_ATOMIC(&ipi_nmi_pending, &cpus);
- while ((cpu = cpusetobj_ffs(&cpus)) != 0) {
+ while ((cpu = CPU_FFS(&cpus)) != 0) {
cpu--;
CPU_CLR(cpu, &cpus);
CTR3(KTR_SMP, "%s: cpu: %d ipi: %x", __func__, cpu, ipi);
diff --git a/sys/i386/xen/pmap.c b/sys/i386/xen/pmap.c
index 01a493c..96988e2 100644
--- a/sys/i386/xen/pmap.c
+++ b/sys/i386/xen/pmap.c
@@ -1707,7 +1707,7 @@ pmap_lazyfix(pmap_t pmap)
spins = 50000000;
/* Find least significant set bit. */
- lsb = cpusetobj_ffs(&mask);
+ lsb = CPU_FFS(&mask);
MPASS(lsb != 0);
lsb--;
CPU_SETOF(lsb, &mask);
OpenPOWER on IntegriCloud