Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F163423379
D24927.id106312.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D24927.id106312.diff
View Options
diff --git a/sys/x86/x86/mp_x86.c b/sys/x86/x86/mp_x86.c
--- a/sys/x86/x86/mp_x86.c
+++ b/sys/x86/x86/mp_x86.c
@@ -871,6 +871,15 @@
nchildren = 0;
node = root;
while (node != NULL) {
+ /*
+ * When some APICs are disabled, a node could be empty. It
+ * doesn't make sense to create a cpu group for an emtpy node.
+ * For that reason, skip it.
+ */
+ if (CPU_EMPTY(&node->cpuset)) {
+ node = topo_next_node(root, node);
+ continue;
+ }
if (CPU_CMP(&node->cpuset, &root->cpuset) == 0) {
if (node->type == TOPO_TYPE_CACHE &&
cg_root->cg_level < node->subtype)
@@ -896,8 +905,14 @@
if (nchildren == root->cpu_count)
return;
- cg_root->cg_child = smp_topo_alloc(nchildren);
+ /*
+ * We are not interested in nodes without children.
+ */
cg_root->cg_children = nchildren;
+ if (nchildren == 0)
+ return;
+
+ cg_root->cg_child = smp_topo_alloc(nchildren);
/*
* Now find again the same cache nodes as above and recursively
@@ -909,7 +924,8 @@
if ((node->type != TOPO_TYPE_GROUP &&
node->type != TOPO_TYPE_NODE &&
node->type != TOPO_TYPE_CACHE) ||
- CPU_CMP(&node->cpuset, &root->cpuset) == 0) {
+ (CPU_CMP(&node->cpuset, &root->cpuset) == 0) ||
+ (CPU_EMPTY(&node->cpuset))) {
node = topo_next_node(root, node);
continue;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jul 24, 2:18 AM (21 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35425301
Default Alt Text
D24927.id106312.diff (1 KB)
Attached To
Mode
D24927: x86/mp: don't create empty cpu groups
Attached
Detach File
Event Timeline
Log In to Comment