summaryrefslogtreecommitdiffstats
path: root/sys/amd64/amd64/pmap.c
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2016-01-13 19:19:50 +0000
committerjkim <jkim@FreeBSD.org>2016-01-13 19:19:50 +0000
commit9dcfa1d85c456c227bfcf18a14f235d7b6c22ae5 (patch)
treea282ff9472fc91c0ee21ecf1ff6c7100d2a60cf7 /sys/amd64/amd64/pmap.c
parent06809ba3458e8ab8737618399e05149d707fda2c (diff)
downloadFreeBSD-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.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