zephyr/include/kernel
Andy Ross 2b210cb3db kernel: Refactor SMP cpu initialization a bit
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>
2022-03-01 09:59:15 -05:00
..
mempool_heap.h kernel: mempool_heap: fix header guard 2021-06-16 20:38:55 -04:00
sched_priq.h kernel: add 'static' keyword to select routines 2021-12-13 17:21:58 -05:00
stats.h kernel/sched: enable/disable runtime stats 2022-01-10 10:38:06 -05:00
thread_stack.h kernel: macro to define pinned kernel thread stacks 2021-08-26 21:16:22 -04:00
thread.h kernel: Refactor SMP cpu initialization a bit 2022-03-01 09:59:15 -05:00