svn commit: r297710 - head/sys/kern

Andriy Gapon avg at FreeBSD.org
Fri Apr 8 11:59:12 UTC 2016


Author: avg
Date: Fri Apr  8 11:59:11 2016
New Revision: 297710
URL: https://svnweb.freebsd.org/changeset/base/297710

Log:
  topo_set_pu_id: turn a check into an assertion
  
  The new id must not be present in any cpu set in any topology element.
  
  MFC after:	30 days

Modified:
  head/sys/kern/subr_smp.c

Modified: head/sys/kern/subr_smp.c
==============================================================================
--- head/sys/kern/subr_smp.c	Fri Apr  8 11:58:24 2016	(r297709)
+++ head/sys/kern/subr_smp.c	Fri Apr  8 11:59:11 2016	(r297710)
@@ -1029,8 +1029,8 @@ topo_set_pu_id(struct topo_node *node, c
 	node->subtype = 1;
 
 	while ((node = node->parent) != NULL) {
-		if (CPU_ISSET(id, &node->cpuset))
-			break;
+		KASSERT(!CPU_ISSET(id, &node->cpuset),
+		    ("logical ID %u is already set in node %p", id, node));
 		CPU_SET(id, &node->cpuset);
 		node->cpu_count++;
 	}


More information about the svn-src-head mailing list