diff options
author | jkim <jkim@FreeBSD.org> | 2016-01-13 19:19:50 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2016-01-13 19:19:50 +0000 |
commit | 9dcfa1d85c456c227bfcf18a14f235d7b6c22ae5 (patch) | |
tree | a282ff9472fc91c0ee21ecf1ff6c7100d2a60cf7 /sys/amd64/amd64/pmap.c | |
parent | 06809ba3458e8ab8737618399e05149d707fda2c (diff) | |
download | FreeBSD-src-9dcfa1d85c456c227bfcf18a14f235d7b6c22ae5.zip FreeBSD-src-9dcfa1d85c456c227bfcf18a14f235d7b6c22ae5.tar.gz |
Remove dead code when the target processor has POPCNT instruction.
Diffstat (limited to 'sys/amd64/amd64/pmap.c')
-rw-r--r-- | sys/amd64/amd64/pmap.c | 5 |
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]); |