|
FreeBSD kernel kern code
|
#include <sys/cdefs.h>#include <sys/param.h>#include <sys/systm.h>#include <sys/kernel.h>#include <sys/ktr.h>#include <sys/proc.h>#include <sys/bus.h>#include <sys/lock.h>#include <sys/mutex.h>#include <sys/pcpu.h>#include <sys/smp.h>#include <sys/sysctl.h>#include <machine/cpu.h>#include <machine/smp.h>#include "opt_sched.h"
Go to the source code of this file.
Functions | |
| __FBSDID ("$BSDSUniX$") | |
| static | SYSCTL_NODE (_kern, OID_AUTO, smp, CTLFLAG_RD|CTLFLAG_CAPRD, NULL,"Kernel SMP") |
| SYSCTL_INT (_kern_smp, OID_AUTO, maxid, CTLFLAG_RD|CTLFLAG_CAPRD,&mp_maxid, 0,"Max CPU ID.") | |
| SYSCTL_INT (_kern_smp, OID_AUTO, maxcpus, CTLFLAG_RD|CTLFLAG_CAPRD,&mp_maxcpus, 0,"Max number of CPUs that the system was compiled for.") | |
| SYSCTL_INT (_kern_smp, OID_AUTO, active, CTLFLAG_RW,&smp_active, 0,"Number of Auxillary Processors (APs) that were successfully started") | |
| SYSCTL_INT (_kern_smp, OID_AUTO, disabled, CTLFLAG_RDTUN|CTLFLAG_CAPRD,&smp_disabled, 0,"SMP has been disabled from the loader") | |
| TUNABLE_INT ("kern.smp.disabled",&smp_disabled) | |
| SYSCTL_INT (_kern_smp, OID_AUTO, cpus, CTLFLAG_RD|CTLFLAG_CAPRD,&smp_cpus, 0,"Number of CPUs online") | |
| SYSCTL_INT (_kern_smp, OID_AUTO, topology, CTLFLAG_RD,&smp_topology, 0,"Topology override setting; 0 is default provided by hardware.") | |
| TUNABLE_INT ("kern.smp.topology",&smp_topology) | |
| void | smp_rendezvous_cpus (cpuset_t map, void(*setup_func)(void *), void(*action_func)(void *), void(*teardown_func)(void *), void *arg) |
| void | smp_rendezvous (void(*setup_func)(void *), void(*action_func)(void *), void(*teardown_func)(void *), void *arg) |
| static void | mp_setvariables_for_up (void *dummy) |
| SYSINIT (cpu_mp_setvariables, SI_SUB_TUNABLES, SI_ORDER_FIRST, mp_setvariables_for_up, NULL) | |
| void | smp_no_rendevous_barrier (void *dummy) |
Variables | |
| cpuset_t | all_cpus |
| int | mp_ncpus |
| int | mp_maxcpus = MAXCPU |
| volatile int | smp_started |
| u_int | mp_maxid |
| int | smp_active = 0 |
| int | smp_disabled = 0 |
| int | smp_cpus = 1 |
| int | smp_topology = 0 |
| __FBSDID | ( | "$BSDSUniX$" | ) |
|
static |
Definition at line 707 of file subr_smp.c.
| void smp_no_rendevous_barrier | ( | void * | dummy | ) |
Definition at line 719 of file subr_smp.c.
References smp_started.
Referenced by _rm_wlock().

| void smp_rendezvous | ( | void(*)(void *) | setup_func, |
| void(*)(void *) | action_func, | ||
| void(*)(void *) | teardown_func, | ||
| void * | arg | ||
| ) |
Definition at line 685 of file subr_smp.c.
| void smp_rendezvous_cpus | ( | cpuset_t | map, |
| void(*)(void *) | setup_func, | ||
| void(*)(void *) | action_func, | ||
| void(*)(void *) | teardown_func, | ||
| void * | arg | ||
| ) |
Definition at line 664 of file subr_smp.c.
Referenced by _rm_wlock().

| SYSCTL_INT | ( | _kern_smp | , |
| OID_AUTO | , | ||
| maxid | , | ||
| CTLFLAG_RD| | CTLFLAG_CAPRD, | ||
| & | mp_maxid, | ||
| 0 | , | ||
| "Max CPU ID." | |||
| ) |
| SYSCTL_INT | ( | _kern_smp | , |
| OID_AUTO | , | ||
| maxcpus | , | ||
| CTLFLAG_RD| | CTLFLAG_CAPRD, | ||
| & | mp_maxcpus, | ||
| 0 | , | ||
| "Max number of CPUs that the system was compiled for." | |||
| ) |
| SYSCTL_INT | ( | _kern_smp | , |
| OID_AUTO | , | ||
| active | , | ||
| CTLFLAG_RW | , | ||
| & | smp_active, | ||
| 0 | , | ||
| "Number of Auxillary Processors (APs) that were successfully started" | |||
| ) |
| SYSCTL_INT | ( | _kern_smp | , |
| OID_AUTO | , | ||
| disabled | , | ||
| CTLFLAG_RDTUN| | CTLFLAG_CAPRD, | ||
| & | smp_disabled, | ||
| 0 | , | ||
| "SMP has been disabled from the loader" | |||
| ) |
| SYSCTL_INT | ( | _kern_smp | , |
| OID_AUTO | , | ||
| cpus | , | ||
| CTLFLAG_RD| | CTLFLAG_CAPRD, | ||
| & | smp_cpus, | ||
| 0 | , | ||
| "Number of CPUs online" | |||
| ) |
| SYSCTL_INT | ( | _kern_smp | , |
| OID_AUTO | , | ||
| topology | , | ||
| CTLFLAG_RD | , | ||
| & | smp_topology, | ||
| 0 | , | ||
| "Topology override setting; 0 is default provided by hardware." | |||
| ) |
|
static |
| SYSINIT | ( | cpu_mp_setvariables | , |
| SI_SUB_TUNABLES | , | ||
| SI_ORDER_FIRST | , | ||
| mp_setvariables_for_up | , | ||
| NULL | |||
| ) |
| TUNABLE_INT | ( | "kern.smp.disabled" | , |
| & | smp_disabled | ||
| ) |
| TUNABLE_INT | ( | "kern.smp.topology" | , |
| & | smp_topology | ||
| ) |
| cpuset_t all_cpus |
Definition at line 61 of file subr_smp.c.
Referenced by _rm_wlock(), cpuset_init(), kdb_trap(), mp_setvariables_for_up(), panic(), and rm_init_flags().
| int mp_maxcpus = MAXCPU |
Definition at line 65 of file subr_smp.c.
| u_int mp_maxid |
Definition at line 68 of file subr_smp.c.
Referenced by mp_setvariables_for_up(), pmc_cpu_max(), and sysctl_kern_cp_times().
| int mp_ncpus |
Definition at line 63 of file subr_smp.c.
Referenced by bsdsunix_fixup(), cf_set_method(), dpcpu_copy(), mp_setvariables_for_up(), sysctl_dpcpu_int(), sysctl_dpcpu_long(), and sysctl_dpcpu_quad().
| int smp_active = 0 |
Definition at line 79 of file subr_smp.c.
Referenced by cf_set_method().
| int smp_cpus = 1 |
Definition at line 88 of file subr_smp.c.
Referenced by umtxq_busy().
| int smp_disabled = 0 |
Definition at line 83 of file subr_smp.c.
| volatile int smp_started |
Definition at line 67 of file subr_smp.c.
Referenced by configtimer(), sched_add(), smp_no_rendevous_barrier(), and timercb().
| int smp_topology = 0 |
Definition at line 92 of file subr_smp.c.