linux/arch/riscv
Daniel Maslowski 10ffafb456 riscv/purgatory: align riscv_kernel_entry
commit fb197c5d2f upstream.

When alignment handling is delegated to the kernel, everything must be
word-aligned in purgatory, since the trap handler is then set to the
kexec one. Without the alignment, hitting the exception would
ultimately crash. On other occasions, the kernel's handler would take
care of exceptions.
This has been tested on a JH7110 SoC with oreboot and its SBI delegating
unaligned access exceptions and the kernel configured to handle them.

Fixes: 736e30af58 ("RISC-V: Add purgatory")
Signed-off-by: Daniel Maslowski <cyrevolt@gmail.com>
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Link: https://lore.kernel.org/r/20240719170437.247457-1-cyrevolt@gmail.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2024-11-14 13:15:17 +01:00
..
boot riscv: dts: sifive: add missing #interrupt-cells to pmic 2024-03-26 18:20:25 -04:00
configs riscv: enable CD-ROM file systems in defconfig 2022-08-25 17:01:09 -07:00
errata RISC-V: fix taking the text_mutex twice during sifive errata patching 2023-05-17 11:53:41 +02:00
include mm: remove kern_addr_valid() completely 2024-11-08 16:26:39 +01:00
kernel riscv: Remove duplicated GET_RM 2024-11-08 16:26:46 +01:00
kvm RISC-V: KVM: Fix sbiret init before forwarding to userspace 2024-10-17 15:20:37 +02:00
lib riscv: uaccess: Return the number of bytes effectively not copied 2023-08-23 17:52:38 +02:00
mm riscv: change XIP's kernel_map.size to be size of the entire kernel 2024-08-29 17:30:13 +02:00
net riscv, bpf: Make BPF_CMPXCHG fully ordered 2024-11-01 01:56:01 +01:00
purgatory riscv/purgatory: align riscv_kernel_entry 2024-11-14 13:15:17 +01:00
Kbuild riscv: move errata/ and kvm/ builds to arch/riscv/Kbuild 2022-06-01 22:26:32 -07:00
Kconfig riscv: define ILLEGAL_POINTER_VALUE for 64bit 2024-10-17 15:21:57 +02:00
Kconfig.debug RISC-V: Remove EARLY_PRINTK support 2018-12-17 10:23:46 -08:00
Kconfig.erratas riscv: make t-head erratas depend on MMU 2022-09-17 01:48:22 -07:00
Kconfig.socs riscv: Kconfig: Add select ARM_AMBA to SOC_STARFIVE 2023-12-13 18:39:29 +01:00
Makefile riscv: Handle zicsr/zifencei issues between clang and binutils 2023-03-30 12:49:28 +02:00