The actions SMP implementation has several issues:
1. pen_release is only ever read and compared to -1, and is defined in
arch/arm/kernel/smp.c to be -1. This test will always succeed.
2. we are already guaranteed to be single threaded while bringing up a
CPU, so the spinlock makes no sense, remove it.
3. owl_secondary_startup() is not referenced nor defined, the prototype
is redundant, remove it.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Commit 18cfd9429d simplified the S500 SMP
code by removing a loop for pen_release in owl_secondary_boot().
Since then it is only calling owl_v7_invalidate_l1() before branching to
secondary_startup().
The owl_v7_invalidate_l1() assembler function is superfluous, too.
Therefore drop owl_secondary_boot() and use secondary_boot() directly.
Fixes: 18cfd9429d ("ARM: owl: smp: Drop bogus holding pen")
Cc: David Liu <liuwei@actions-semi.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Replace an occurrence of virt_to_phys() with __pa_symbol() macro.
See 64fc2a947a ("ARM: 8641/1: treewide:
Replace uses of virt_to_phys with __pa_symbol").
Fixes: 172067e0bc ("ARM: owl: Implement CPU enable-method for S500")
Reported-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
The S500 SoC can start secondary CPUs without busy-looping for pen_release,
so simplify the SMP code compared to the LeMaker kernel tree.
Fixes: 172067e0bc ("ARM: owl: Implement CPU enable-method for S500")
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Cc: David Liu <liuwei@actions-semi.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>