kernel/init.c: Initialise logging subsystem after arch

So that logging and "satellite" subsystems, such as tracing and object
tracking can count on kernel structs being properly initialised, such
as `_current_cpu`.

Fixes #42061.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
This commit is contained in:
Ederson de Souza 2022-01-25 10:47:05 -08:00 committed by Anas Nashif
parent 3543df52cc
commit 75fd452bc0

View file

@ -400,11 +400,11 @@ FUNC_NORETURN void z_cstart(void)
/* gcov hook needed to get the coverage report.*/
gcov_static_init();
LOG_CORE_INIT();
/* perform any architecture-specific initialization */
arch_kernel_init();
LOG_CORE_INIT();
#if defined(CONFIG_MULTITHREADING)
/* Note: The z_ready_thread() call in prepare_multithreading() requires
* a dummy thread even if CONFIG_ARCH_HAS_CUSTOM_SWAP_TO_MAIN=y