a38c1e766f
[ 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:
|
||
---|---|---|
.. | ||
compat_vdso | ||
probes | ||
vdso | ||
.gitignore | ||
Makefile | ||
alternative.c | ||
asm-offsets.c | ||
cacheinfo.c | ||
compat_signal.c | ||
compat_syscall_table.c | ||
cpu-hotplug.c | ||
cpu.c | ||
cpu_ops.c | ||
cpu_ops_sbi.c | ||
cpu_ops_spinwait.c | ||
cpufeature.c | ||
crash_dump.c | ||
crash_save_regs.S | ||
efi-header.S | ||
efi.c | ||
elf_kexec.c | ||
entry.S | ||
fpu.S | ||
ftrace.c | ||
head.S | ||
head.h | ||
image-vars.h | ||
irq.c | ||
jump_label.c | ||
kexec_relocate.S | ||
kgdb.c | ||
machine_kexec.c | ||
machine_kexec_file.c | ||
mcount-dyn.S | ||
mcount.S | ||
module-sections.c | ||
module.c | ||
patch.c | ||
perf_callchain.c | ||
perf_regs.c | ||
process.c | ||
ptrace.c | ||
reset.c | ||
riscv_ksyms.c | ||
sbi.c | ||
setup.c | ||
signal.c | ||
smp.c | ||
smpboot.c | ||
soc.c | ||
stacktrace.c | ||
suspend.c | ||
suspend_entry.S | ||
sys_riscv.c | ||
syscall_table.c | ||
time.c | ||
trace_irq.c | ||
trace_irq.h | ||
traps.c | ||
traps_misaligned.c | ||
vdso.c | ||
vmlinux-xip.lds.S | ||
vmlinux.lds.S |