acrn-kernel/arch
Clément Léger a38c1e766f 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: 956d705dd2 ("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>
2023-12-13 18:39:16 +01:00
..
alpha alpha: remove __init annotation from exported page_is_ram() 2023-08-16 18:27:31 +02:00
arc ARC: atomics: Add compiler barrier to atomic operations... 2023-09-19 12:28:04 +02:00
arm ARM: dts: imx28-xea: Pass the 'model' property 2023-12-13 18:39:16 +01:00
arm64 arm64: dts: imx8mp: imx8mq: Add parkmode-disable-ss-quirk on DWC3 2023-12-13 18:39:15 +01:00
csky csky: fix up lock_mm_and_find_vma() conversion 2023-07-01 13:16:27 +02:00
hexagon mm/fault: convert remaining simple cases to lock_mm_and_find_vma() 2023-07-01 13:16:25 +02:00
ia64 ia64/cpu: Switch to arch_cpu_finalize_init() 2023-08-08 20:03:46 +02:00
loongarch LoongArch: Mark __percpu functions as always inline 2023-11-28 17:07:19 +00:00
m68k m68k: Fix invalid .section syntax 2023-09-13 09:42:21 +02:00
microblaze mm: always expand the stack with the mmap write lock held 2023-07-01 13:16:25 +02:00
mips MIPS: KVM: Fix a build warning about variable set but not used 2023-12-03 07:32:09 +01:00
nios2 mm/fault: convert remaining simple cases to lock_mm_and_find_vma() 2023-07-01 13:16:25 +02:00
openrisc mm: always expand the stack with the mmap write lock held 2023-07-01 13:16:25 +02:00
parisc parisc: Mark altinstructions read-only and 32-bit aligned 2023-12-08 08:51:16 +01:00
powerpc powerpc: Don't clobber f0/vs0 during fp|altivec register save 2023-12-08 08:51:15 +01:00
riscv riscv: fix misaligned access handling of C.SWSP and C.SDSP 2023-12-13 18:39:16 +01:00
s390 s390/cmma: fix detection of DAT pages 2023-11-28 17:07:14 +00:00
sh sh: bios: Revive earlyprintk support 2023-11-20 11:52:07 +01:00
sparc sparc32: fix a braino in fault handling in csum_and_copy_..._user() 2023-11-02 09:35:32 +01:00
um um: Fix hostaudio build errors 2023-09-13 09:42:58 +02:00
x86 x86/tdx: Allow 32-bit emulation by default 2023-12-13 18:39:05 +01:00
xtensa xtensa: boot/lib: fix function prototypes 2023-10-06 14:56:49 +02:00
.gitignore
Kconfig init: Provide arch_cpu_finalize_init() 2023-08-08 20:03:46 +02:00