zephyr/arch
Katsuhiro Suzuki 4ce5f7ebe1 arch: riscv: fix hangup of multicore boot
This patch fixes hangup of RISC-V multicore boot.
Currently boot sequence uses a riscv_cpu_wake_flag to notify wakeup
request for secondary core(s).

But initial value of riscv_cpu_wake_flag is undefined, so current
mechanism is going to hangup if riscv_cpu_wake_flag and mhartid of
secondary core have the same value.

This is an example situation of this problem:

- hart1: check riscv_cpu_wake_flag (value is 1) and end the loop
- hart1: set riscv_cpu_wake_flag to 0
- hart0: set riscv_cpu_wake_flag to 1
         hart0 expects it will be changed to 0 by hart1 but it
         has never happened

Note:
  - hart0's mhartid is 0, hart1's mhartid is 1
  - hart0 is main, hart1 is secondary in this example

Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>
2023-11-10 10:40:01 +01:00
..
arc arch: remove wait_q.h include 2023-09-12 12:55:36 -04:00
arm llext: use elf_rela_t instead of elf_rel_t 2023-11-09 18:21:27 +01:00
arm64 arch: arm64: avoid invalidating of RO mem after mem map 2023-11-09 10:19:12 +00:00
common arch: common: guard the compilation of sw_isr_common with CMakeLists.txt 2023-11-09 11:20:42 +01:00
mips COVERAGE: Fix COVERAGE_GCOV dependencies 2023-08-24 15:36:31 +02:00
nios2 arch: nios2: Remove unused absolute symbols 2023-04-18 10:51:28 -04:00
posix include: always use <> for Zephyr includes 2023-09-14 13:49:58 +02:00
riscv arch: riscv: fix hangup of multicore boot 2023-11-10 10:40:01 +01:00
sparc SPARC: Update the Flush windows software trap 2023-10-25 09:54:31 -05:00
x86 arch: x86: Use ACPICA typdef instead of struct name 2023-11-06 12:32:31 +01:00
xtensa xtensa: add custom mem range check functions 2023-10-20 15:08:34 +02:00
CMakeLists.txt cmake: enable -Wshadow partially for in-tree code 2023-08-22 11:39:58 +02:00
Kconfig kernel: init: conditional .bss section zeroing 2023-11-08 10:07:26 +01:00