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
This commit is contained in:
Andriy Gapon 2016-04-08 11:59:11 +00:00
parent c8ff459286
commit a449bdba32
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=297710

View File

@ -1029,8 +1029,8 @@ topo_set_pu_id(struct topo_node *node, cpuid_t id)
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++;
}