RISC-V: enable extension detection from dedicated properties
authorConor Dooley <conor.dooley@microchip.com>
Thu, 13 Jul 2023 12:11:07 +0000 (13:11 +0100)
committerPalmer Dabbelt <palmer@rivosinc.com>
Tue, 25 Jul 2023 23:26:23 +0000 (16:26 -0700)
commit90700a4fbfaf30bc792b72ddda5666a19ddd6c6a
tree18b912761ea460e75453f98882bcf7579e54fb95
parent4265b0ec5ee7bf64639cc088f378a51ca335b8a4
RISC-V: enable extension detection from dedicated properties

Add support for parsing the new riscv,isa-extensions property in
riscv_fill_hwcap(), by means of a new "property" member of the
riscv_isa_ext_data struct. For now, this shadows the name of the
extension for all users, however this may not be the case for all
extensions, based on how the dt-binding is written.
For the sake of backwards compatibility, fall back to the old scheme
if the new properties are not detected. For now, just inform, rather
than warn, when that happens.

Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20230713-vocation-profane-39a74b3c2649@wendy
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/include/asm/hwcap.h
arch/riscv/kernel/cpufeature.c