Things had gotten a little tangled in there so let's do some cleanup. Remove the distressingly-special-purpose z_reinit_idle_thread() hook (which existed to support secondary core bringup when SMP_BOOT_DELAY=y), and just fold that into a generic z_init_cpu(), which we can call in obvious and symmetric ways from main initialization, z_smp_init(), and z_smp_start_cpu() (the now-official programmatic hook for starting cpus). Remove the "#if CONFIG_MP_NUM_CPUS > 1" exclusions. These weren't saving any code size and were propagating themselves into platform layers trying to avoid build failures. There are some "special" APIs added for SOF which need to go away in favor of the newer/generic z_smp_start_cpu(). Collect them in one place and put them under a "#ifdef CONFIG_SOF" to prevent them from being used in Zephyr apps. Move some function declarations that didn't have homes into <kernel/thread.h>. Signed-off-by: Andy Ross <andrew.j.ross@intel.com> |
||
|---|---|---|
| .. | ||
| include | ||
| paging | ||
| atomic_c.c | ||
| banner.c | ||
| cache_handlers.c | ||
| CMakeLists.txt | ||
| compiler_stack_protect.c | ||
| condvar.c | ||
| device.c | ||
| errno.c | ||
| events.c | ||
| fatal.c | ||
| futex.c | ||
| idle.c | ||
| init.c | ||
| Kconfig | ||
| Kconfig.vm | ||
| kheap.c | ||
| mailbox.c | ||
| main_weak.c | ||
| mem_domain.c | ||
| mem_slab.c | ||
| mempool.c | ||
| mmu.c | ||
| msg_q.c | ||
| mutex.c | ||
| pipes.c | ||
| poll.c | ||
| queue.c | ||
| sched.c | ||
| sem.c | ||
| smp.c | ||
| stack.c | ||
| system_work_q.c | ||
| thread.c | ||
| timeout.c | ||
| timer.c | ||
| usage.c | ||
| userspace_handler.c | ||
| userspace.c | ||
| version.c | ||
| work.c | ||
| xip.c | ||