Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Apr 2016 11:59:11 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r297710 - head/sys/kern
Message-ID:  <201604081159.u38BxBkO097444@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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++;
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604081159.u38BxBkO097444>