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

Function start_ap

freebsd/mips/mips/mp_machdep.c:182–203  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

180}
181
182static int
183start_ap(int cpuid)
184{
185 int cpus, ms;
186
187 cpus = mp_naps;
188 dpcpu = (void *)kmem_malloc(DPCPU_SIZE, M_WAITOK | M_ZERO);
189
190 mips_sync();
191
192 if (platform_start_ap(cpuid) != 0)
193 return (-1); /* could not start AP */
194
195 for (ms = 0; ms < 5000; ++ms) {
196 if (mp_naps > cpus)
197 return (0); /* success */
198 else
199 DELAY(1000);
200 }
201
202 return (-2); /* timeout initializing AP */
203}
204
205void
206cpu_mp_setmaxid(void)

Callers 1

cpu_mp_startFunction · 0.70

Calls 4

mips_syncFunction · 0.85
DELAYFunction · 0.70
kmem_mallocFunction · 0.50
platform_start_apFunction · 0.50

Tested by

no test coverage detected