soc/intel_adsp: Correct errant ATOMCTL

This got broken during the cpu_init unification pass.  I appear to
have copied that zero out of code that initialized Zephyr on a
uniprocessor config somewhere.  But what it means is that any use of
the S32C1I instruction to store to any memory type will trap an
exception!  And even when CONFIG_MP_NUM_CPUS==1, we will emit code to
do that in the atomics layer when SMP=y.

That configuration ("SMP" with 1 cpu) is actually exercised by some
tests, including important ones like timer_api.  These got broken.
Fix.

Really it's never correct to have anything but 1:1:1 ("external RCW
transaction") on these CPUs.  All Intel cAVS processors have hardware
atomics support.  We owe it to all the code we'll run to make sure it
works as documented and doesn't explode.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
Andy Ross 2021-12-16 21:02:47 -08:00 committed by Anas Nashif
parent e4a455b25d
commit f4a0ea7b43

View file

@ -113,7 +113,7 @@ static ALWAYS_INLINE void cpu_early_init(void)
* local CPU! We need external transactions on the shared
* bus.
*/
reg = CONFIG_MP_NUM_CPUS == 1 ? 0 : 0x15;
reg = 0x15;
__asm__ volatile("wsr %0, ATOMCTL" :: "r"(reg));
/* Initialize interrupts to "disabled" */