Skip to content

Commit 98a5700

Browse files
AndybnACTpalmer-dabbelt
authored andcommitted
riscv: cpufeature: call match_isa_ext() for single-letter extensions
Single-letter extensions may also imply multiple subextensions. For example, Vector extension implies zve64d, and zve64d implies zve64f. Extension parsing for "riscv,isa-extensions" has the ability to resolve the dependency by calling match_isa_ext(). This patch makes deprecated parser call the same function for single letter extensions. Signed-off-by: Andy Chiu <[email protected]> Reviewed-by: Conor Dooley <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 38a94c4 commit 98a5700

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

arch/riscv/kernel/cpufeature.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -468,16 +468,15 @@ static void __init riscv_parse_isa_string(unsigned long *this_hwcap, struct risc
468468

469469
if (unlikely(ext_err))
470470
continue;
471+
472+
for (int i = 0; i < riscv_isa_ext_count; i++)
473+
match_isa_ext(&riscv_isa_ext[i], ext, ext_end, isainfo);
474+
471475
if (!ext_long) {
472476
int nr = tolower(*ext) - 'a';
473477

474-
if (riscv_isa_extension_check(nr)) {
478+
if (riscv_isa_extension_check(nr))
475479
*this_hwcap |= isa2hwcap[nr];
476-
set_bit(nr, isainfo->isa);
477-
}
478-
} else {
479-
for (int i = 0; i < riscv_isa_ext_count; i++)
480-
match_isa_ext(&riscv_isa_ext[i], ext, ext_end, isainfo);
481480
}
482481
}
483482
}

0 commit comments

Comments
 (0)