summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/amd64/amd64/pmap.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index 8b04eab..d2d0248 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -3018,11 +3018,14 @@ reserve_pv_entries(pmap_t pmap, int needed, struct rwlock **lockp)
retry:
avail = 0;
TAILQ_FOREACH(pc, &pmap->pm_pvchunk, pc_list) {
+#ifndef __POPCNT__
if ((cpu_feature2 & CPUID2_POPCNT) == 0) {
free = bitcount64(pc->pc_map[0]);
free += bitcount64(pc->pc_map[1]);
free += bitcount64(pc->pc_map[2]);
- } else {
+ } else
+#endif
+ {
free = popcnt_pc_map_elem_pq(pc->pc_map[0]);
free += popcnt_pc_map_elem_pq(pc->pc_map[1]);
free += popcnt_pc_map_elem_pq(pc->pc_map[2]);
OpenPOWER on IntegriCloud