MCPcopy Create free account
hub / github.com/F-Stack/f-stack / cpu_mp_start

Function cpu_mp_start

freebsd/mips/mips/mp_machdep.c:245–275  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

243}
244
245void
246cpu_mp_start(void)
247{
248 int error, cpuid;
249 cpuset_t cpumask;
250
251 mtx_init(&ap_boot_mtx, "ap boot", NULL, MTX_SPIN);
252
253 CPU_ZERO(&all_cpus);
254 platform_cpu_mask(&cpumask);
255
256 while (!CPU_EMPTY(&cpumask)) {
257 cpuid = CPU_FFS(&cpumask) - 1;
258 CPU_CLR(cpuid, &cpumask);
259
260 if (cpuid >= MAXCPU) {
261 printf("cpu_mp_start: ignoring AP #%d.\n", cpuid);
262 continue;
263 }
264
265 if (cpuid != platform_processor_id()) {
266 if ((error = start_ap(cpuid)) != 0) {
267 printf("AP #%d failed to start: %d\n", cpuid, error);
268 continue;
269 }
270 if (bootverbose)
271 printf("AP #%d started!\n", cpuid);
272 }
273 CPU_SET(cpuid, &all_cpus);
274 }
275}
276
277void
278smp_init_secondary(u_int32_t cpuid)

Callers

nothing calls this directly

Calls 5

mtx_initFunction · 0.85
start_apFunction · 0.70
platform_cpu_maskFunction · 0.50
printfFunction · 0.50
platform_processor_idFunction · 0.50

Tested by

no test coverage detected