]> git.baikalelectronics.ru Git - uboot.git/commit
armv8: layerscape: fix spin-table support
authorMichael Walle <michael@walle.cc>
Mon, 1 Jun 2020 19:53:24 +0000 (21:53 +0200)
committerPriyanka Jain <priyanka.jain@nxp.com>
Mon, 27 Jul 2020 08:46:27 +0000 (14:16 +0530)
commit846bf3ed4b7be8d9ff018a0bcd54ffd087bec892
tree2d6c3c0b61ca705b60876b535c26016ffa2e9227
parentec1188efdfffba867dd76673abd80c72c91c996d
armv8: layerscape: fix spin-table support

Spin tables are broken with bootefi. This is because - in contrast to
the booti call chain - there is no call to smp_kick_all_cpus(). Due to
this missing call the secondary CPUs are never released from their "wait
for interrupt state", see secondary_boot_func() in lowlevel.S.

Originally, this "wait for interrupt" is there to make sure, the spin
table is cleared before the secondary cores read it for the first time.
But the boot flow for the layerscape architecture is different from
that. The CPUs are release from their BootROM _after_ U-Boot's
spin-table is cleared, see fsl_layerscape_wake_seconday_cores() in mp.c.
Thus, there is no need to wait for this interrupt and no need for
kicking all cores on cpu_release. An atomic 64bit write to the
spin-table and a "sev" is sufficient.

Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
arch/arm/cpu/armv8/fsl-layerscape/lowlevel.S
arch/arm/cpu/armv8/fsl-layerscape/mp.c