summaryrefslogtreecommitdiffstats
path: root/sys/sys/smp.h
diff options
context:
space:
mode:
authorjeff <jeff@FreeBSD.org>2003-06-28 22:06:19 +0000
committerjeff <jeff@FreeBSD.org>2003-06-28 22:06:19 +0000
commit3e2b03aa95a36aa57a94472d29c92f807d12df3e (patch)
treea7f0825adec1dfb8be5b9fa36cad08a3e3fe2305 /sys/sys/smp.h
parent9ab695deec76b241e8bb92415d2f9dc9026fa3ac (diff)
downloadFreeBSD-src-3e2b03aa95a36aa57a94472d29c92f807d12df3e.zip
FreeBSD-src-3e2b03aa95a36aa57a94472d29c92f807d12df3e.tar.gz
- Add structures for defining cpu topologies more complex than SMP.
smp_topology may be left NULL by architectures which have vanilla SMP setups.
Diffstat (limited to 'sys/sys/smp.h')
-rw-r--r--sys/sys/smp.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/sys/sys/smp.h b/sys/sys/smp.h
index 9fe9faf..277e879 100644
--- a/sys/sys/smp.h
+++ b/sys/sys/smp.h
@@ -17,6 +17,33 @@
#ifndef LOCORE
#ifdef SMP
+
+/*
+ * Topology of a NUMA or HTT system.
+ *
+ * The top level topology is an array of pointers to groups. Each group
+ * contains a bitmask of cpus in its group or subgroups. It may also
+ * contain a pointer to an array of child groups.
+ *
+ * The bitmasks at non leaf groups may be used by consumers who support
+ * a smaller depth than the hardware provides.
+ *
+ * The topology may be omitted by systems where all CPUs are equal.
+ */
+
+struct cpu_group {
+ u_int cg_mask; /* Mask of cpus in this group. */
+ int cg_count; /* Count of cpus in this group. */
+ int cg_children; /* Number of children groups. */
+ struct cpu_group *cg_child; /* Optional child group. */
+};
+
+struct cpu_top {
+ int ct_count; /* Count of groups. */
+ struct cpu_group *ct_group; /* Array of pointers to cpu groups. */
+};
+
+extern struct cpu_top *smp_topology;
extern void (*cpustop_restartfunc)(void);
extern int mp_ncpus;
extern int smp_active;
OpenPOWER on IntegriCloud