| 319 | } |
| 320 | |
| 321 | static void |
| 322 | release_aps(void *dummy __unused) |
| 323 | { |
| 324 | uint32_t loop_counter; |
| 325 | |
| 326 | if (mp_ncpus == 1) |
| 327 | return; |
| 328 | |
| 329 | intr_pic_ipi_setup(IPI_RENDEZVOUS, "rendezvous", ipi_rendezvous, NULL); |
| 330 | intr_pic_ipi_setup(IPI_AST, "ast", ipi_ast, NULL); |
| 331 | intr_pic_ipi_setup(IPI_STOP, "stop", ipi_stop, NULL); |
| 332 | intr_pic_ipi_setup(IPI_PREEMPT, "preempt", ipi_preempt, NULL); |
| 333 | intr_pic_ipi_setup(IPI_HARDCLOCK, "hardclock", ipi_hardclock, NULL); |
| 334 | |
| 335 | atomic_store_rel_int(&aps_ready, 1); |
| 336 | /* Wake the other threads up */ |
| 337 | dsb(); |
| 338 | sev(); |
| 339 | |
| 340 | printf("Release APs\n"); |
| 341 | |
| 342 | for (loop_counter = 0; loop_counter < 2000; loop_counter++) { |
| 343 | if (smp_started) |
| 344 | return; |
| 345 | DELAY(1000); |
| 346 | } |
| 347 | printf("AP's not started\n"); |
| 348 | } |
| 349 | |
| 350 | SYSINIT(start_aps, SI_SUB_SMP, SI_ORDER_FIRST, release_aps, NULL); |
| 351 |
nothing calls this directly
no test coverage detected