riscv: Add runtime constant support
authorCharlie Jenkins <charlie@rivosinc.com>
Wed, 19 Mar 2025 18:35:20 +0000 (11:35 -0700)
committerAlexandre Ghiti <alexghiti@rivosinc.com>
Thu, 20 Mar 2025 09:15:03 +0000 (09:15 +0000)
commita44fb5722199de8338d991db5ad3d509192179bb
tree739fb9d592484a63d1f2f64d78c05fc2e928e18b
parentafa8a93932aa63b107d81bd438454760d8c7c8a3
riscv: Add runtime constant support

Implement the runtime constant infrastructure for riscv. Use this
infrastructure to generate constants to be used by the d_hash()
function.

This is the riscv variant of commit 94a2bc0f611c ("arm64: add 'runtime
constant' support") and commit e3c92e81711d ("runtime constants: add
x86 architecture support").

[ alex: Remove trailing whitespace ]

Signed-off-by: Charlie Jenkins <charlie@rivosinc.com>
Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Tested-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Link: https://lore.kernel.org/r/20250319-runtime_const_riscv-v10-2-745b31a11d65@rivosinc.com
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
arch/riscv/Kconfig
arch/riscv/include/asm/asm.h
arch/riscv/include/asm/runtime-const.h [new file with mode: 0644]
arch/riscv/kernel/vmlinux.lds.S