Linux-RISC-V Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] riscv: cpufeature: Drop this_hwcap clear in T-Head vector workaround
@ 2026-04-30  4:53 Hui Wang
  2026-04-30 20:08 ` Paul Walmsley
  0 siblings, 1 reply; 2+ messages in thread
From: Hui Wang @ 2026-04-30  4:53 UTC (permalink / raw)
  To: linux-riscv, pjw, palmer, aou, alex; +Cc: hui.wang

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 <hui.wang@canonical.com>
---
 arch/riscv/kernel/cpufeature.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c
index 1734f9a4c2fd..3dc4c0d31550 100644
--- a/arch/riscv/kernel/cpufeature.c
+++ b/arch/riscv/kernel/cpufeature.c
@@ -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);
 
-- 
2.43.0


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] riscv: cpufeature: Drop this_hwcap clear in T-Head vector workaround
  2026-04-30  4:53 [PATCH] riscv: cpufeature: Drop this_hwcap clear in T-Head vector workaround Hui Wang
@ 2026-04-30 20:08 ` Paul Walmsley
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Walmsley @ 2026-04-30 20:08 UTC (permalink / raw)
  To: Hui Wang; +Cc: linux-riscv, pjw, palmer, aou, alex

On Thu, 30 Apr 2026, Hui Wang wrote:

> 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 <hui.wang@canonical.com>

Thanks, queued for v7.1-rc.


- Paul


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-04-30 20:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-30  4:53 [PATCH] riscv: cpufeature: Drop this_hwcap clear in T-Head vector workaround Hui Wang
2026-04-30 20:08 ` Paul Walmsley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox