arch/xtensa: Don't clear BSS on MP startup when !SMP

It's legal to have CONFIG_MP_NUM_CPUS > 1 and !CONFIG_SMP.  The
tests/kernel/mp test does this as a unit test of the multiprocessor
facilities. Test the right tunable when deciding whether to blow away
static data or not.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
Andy Ross 2020-06-25 17:38:28 -07:00 committed by Anas Nashif
commit 47940a63d7

View file

@ -138,7 +138,7 @@ _start:
movi a0, 0
# endif
# ifdef CONFIG_SMP
# if CONFIG_MP_NUM_CPUS > 1
/* Only clear BSS when running on core 0 */
rsr a3, PRID
extui a3, a3, 0, 8 /* extract core ID */
@ -186,7 +186,7 @@ _start:
#endif /* !XCHAL_HAVE_BOOTLOADER */
#ifdef CONFIG_SMP
#if CONFIG_MP_NUM_CPUS > 1
/*
* z_cstart() is only for CPU #0.
* Other CPUs have different entry point.
@ -197,10 +197,9 @@ _start:
CALL z_mp_entry
2:
#endif /* CONFIG_SMP */
#endif
/* Enter C domain, never returns from here */
CALL z_cstart
.size _start, . - _start