linux/arch/riscv/kernel
Guo Ren 8ec1442953
riscv: patch_text: Fixup last cpu should be master
These patch_text implementations are using stop_machine_cpuslocked
infrastructure with atomic cpu_count. The original idea: When the
master CPU patch_text, the others should wait for it. But current
implementation is using the first CPU as master, which couldn't
guarantee the remaining CPUs are waiting. This patch changes the
last CPU as the master to solve the potential risk.

Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Signed-off-by: Guo Ren <guoren@kernel.org>
Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org>
Fixes: 043cb41a85 ("riscv: introduce interfaces to patch kernel code")
Cc: stable@vger.kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
2022-04-22 08:29:24 -07:00
..
probes ftrace: disable preemption when recursion locked 2021-10-27 11:21:49 -04:00
vdso riscv/vdso: Add support for time namespaces 2021-10-04 14:16:43 -07:00
.gitignore
asm-offsets.c RISC-V: Add arch functions for non-retentive suspend entry/exit 2022-03-10 09:29:31 -08:00
cacheinfo.c drivers: base: cacheinfo: Get rid of DEFINE_SMP_CALL_CACHE_FUNCTION() 2021-09-01 10:29:10 +02:00
cpu_ops_sbi.c RISC-V: Declare per cpu boot data as static 2022-03-31 12:44:32 -07:00
cpu_ops_spinwait.c RISC-V: Use __cpu_up_stack/task_pointer only for spinwait method 2022-01-20 09:27:08 -08:00
cpu_ops.c RISC-V: Move spinwait booting method to its own config 2022-01-20 09:27:16 -08:00
cpu-hotplug.c riscv: cpu-hotplug: clear cpu from numa map when teardown 2022-02-10 09:16:50 -08:00
cpu.c riscv: cpu.c: don't use kernel-doc markers for comments 2022-03-31 15:42:46 -07:00
cpufeature.c RISC-V: Add sscofpmf extension support 2022-03-21 15:01:09 -07:00
crash_dump.c
crash_save_regs.S
efi-header.S
efi.c
entry.S RISC-V Patches for the 5.18 Merge Window, Part 1 2022-03-25 10:11:38 -07:00
fpu.S
ftrace.c ftrace: Cleanup ftrace_dyn_arch_init() 2021-10-08 19:41:39 -04:00
head.h RISC-V: Move spinwait booting method to its own config 2022-01-20 09:27:16 -08:00
head.S RISC-V: Add arch functions for non-retentive suspend entry/exit 2022-03-10 09:29:31 -08:00
image-vars.h
irq.c
jump_label.c
kexec_relocate.S riscv: Don't use va_pa_offset on kdump 2022-01-09 10:38:06 -08:00
kgdb.c
machine_kexec.c riscv: use hart id instead of cpu id on machine_kexec 2022-01-09 10:40:00 -08:00
Makefile RISC-V CPU Idle Support 2022-03-30 16:17:54 -07:00
mcount-dyn.S
mcount.S
module-sections.c
module.c RISC-V: module: fix apply_r_riscv_rcv_branch_rela typo 2022-03-31 13:20:11 -07:00
patch.c riscv: patch_text: Fixup last cpu should be master 2022-04-22 08:29:24 -07:00
perf_callchain.c riscv: Fix fill_callchain return value 2022-03-30 23:01:42 -07:00
perf_regs.c
process.c RISC-V: Enable CPU_IDLE drivers 2022-03-10 09:29:21 -08:00
ptrace.c ptrace: Create ptrace_report_syscall_{entry,exit} in ptrace.h 2022-03-10 13:35:08 -06:00
reset.c riscv: set default pm_power_off to NULL 2021-10-04 14:16:57 -07:00
riscv_ksyms.c
sbi.c RISC-V: Fix IPI/RFENCE hmask on non-monotonic hartid ordering 2022-02-14 12:27:45 -08:00
setup.c drivers/base/node: consolidate node device subsystem initialization in node_dev_init() 2022-03-22 15:57:10 -07:00
signal.c ptrace: Cleanups for v5.18 2022-03-28 17:29:53 -07:00
smp.c RISC-V: Use common riscv_cpuid_to_hartid_mask() for both SMP=y and SMP=n 2022-01-09 12:13:31 -08:00
smpboot.c RISC-V: Do not use cpumask data structure for hartid bitmap 2022-01-20 09:27:22 -08:00
soc.c
stacktrace.c riscv: Rename "sp_in_global" to "current_stack_pointer" 2022-03-30 15:15:27 -07:00
suspend_entry.S RISC-V: Add arch functions for non-retentive suspend entry/exit 2022-03-10 09:29:31 -08:00
suspend.c RISC-V: Add arch functions for non-retentive suspend entry/exit 2022-03-10 09:29:31 -08:00
sys_riscv.c
syscall_table.c riscv/vdso: Refactor asm/vdso.h 2021-10-02 13:42:23 -07:00
time.c RISC-V Patches for the 5.13 Merge Window, Part 1 2021-05-06 09:24:18 -07:00
trace_irq.c riscv: fix oops caused by irqsoff latency tracer 2022-02-24 20:30:30 -08:00
trace_irq.h riscv: fix oops caused by irqsoff latency tracer 2022-02-24 20:30:30 -08:00
traps_misaligned.c
traps.c exit: Add and use make_task_dead. 2021-12-13 12:04:45 -06:00
vdso.c riscv/vdso: Add support for time namespaces 2021-10-04 14:16:43 -07:00
vmlinux-xip.lds.S riscv: vmlinux.lds.S|vmlinux-xip.lds.S: remove .fixup section 2022-01-05 17:53:37 -08:00
vmlinux.lds.S riscv: vmlinux.lds.S|vmlinux-xip.lds.S: remove .fixup section 2022-01-05 17:53:37 -08:00