riscv: cpufeature: Drop this_hwcap clear in T-Head vector workaround
PATCH 1/1 riscv: cpufeature: Drop this_hwcap clear in T-Head vector workaround
The variable this_hwcap is initialized to 0 for each loop, it is not necessary to do the bit clearance since this_hwcap is still 0 at this point, clearing the source_isa is enough here.
Signed-off-by Hui Wang <[email protected]>
--- arch/riscv/kernel/cpufeature.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
arch/riscv/kernel/cpufeature.c +1 -3
@@ -896,10 +896,8 @@ static void __init riscv_fill_hwcap_from_isa_string(unsigned long *isa2hwcap)* CPU cores with the ratified spec will contain non-zero * marchid. */ -if (acpi_disabled && boot_vendorid ==THEAD_VENDOR_ID && boot_archid ==0x0 ) { - this_hwcap &= ~isa2hwcap[RISCV_ISA_EXT_v]; +if (acpi_disabled && boot_vendorid ==THEAD_VENDOR_ID && boot_archid ==0x0 )clear_bit (RISCV_ISA_EXT_v, source_isa); - }riscv_resolve_isa (source_isa, isainfo->isa, &this_hwcap, isa2hwcap);
Signature · 7 lines
2.43.0 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
Paul Walmsley
maintainerQuoted 5 lines · Hui Wang
The variable
this_hwcapis initialized to 0 for each loop, it is not necessary to do the bit clearance sincethis_hwcapis still 0 at this point, clearing thesource_isais enough here.Signed-off-by Hui Wang <[email protected]>
Thanks, queued for v7.1-rc.
- Paul
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv