summaryrefslogtreecommitdiff
path: root/arch/riscv/include/asm/hwcap.h
diff options
context:
space:
mode:
authorConor Dooley <conor.dooley@microchip.com>2023-07-13 13:11:07 +0100
committerPalmer Dabbelt <palmer@rivosinc.com>2023-07-25 16:26:23 -0700
commit90700a4fbfaf30bc792b72ddda5666a19ddd6c6a (patch)
tree18b912761ea460e75453f98882bcf7579e54fb95 /arch/riscv/include/asm/hwcap.h
parent4265b0ec5ee7bf64639cc088f378a51ca335b8a4 (diff)
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>
Diffstat (limited to 'arch/riscv/include/asm/hwcap.h')
-rw-r--r--arch/riscv/include/asm/hwcap.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/riscv/include/asm/hwcap.h b/arch/riscv/include/asm/hwcap.h
index a20e4ade1b53..e3cda14a486b 100644
--- a/arch/riscv/include/asm/hwcap.h
+++ b/arch/riscv/include/asm/hwcap.h
@@ -76,6 +76,7 @@ unsigned long riscv_get_elf_hwcap(void);
struct riscv_isa_ext_data {
const unsigned int id;
const char *name;
+ const char *property;
};
extern const struct riscv_isa_ext_data riscv_isa_ext[];