diff options
author | York Sun <yorksun@freescale.com> | 2015-11-12 20:38:21 (GMT) |
---|---|---|
committer | York Sun <yorksun@freescale.com> | 2015-11-30 17:11:12 (GMT) |
commit | 1f6236f06b1bb219492d7ae3c17232090128da2c (patch) | |
tree | 8f10424c2b2e353802eb2117a160b0c4b50bd463 | |
parent | da305b9f57cd459a26d276390f699666a5d8bc4f (diff) | |
download | u-boot-1f6236f06b1bb219492d7ae3c17232090128da2c.tar.xz |
armv8: fsl-layerscape: Fix "cpu release" command
When one core is released, other cores may not have valid entry
address. Those cores are trapped by "wfe" and wait for further
instruction. When their address is set, they need to be kicked
off by "sev".
Signed-off-by: York Sun <yorksun@freescale.com>
-rw-r--r-- | arch/arm/cpu/armv8/fsl-layerscape/mp.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/mp.c b/arch/arm/cpu/armv8/fsl-layerscape/mp.c index 0d600db..df7ffb8 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/mp.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/mp.c @@ -192,6 +192,12 @@ int cpu_release(int nr, int argc, char * const argv[]) (unsigned long)table + SPIN_TABLE_ELEM_SIZE); asm volatile("dsb st"); smp_kick_all_cpus(); /* only those with entry addr set will run */ + /* + * When the first release command runs, all cores are set to go. Those + * without a valid entry address will be trapped by "wfe". "sev" kicks + * them off to check the address again. When set, they continue to run. + */ + asm volatile("sev"); return 0; } |