[PATCH v3 06/17] riscv: Fix extension subset checking
Conor Dooley
conor at kernel.org
Wed Apr 24 07:51:54 PDT 2024
On Wed, Apr 24, 2024 at 04:22:02PM +0200, Alexandre Ghiti wrote:
> Hi Charlie,
>
> On 21/04/2024 03:04, Charlie Jenkins wrote:
> > 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 <charlie at rivosinc.com>
> > Reviewed-by: Conor Dooley <conor.dooley at microchip.com>
> > 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 48874aac4871..b537731cadef 100644
> > --- a/arch/riscv/kernel/cpufeature.c
> > +++ b/arch/riscv/kernel/cpufeature.c
> > @@ -609,7 +609,7 @@ static int __init riscv_fill_hwcap_from_ext_list(unsigned long *isa2hwcap)
> > if (ext->subset_ext_size) {
> > for (int j = 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);
> > }
> > }
> >
>
> I think this should go into -fixes, let's check with Palmer if he wants to
> take this patch only or if you should send the patch on its own.
I think splitting out this and patch 1 into a new series targeting fixes
would probably make things clearer?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-riscv/attachments/20240424/d8dd90d6/attachment.sig>
More information about the linux-riscv
mailing list