kernel_samsung_a53x/arch/riscv/kernel
Clément Léger 3ad9a4e4db riscv: fix misaligned access handling of C.SWSP and C.SDSP
[ Upstream commit 22e0eb04837a63af111fae35a92f7577676b9bc8 ]

This is a backport of a fix that was done in OpenSBI: ec0559eb315b
("lib: sbi_misaligned_ldst: Fix handling of C.SWSP and C.SDSP").

Unlike C.LWSP/C.LDSP, these encodings can be used with the zero
register, so checking that the rs2 field is non-zero is unnecessary.

Additionally, the previous check was incorrect since it was checking
the immediate field of the instruction instead of the rs2 field.

Fixes: 956d705dd279 ("riscv: Unaligned load/store handling for M_MODE")
Signed-off-by: Clément Léger <cleger@rivosinc.com>
Link: https://lore.kernel.org/r/20231103090223.702340-1-cleger@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-18 12:11:41 +01:00
..
vdso Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
asm-offsets.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cacheinfo.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpu-hotplug.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpu.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpu_ops.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpu_ops_sbi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpu_ops_spinwait.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpufeature.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
efi-header.S Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
efi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
entry.S Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fpu.S Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ftrace.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
head.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
head.S Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
image-vars.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jump_label.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kgdb.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mcount-dyn.S Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mcount.S Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
module-sections.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
module.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
patch.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
perf_callchain.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
perf_event.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
perf_regs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
process.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ptrace.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
reset.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
riscv_ksyms.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sbi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
setup.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
signal.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
smp.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
smpboot.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
soc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stacktrace.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sys_riscv.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
syscall_table.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
time.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_irq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace_irq.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
traps.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
traps_misaligned.c riscv: fix misaligned access handling of C.SWSP and C.SDSP 2024-11-18 12:11:41 +01:00
vdso.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vmlinux.lds.S Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00