From nobody Mon Feb 9 23:30:41 2026 Received: from mail-pl1-f179.google.com (mail-pl1-f179.google.com [209.85.214.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2503913959F for ; Fri, 3 May 2024 04:50:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714711859; cv=none; b=UoBGW1ShNCCevpal8pqbyyNKSd8g8R55wP4JOOVRM5bfs8Vxp+3RTA/NHomXU+NlqChZxG2+Bf7TcOyxXX2gA4Ed1eoGjTMgHlSq51k4VtYFtGq8uzIFMWyKWjiCns4XkJWDB0IwR3b9rHSfKvx2ol3nk6t1+Th07bbQcPAgMyY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714711859; c=relaxed/simple; bh=TuTVSbXhC2+Pf7yEowJN8gfvY+TdoOJRAjnj2qooZU8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=pVsg5rfL3OHf8xn7lCpAV1h0ZNeXav1kXDguGu8p9X0hqU4Sg/LTrEVKzN/4adliLdgkdd8Czjz9T6/sTZUw9RukBtfFPPHjx+JaXtbooBD5uW/lVLYpfzIj1B8sgdvRicDzAENLQNfM/hY5SfPpV4yiuRKYOJeCU0osyfh4UjU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=xEokoUz0; arc=none smtp.client-ip=209.85.214.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="xEokoUz0" Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-1ed41eb3382so1273715ad.0 for ; Thu, 02 May 2024 21:50:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1714711857; x=1715316657; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=7J8+4BPg11tVammG7iU8LBCVcp0HAz7W5E4tQ6iskcc=; b=xEokoUz0nHaZ+OsGmh64obMsyimka54QYDLK5L25Y8Mnym6Jf8Xf74YMREKz8VAlg+ Mu+TkljfuuYy8sokKji8LgDRAxWin84DSybbg9/+KVAyvYB0V1HzXq5lF+Ex7pXRC2CF MV8FQFzItGKyufKgBtPoQA/FPGtdqA+nf9Ly8AHxCfntI7BI55CxSnAzaDg6a1SlFEjc c3nKJeaw0HEFAUy0b1Ei3rcjt+FJeRF0bMGlB+REwHkEZ4BFSIqTmMAoEkCc4DMDaVFs v497J5kI/rPzMplIDMEWeLx0haOMklIWsxYXRqk5fJfDWIibPp7o7CeYuv2qPg6WDIa/ 4qzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714711857; x=1715316657; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7J8+4BPg11tVammG7iU8LBCVcp0HAz7W5E4tQ6iskcc=; b=Z0pOC+JvrNfX0UBx2Ecpu4G43bv6SWhE0oalr1E6ZLPpbwiY8A6TkAD9wpJqxe3tga XINI0pKHHRcVl9GXFI+HEXthyt+uqhVtu2ufy0helXCb6IORjl/UA0+b4HWzKRtG8fQn g7izVZaolJitPtD09q9O3C6yNMEXuyn2mLmbktS2nnSb692h4Nic+DmIdLwwJpLLw1mS RCDwjiG/R7FLml504vti5dOxE6tei4CLLk9P58jIoL3muMbHj9pxFr9WecUjJAMIJcxb aUhLoB0X+UKEU7DZB4Pgf59MUYY8Rqs7cyPPWYoslv2Iv2jKiTNXisCOpoXDQ/YClLXH Jvhg== X-Forwarded-Encrypted: i=1; AJvYcCUR2GZVWZI5ASEbY0MJ0IIoMISi29/jYOWKMumKmHDT8d0RI7hxgZdY66tCqfD1SSOF4ShohodmCcWj4PVd68vgO1iRIWnn54vrnYWO X-Gm-Message-State: AOJu0YzmEKha3/qaoRy2ySs1JKMdIx/LJO5BAR0uAjS1+oqj5oCxjpP8 C3E1KC96XGH3ys7MLzpAt/kanIDDUkSjH1x+u6pSqXLANcxX4/f7/wBcHzBZAZo= X-Google-Smtp-Source: AGHT+IE2GM/FT0Bn/phAha5Olfrwy5UPqVYHFI/KC1ovLGni/veB92iOt5IkZk5eHeVdspJeej9buw== X-Received: by 2002:a17:903:246:b0:1e5:d021:cf58 with SMTP id j6-20020a170903024600b001e5d021cf58mr1945544plh.36.1714711857409; Thu, 02 May 2024 21:50:57 -0700 (PDT) Received: from charlie.ba.rivosinc.com ([64.71.180.162]) by smtp.gmail.com with ESMTPSA id li11-20020a170903294b00b001e3c77db2aesm2276384plb.88.2024.05.02.21.50.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 21:50:54 -0700 (PDT) From: Charlie Jenkins Date: Thu, 02 May 2024 21:50:50 -0700 Subject: [PATCH v4 1/2] riscv: cpufeature: Fix thead vector hwcap removal Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240502-cpufeature_fixes-v4-1-b3d1a088722d@rivosinc.com> References: <20240502-cpufeature_fixes-v4-0-b3d1a088722d@rivosinc.com> In-Reply-To: <20240502-cpufeature_fixes-v4-0-b3d1a088722d@rivosinc.com> To: Paul Walmsley , Palmer Dabbelt , Albert Ou , Guo Ren , Conor Dooley , Conor Dooley , =?utf-8?q?Cl=C3=A9ment_L=C3=A9ger?= , Evan Green Cc: Palmer Dabbelt , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Charlie Jenkins X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1714711851; l=4634; i=charlie@rivosinc.com; s=20231120; h=from:subject:message-id; bh=TuTVSbXhC2+Pf7yEowJN8gfvY+TdoOJRAjnj2qooZU8=; b=QqmJvtQyLn100wNUhTZKNDHlffN3SHuM3dGD+WP+ZSJN+94mkJDGWHu4cu0YHNBzMywFInnmG uKF6sHe4L9OCxlWy+zEPhROi9Hq8yPPqN0T1U2x+j1PsHO3R1wmlm/X X-Developer-Key: i=charlie@rivosinc.com; a=ed25519; pk=t4RSWpMV1q5lf/NWIeR9z58bcje60/dbtxxmoSfBEcs= The riscv_cpuinfo struct that contains mvendorid and marchid is not populated until all harts are booted which happens after the DT parsing. Use the mvendorid/marchid from the boot hart to determine if the DT contains an invalid V. Fixes: d82f32202e0d ("RISC-V: Ignore V from the riscv,isa DT property on ol= der T-Head CPUs") Signed-off-by: Charlie Jenkins Reviewed-by: Conor Dooley Reviewed-by: Guo Ren --- arch/riscv/include/asm/sbi.h | 2 ++ arch/riscv/kernel/cpu.c | 40 ++++++++++++++++++++++++++++++++++++--= -- arch/riscv/kernel/cpufeature.c | 8 ++++++-- 3 files changed, 44 insertions(+), 6 deletions(-) diff --git a/arch/riscv/include/asm/sbi.h b/arch/riscv/include/asm/sbi.h index 6e68f8dff76b..0fab508a65b3 100644 --- a/arch/riscv/include/asm/sbi.h +++ b/arch/riscv/include/asm/sbi.h @@ -370,6 +370,8 @@ static inline int sbi_remote_fence_i(const struct cpuma= sk *cpu_mask) { return -1 static inline void sbi_init(void) {} #endif /* CONFIG_RISCV_SBI */ =20 +unsigned long riscv_get_mvendorid(void); +unsigned long riscv_get_marchid(void); unsigned long riscv_cached_mvendorid(unsigned int cpu_id); unsigned long riscv_cached_marchid(unsigned int cpu_id); unsigned long riscv_cached_mimpid(unsigned int cpu_id); diff --git a/arch/riscv/kernel/cpu.c b/arch/riscv/kernel/cpu.c index d11d6320fb0d..c1f3655238fd 100644 --- a/arch/riscv/kernel/cpu.c +++ b/arch/riscv/kernel/cpu.c @@ -139,6 +139,34 @@ int riscv_of_parent_hartid(struct device_node *node, u= nsigned long *hartid) return -1; } =20 +unsigned long __init riscv_get_marchid(void) +{ + struct riscv_cpuinfo *ci =3D this_cpu_ptr(&riscv_cpuinfo); + +#if IS_ENABLED(CONFIG_RISCV_SBI) + ci->marchid =3D sbi_spec_is_0_1() ? 0 : sbi_get_marchid(); +#elif IS_ENABLED(CONFIG_RISCV_M_MODE) + ci->marchid =3D csr_read(CSR_MARCHID); +#else + ci->marchid =3D 0; +#endif + return ci->marchid; +} + +unsigned long __init riscv_get_mvendorid(void) +{ + struct riscv_cpuinfo *ci =3D this_cpu_ptr(&riscv_cpuinfo); + +#if IS_ENABLED(CONFIG_RISCV_SBI) + ci->mvendorid =3D sbi_spec_is_0_1() ? 0 : sbi_get_mvendorid(); +#elif IS_ENABLED(CONFIG_RISCV_M_MODE) + ci->mvendorid =3D csr_read(CSR_MVENDORID); +#else + ci->mvendorid =3D 0; +#endif + return ci->mvendorid; +} + DEFINE_PER_CPU(struct riscv_cpuinfo, riscv_cpuinfo); =20 unsigned long riscv_cached_mvendorid(unsigned int cpu_id) @@ -170,12 +198,16 @@ static int riscv_cpuinfo_starting(unsigned int cpu) struct riscv_cpuinfo *ci =3D this_cpu_ptr(&riscv_cpuinfo); =20 #if IS_ENABLED(CONFIG_RISCV_SBI) - ci->mvendorid =3D sbi_spec_is_0_1() ? 0 : sbi_get_mvendorid(); - ci->marchid =3D sbi_spec_is_0_1() ? 0 : sbi_get_marchid(); + if (!ci->mvendorid) + ci->mvendorid =3D sbi_spec_is_0_1() ? 0 : sbi_get_mvendorid(); + if (!ci->marchid) + ci->marchid =3D sbi_spec_is_0_1() ? 0 : sbi_get_marchid(); ci->mimpid =3D sbi_spec_is_0_1() ? 0 : sbi_get_mimpid(); #elif IS_ENABLED(CONFIG_RISCV_M_MODE) - ci->mvendorid =3D csr_read(CSR_MVENDORID); - ci->marchid =3D csr_read(CSR_MARCHID); + if (!ci->mvendorid) + ci->mvendorid =3D csr_read(CSR_MVENDORID); + if (!ci->marchid) + ci->marchid =3D csr_read(CSR_MARCHID); ci->mimpid =3D csr_read(CSR_MIMPID); #else ci->mvendorid =3D 0; diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c index 3ed2359eae35..13d4fc0d1817 100644 --- a/arch/riscv/kernel/cpufeature.c +++ b/arch/riscv/kernel/cpufeature.c @@ -490,6 +490,8 @@ static void __init riscv_fill_hwcap_from_isa_string(uns= igned long *isa2hwcap) struct acpi_table_header *rhct; acpi_status status; unsigned int cpu; + u64 boot_vendorid; + u64 boot_archid; =20 if (!acpi_disabled) { status =3D acpi_get_table(ACPI_SIG_RHCT, 0, &rhct); @@ -497,6 +499,9 @@ static void __init riscv_fill_hwcap_from_isa_string(uns= igned long *isa2hwcap) return; } =20 + boot_vendorid =3D riscv_get_mvendorid(); + boot_archid =3D riscv_get_marchid(); + for_each_possible_cpu(cpu) { struct riscv_isainfo *isainfo =3D &hart_isa[cpu]; unsigned long this_hwcap =3D 0; @@ -544,8 +549,7 @@ static void __init riscv_fill_hwcap_from_isa_string(uns= igned long *isa2hwcap) * CPU cores with the ratified spec will contain non-zero * marchid. */ - if (acpi_disabled && riscv_cached_mvendorid(cpu) =3D=3D THEAD_VENDOR_ID = && - riscv_cached_marchid(cpu) =3D=3D 0x0) { + if (acpi_disabled && boot_vendorid =3D=3D THEAD_VENDOR_ID && boot_archid= =3D=3D 0x0) { this_hwcap &=3D ~isa2hwcap[RISCV_ISA_EXT_v]; clear_bit(RISCV_ISA_EXT_v, isainfo->isa); } --=20 2.44.0 From nobody Mon Feb 9 23:30:41 2026 Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com [209.85.215.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 673D813A256 for ; Fri, 3 May 2024 04:51:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714711863; cv=none; b=ee0GMB8wl+4HEj9wYBc3G4iQNtVsTpwKoYgBgnRh6uX6MuIztx2sNTIIEBdxS57p/Xf0OpX5fpjIE8f6KmtkNzpZuiGVzmEcW8RebS27vvQJMH1bmS2FouVPSNHRAhwGQBBuR56bCLTypTKbWwAft7kgvF8PFwnAFo38vkfxvls= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714711863; c=relaxed/simple; bh=aClvRhkni8+VngBib+tXbyLWgA3xiyhnWY6l4lDY2FI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Gjbt1jXnRyWmgrOIengGMHepV38fHNQ5Z5lrF/t6SeK/+JyRPxY5khrOe71uehdPDYjYa88ZF9a2w433zt7zZ3Lj/nWVUxPyA8TbCwQB+2I2SVuwBcysSin4UnGBKqbjF4OLPPgolabWM3qj3fUIcfSrmEO4Mvly/if3LzuTwr4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com; spf=pass smtp.mailfrom=rivosinc.com; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b=A0fmQPTw; arc=none smtp.client-ip=209.85.215.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=rivosinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=rivosinc-com.20230601.gappssmtp.com header.i=@rivosinc-com.20230601.gappssmtp.com header.b="A0fmQPTw" Received: by mail-pg1-f178.google.com with SMTP id 41be03b00d2f7-602801ea164so5967629a12.0 for ; Thu, 02 May 2024 21:51:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rivosinc-com.20230601.gappssmtp.com; s=20230601; t=1714711862; x=1715316662; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=vtwC5CithaOsyDnX18EUQqmgLnixhsZn53ghod6HD4Y=; b=A0fmQPTwPQt+hnzMkhsdI3xnEzBKHGTojDsdY/fbRbDd7GKLkJhSHWBqC58JmIbtS7 RYxEjHs7JmLrG37VRrm1b/w0hxO4NgxkdvtyqdvKkuw4LmHUbX87XMx/UOzQlDiJ8UAB d9++7nkaodKJ3aGkMIrwvaO+GQCi8RJ6xj5x7OL9NMMV7YLTraiQ1xY8J8/n6GMM1ra9 vUeJQh1/2bOD618IwKpfDwW6o7slbkVqBRy2VIO+hPMzaq9+gE4AaYqobaPulWoPkibV GG9jJYc5Rm3PP9hTxeA1wMLgHs6vkmCWcsbAO32qyEagZd/s2MoxTAmtfpoo43+btKkC Wz0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714711862; x=1715316662; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vtwC5CithaOsyDnX18EUQqmgLnixhsZn53ghod6HD4Y=; b=HosSaWHEDQkxnjxMuaQV+GFTvfgoR+YKEyRKmyHNgsX1jZWp3ULZkP7kfkxOqgdjJR uFjMqWs0BQDt0USUq6/J6XJmlBZx4gQA09fkmSSs8kfFbs28ER29syuGWRxGW3unKleZ hhN8UnJuSSGwusYH1VRsdb3gUoHfBaqUfQ1Q8TGu35zWmeqGZFdxYwrnIAUJPskIu7XU ZOX9wtFnAyX902X9uwPQmAcSB1QjMd91OWH9D1Dej9XHGUkQqVdXsJUfi90vqE7KMYJq i5sti/jeKgmxX1TAjH0zuR+0TDjqQHrRgRgrqdL8FZxsaRnCWyMJS1DeFpMwngWVX5G0 LAoA== X-Forwarded-Encrypted: i=1; AJvYcCWutdNhmDTCER7zZdPqapfmnb3iKQ+jJ/85gwyJy6KM+/VpJ0gdJv8U7azKzJO+KHDysxx7Nl0+BsMVKsX9G/7m3QZFUuJyKFWX4sJZ X-Gm-Message-State: AOJu0Yz2T+j5gRtbckwSEqTgL1qfOgxN/DA19ahj+PSsie1KphFPQsnC T/aX4LZYRq28CsmLV5unm3qnhdD1sT0dAhp98Sp5nhCDYiXlXToO3CALAGs8ZVs= X-Google-Smtp-Source: AGHT+IHfmJLnWNlQ+jLqowVWeSehnNZwiNPlCiwptv1oonBtcaPkYBu1VzKgOUEcLWxXtlfYGmWvRw== X-Received: by 2002:a05:6a20:258c:b0:1a9:ffa0:d007 with SMTP id k12-20020a056a20258c00b001a9ffa0d007mr1997150pzd.58.1714711861757; Thu, 02 May 2024 21:51:01 -0700 (PDT) Received: from charlie.ba.rivosinc.com ([64.71.180.162]) by smtp.gmail.com with ESMTPSA id li11-20020a170903294b00b001e3c77db2aesm2276384plb.88.2024.05.02.21.50.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 21:50:58 -0700 (PDT) From: Charlie Jenkins Date: Thu, 02 May 2024 21:50:51 -0700 Subject: [PATCH v4 2/2] riscv: cpufeature: Fix extension subset checking Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240502-cpufeature_fixes-v4-2-b3d1a088722d@rivosinc.com> References: <20240502-cpufeature_fixes-v4-0-b3d1a088722d@rivosinc.com> In-Reply-To: <20240502-cpufeature_fixes-v4-0-b3d1a088722d@rivosinc.com> To: Paul Walmsley , Palmer Dabbelt , Albert Ou , Guo Ren , Conor Dooley , Conor Dooley , =?utf-8?q?Cl=C3=A9ment_L=C3=A9ger?= , Evan Green Cc: Palmer Dabbelt , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Charlie Jenkins , Alexandre Ghiti , Andrew Jones X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1714711851; l=1173; i=charlie@rivosinc.com; s=20231120; h=from:subject:message-id; bh=aClvRhkni8+VngBib+tXbyLWgA3xiyhnWY6l4lDY2FI=; b=gwRqVJm01uxvkdlrQKBBOn3dquKs2d0HbChFUuQQkjkWjU4Pgd55dBFMK5u5tp3XbrAvXtJiV gG2bGvn4tcMBAHUDeEUo4MTq+EhGf2AyyVTIO2ihJ6xqFiTuHUUJ79s X-Developer-Key: i=charlie@rivosinc.com; a=ed25519; pk=t4RSWpMV1q5lf/NWIeR9z58bcje60/dbtxxmoSfBEcs= This loop is supposed to check if ext->subset_ext_ids[j] is valid, rather than if ext->subset_ext_ids[i] is valid, before setting the extension id ext->subset_ext_ids[j] in isainfo->isa. Signed-off-by: Charlie Jenkins Reviewed-by: Conor Dooley Reviewed-by: Alexandre Ghiti Reviewed-by: Andrew Jones Fixes: 0d8295ed975b ("riscv: add ISA extension parsing for scalar crypto") --- arch/riscv/kernel/cpufeature.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c index 13d4fc0d1817..5ef48cb20ee1 100644 --- a/arch/riscv/kernel/cpufeature.c +++ b/arch/riscv/kernel/cpufeature.c @@ -603,7 +603,7 @@ static int __init riscv_fill_hwcap_from_ext_list(unsign= ed long *isa2hwcap) =20 if (ext->subset_ext_size) { for (int j =3D 0; j < ext->subset_ext_size; j++) { - if (riscv_isa_extension_check(ext->subset_ext_ids[i])) + if (riscv_isa_extension_check(ext->subset_ext_ids[j])) set_bit(ext->subset_ext_ids[j], isainfo->isa); } } --=20 2.44.0