mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-13 05:41:26 +01:00
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:
parent
c8ff459286
commit
a449bdba32
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=297710
@ -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++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user