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:
parent
a704af4a3e
commit
47940a63d7
1 changed files with 3 additions and 4 deletions
|
@ -138,7 +138,7 @@ _start:
|
||||||
movi a0, 0
|
movi a0, 0
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
# ifdef CONFIG_SMP
|
# if CONFIG_MP_NUM_CPUS > 1
|
||||||
/* Only clear BSS when running on core 0 */
|
/* Only clear BSS when running on core 0 */
|
||||||
rsr a3, PRID
|
rsr a3, PRID
|
||||||
extui a3, a3, 0, 8 /* extract core ID */
|
extui a3, a3, 0, 8 /* extract core ID */
|
||||||
|
@ -186,7 +186,7 @@ _start:
|
||||||
|
|
||||||
#endif /* !XCHAL_HAVE_BOOTLOADER */
|
#endif /* !XCHAL_HAVE_BOOTLOADER */
|
||||||
|
|
||||||
#ifdef CONFIG_SMP
|
#if CONFIG_MP_NUM_CPUS > 1
|
||||||
/*
|
/*
|
||||||
* z_cstart() is only for CPU #0.
|
* z_cstart() is only for CPU #0.
|
||||||
* Other CPUs have different entry point.
|
* Other CPUs have different entry point.
|
||||||
|
@ -197,10 +197,9 @@ _start:
|
||||||
CALL z_mp_entry
|
CALL z_mp_entry
|
||||||
|
|
||||||
2:
|
2:
|
||||||
#endif /* CONFIG_SMP */
|
#endif
|
||||||
|
|
||||||
/* Enter C domain, never returns from here */
|
/* Enter C domain, never returns from here */
|
||||||
CALL z_cstart
|
CALL z_cstart
|
||||||
|
|
||||||
.size _start, . - _start
|
.size _start, . - _start
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue