]> www.infradead.org Git - users/jedix/linux-maple.git/commit
riscv: Call riscv_user_isa_enable() only on the boot hart
authorSamuel Holland <samuel.holland@sifive.com>
Wed, 14 Aug 2024 08:10:56 +0000 (01:10 -0700)
committerPalmer Dabbelt <palmer@rivosinc.com>
Sat, 5 Oct 2024 15:51:15 +0000 (08:51 -0700)
commit368546ebe7e74cb6e18f17768533ab7077392a8c
tree2c724d5e18243f5e65a1a2d2d783c2ac15b69af6
parent5fc7355f01376e69964bb21b685025b042c37acc
riscv: Call riscv_user_isa_enable() only on the boot hart

Now that the [ms]envcfg CSR value is maintained per thread, not per
hart, riscv_user_isa_enable() only needs to be called once during boot,
to set the value for the init task. This also allows it to be marked as
__init.

Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Deepak Gupta <debug@rivosinc.com>
Signed-off-by: Samuel Holland <samuel.holland@sifive.com>
Reviewed-by: Charlie Jenkins <charlie@rivosinc.com>
Link: https://lore.kernel.org/r/20240814081126.956287-4-samuel.holland@sifive.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/include/asm/cpufeature.h
arch/riscv/kernel/cpufeature.c
arch/riscv/kernel/smpboot.c