]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xtensa: SMP: fix secondary CPU initialization
authorMax Filippov <jcmvbkbc@gmail.com>
Fri, 21 Dec 2018 16:26:20 +0000 (08:26 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Mar 2019 07:18:55 +0000 (08:18 +0100)
commit1c0a5536b07eec375e4e561909418dfcc8dcc0a3
treeebbb045b9ebd948cd0e4874456557b5c671ff05a
parent83237244df9c0887239df217163a93baecb9c3fb
xtensa: SMP: fix secondary CPU initialization

[ Upstream commit 32a7726c4f4aadfabdb82440d84f88a5a2c8fe13 ]

- add missing memory barriers to the secondary CPU synchronization spin
  loops; add comment to the matching memory barrier in the boot_secondary
  and __cpu_die functions;
- use READ_ONCE/WRITE_ONCE to access cpu_start_id/cpu_start_ccount
  instead of reading/writing them directly;
- re-initialize cpu_running every time before starting secondary CPU to
  flush possible previous CPU startup results.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/xtensa/kernel/head.S
arch/xtensa/kernel/smp.c