xtensa: SMP: fix secondary CPU initialization
authorMax Filippov <jcmvbkbc@gmail.com>
Fri, 21 Dec 2018 16:26:20 +0000 (08:26 -0800)
committerMax Filippov <jcmvbkbc@gmail.com>
Sat, 26 Jan 2019 10:02:13 +0000 (02:02 -0800)
commit32a7726c4f4aadfabdb82440d84f88a5a2c8fe13
tree5cdf2947f361d0d90c3322f3121316f93870bd5c
parent4fe8713b873fc881284722ce4ac47995de7cf62c
xtensa: SMP: fix secondary CPU initialization

- 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>
arch/xtensa/kernel/head.S
arch/xtensa/kernel/smp.c