+const struct riscv_isa_ext_data __initconst riscv_isa_ext[] = {
+ RISCV_ISA_EXT_DATA(i, RISCV_ISA_EXT_i),
+ RISCV_ISA_EXT_DATA(m, RISCV_ISA_EXT_m),
+ RISCV_ISA_EXT_DATA(a, RISCV_ISA_EXT_a),
+ RISCV_ISA_EXT_DATA(f, RISCV_ISA_EXT_f),
+ RISCV_ISA_EXT_DATA(d, RISCV_ISA_EXT_d),
+ RISCV_ISA_EXT_DATA(q, RISCV_ISA_EXT_q),
+ RISCV_ISA_EXT_DATA(h, RISCV_ISA_EXT_h),
+ RISCV_ISA_EXT_DATA(zicntr, RISCV_ISA_EXT_ZICNTR),
+ RISCV_ISA_EXT_DATA(zicsr, RISCV_ISA_EXT_ZICSR),
+ RISCV_ISA_EXT_DATA(zifencei, RISCV_ISA_EXT_ZIFENCEI),
+ RISCV_ISA_EXT_DATA(zihintpause, RISCV_ISA_EXT_ZIHINTPAUSE),
+ RISCV_ISA_EXT_DATA(zihpm, RISCV_ISA_EXT_ZIHPM),
+ RISCV_ISA_EXT_DATA(zbb, RISCV_ISA_EXT_ZBB),
+ RISCV_ISA_EXT_DATA(smaia, RISCV_ISA_EXT_SMAIA),
+ RISCV_ISA_EXT_DATA(ssaia, RISCV_ISA_EXT_SSAIA),
+};
+
+static const struct riscv_isa_ext_data __initconst required_extensions[] = {
+ RISCV_ISA_EXT_DATA(zicsr, RISCV_ISA_EXT_ZICSR),
+ RISCV_ISA_EXT_DATA(zihintpause, RISCV_ISA_EXT_ZIHINTPAUSE),
+ RISCV_ISA_EXT_DATA(zbb, RISCV_ISA_EXT_ZBB),
+};
Coming back to my earlier question regarding the B (pseudo-)extension:
Since riscv_isa_ext[] only contains Zbb, is it precluded anywhere in
the spec that DT may mention just B when all of its constituents are
supported?
Which gets me on to G, which is somewhat similar in nature to B. We
require G when RISCV_ISA_RV64G=y, yet required_extensions[] doesn't
name it or its constituents. Much like we require C when RISCV_ISA_C=y,
yet it's not in the table.