Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/subr_smp.c
Show First 20 Lines • Show All 755 Lines • ▼ Show 20 Lines | smp_topo_addleaf(struct cpu_group *parent, struct cpu_group *child, int share, | ||||
child->cg_mask = mask; | child->cg_mask = mask; | ||||
parent->cg_children++; | parent->cg_children++; | ||||
for (; parent != NULL; parent = parent->cg_parent) { | for (; parent != NULL; parent = parent->cg_parent) { | ||||
if (CPU_OVERLAP(&parent->cg_mask, &child->cg_mask)) | if (CPU_OVERLAP(&parent->cg_mask, &child->cg_mask)) | ||||
panic("Duplicate children in %p. mask (%s) child (%s)", | panic("Duplicate children in %p. mask (%s) child (%s)", | ||||
parent, | parent, | ||||
cpusetobj_strprint(cpusetbuf, &parent->cg_mask), | cpusetobj_strprint(cpusetbuf, &parent->cg_mask), | ||||
cpusetobj_strprint(cpusetbuf2, &child->cg_mask)); | cpusetobj_strprint(cpusetbuf2, &child->cg_mask)); | ||||
CPU_OR(&parent->cg_mask, &child->cg_mask); | CPU_OR(&parent->cg_mask, &parent->cg_mask, &child->cg_mask); | ||||
parent->cg_count += child->cg_count; | parent->cg_count += child->cg_count; | ||||
} | } | ||||
return (start); | return (start); | ||||
} | } | ||||
struct cpu_group * | struct cpu_group * | ||||
smp_topo_1level(int share, int count, int flags) | smp_topo_1level(int share, int count, int flags) | ||||
▲ Show 20 Lines • Show All 570 Lines • Show Last 20 Lines |