svn commit: r293836 - head/sys/amd64/amd64

Jung-uk Kim jkim at FreeBSD.org
Wed Jan 13 19:19:52 UTC 2016


Author: jkim
Date: Wed Jan 13 19:19:50 2016
New Revision: 293836
URL: https://svnweb.freebsd.org/changeset/base/293836

Log:
  Remove dead code when the target processor has POPCNT instruction.

Modified:
  head/sys/amd64/amd64/pmap.c

Modified: head/sys/amd64/amd64/pmap.c
==============================================================================
--- head/sys/amd64/amd64/pmap.c	Wed Jan 13 18:33:12 2016	(r293835)
+++ head/sys/amd64/amd64/pmap.c	Wed Jan 13 19:19:50 2016	(r293836)
@@ -3018,11 +3018,14 @@ reserve_pv_entries(pmap_t pmap, int need
 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]);


More information about the svn-src-head mailing list