summaryrefslogtreecommitdiff
path: root/arch/riscv/configs
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2022-01-31 14:26:22 +0100
committerPalmer Dabbelt <palmer@rivosinc.com>2022-02-14 12:27:45 -0800
commit5feef64f4c67068c49f5409d43c67cabf2327f66 (patch)
tree9ab6716e6c0be760c787c49717cf8aa00a4c7d53 /arch/riscv/configs
parent2b35d5b7d13062b805aa82dc53812a5f56249287 (diff)
RISC-V: Fix IPI/RFENCE hmask on non-monotonic hartid ordering
If the boot CPU does not have the lowest hartid, "hartid - hbase" can become negative, leading to an incorrect hmask, causing userspace to crash with SEGV. This is observed on e.g. Starlight Beta, where cpuid 1 maps to hartid 0, and cpuid 0 maps to hartid 1. Fix this by detecting this case, and shifting the accumulated mask and updating hbase, if possible. Fixes: 26fb751ca37846c9 ("RISC-V: Do not use cpumask data structure for hartid bitmap") Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Atish Patra <atishp@rivosinc.com> Tested-by: Atish Patra <atishp@rivosinc.com> Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Diffstat (limited to 'arch/riscv/configs')
0 files changed, 0 insertions, 0 deletions