From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2E78B15ECCB; Wed, 24 Apr 2024 14:22:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.199 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713968532; cv=none; b=VbmSvt8fuAdSwYyS7wC3aKMAbSEIBE1SfB4fWYHYBLMImj9Zjb2Cfrudd4pxA8G9u/+kPnRRLEMslXgOsDj6w7vghDn/pKzmUvafTT7Lb90I7d9nqwgdY/1z0AQuKxIeYRkBo5jbkjpHOjCI1SCdm9hPpiYg5AZ3T78QBggOk2U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713968532; c=relaxed/simple; bh=bKd7H00rDt0Or6kdVYu+lE7iFOzMdHEuVtRzVbC9rds=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=cz842Sd9IiINssqBB0lEvRCLC12pfAhBf8LKf2EFuqw9vrItBcCrsT8jPegCgc/alKVP4KWQlol0GasJWRED9fOZGpEL+6w4RhASbH+Ntten1mwGrf7dMtldjg4MWp/3KNjElw9TmAkYYkM8Qn7wASTO95wnquv9xijmYcIWUCU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ghiti.fr; spf=pass smtp.mailfrom=ghiti.fr; arc=none smtp.client-ip=217.70.183.199 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ghiti.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ghiti.fr Received: by mail.gandi.net (Postfix) with ESMTPSA id 2E576FF809; Wed, 24 Apr 2024 14:22:02 +0000 (UTC) Message-ID: <6c624361-a968-498b-a9fb-ea2aaec70ce8@ghiti.fr> Date: Wed, 24 Apr 2024 16:22:02 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 06/17] riscv: Fix extension subset checking Content-Language: en-US To: Charlie Jenkins , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Guo Ren , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Conor Dooley , Evan Green , =?UTF-8?B?Q2zDqW1lbnQgTMOpZ2Vy?= , Jonathan Corbet , Shuah Khan Cc: linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Palmer Dabbelt , linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org References: <20240420-dev-charlie-support_thead_vector_6_9-v3-0-67cff4271d1d@rivosinc.com> <20240420-dev-charlie-support_thead_vector_6_9-v3-6-67cff4271d1d@rivosinc.com> From: Alexandre Ghiti In-Reply-To: <20240420-dev-charlie-support_thead_vector_6_9-v3-6-67cff4271d1d@rivosinc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-GND-Sasl: alex@ghiti.fr 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 > Reviewed-by: Conor Dooley > 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. You can add: Reviewed-by: Alexandre Ghiti Thanks, Alex From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 890CFC4345F for ; Wed, 24 Apr 2024 14:22:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=pJaBKS/2fODXhdsuxEfsJIteNpUptBd+Dt2u1yebAhM=; b=Rhjk87KQBxJ/Ws de9Y15QVJ4jJzl16zc4DoQNdpv8MjlPJFyKHKmtv3YU4DjWq9JTAO/ODTijDGRQyBajsD0bJSyeIu cLHh5cM2Z8eng/0csfRFgrAdUA0Bi+zxYxemyiq6ZWLyaNuM8nAT7fGsJwUjRimiXathGp1B9yYFc PXWILKcUzWuQaB8SVitqcqRPRxKsQTv3ONOUOjRy27cf8VnP2axAWy/fqNTz8/wa1Bziz/l/3iOUi zE/7rCRNOBctrOkwgl2NE0EjG3X6tlasn4/9VrdFD5BsZiFCkwqaJO8C23RuKrqGIq36NY2deaIKx n1ev2kZMCq+VCtP7gM6g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzdVp-00000004T91-2NKN; Wed, 24 Apr 2024 14:22:17 +0000 Received: from relay9-d.mail.gandi.net ([2001:4b98:dc4:8::229]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzdVk-00000004T5s-1V7P; Wed, 24 Apr 2024 14:22:15 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 2E576FF809; Wed, 24 Apr 2024 14:22:02 +0000 (UTC) Message-ID: <6c624361-a968-498b-a9fb-ea2aaec70ce8@ghiti.fr> Date: Wed, 24 Apr 2024 16:22:02 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 06/17] riscv: Fix extension subset checking Content-Language: en-US To: Charlie Jenkins , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Guo Ren , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Conor Dooley , Evan Green , =?UTF-8?B?Q2zDqW1lbnQgTMOpZ2Vy?= , Jonathan Corbet , Shuah Khan Cc: linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Palmer Dabbelt , linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org References: <20240420-dev-charlie-support_thead_vector_6_9-v3-0-67cff4271d1d@rivosinc.com> <20240420-dev-charlie-support_thead_vector_6_9-v3-6-67cff4271d1d@rivosinc.com> From: Alexandre Ghiti In-Reply-To: <20240420-dev-charlie-support_thead_vector_6_9-v3-6-67cff4271d1d@rivosinc.com> X-GND-Sasl: alex@ghiti.fr X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240424_072212_658981_69D4000A X-CRM114-Status: GOOD ( 17.45 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org 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 > Reviewed-by: Conor Dooley > 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. You can add: Reviewed-by: Alexandre Ghiti Thanks, Alex _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 13DFAC4345F for ; Wed, 24 Apr 2024 14:22:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=pHJ0PbrEGblSBol4c2ILcGxh4Q9yy+ji3rQ3XGzt/3M=; b=O8f6TAvoRwpK+b Czy5PP714Nt5o4Scq+EKjFK+wSw6NWkNnD5MwhSmWin2CiFg10wGO2lTUqNLnn2C+YSrzdM5XI9Se klg9b1pN2fawECDq3W/zV+SPtCX81CcuAjIw3L9bgifXHOmKxp25phubaLsOV31c+l+4SUIkcIBKH teKkIBNliVwJMOUdluYd2qXWcGdO+ecgWWlC9Giy+3GkqhfW1bIHivJ1BUL7GR1ALFXTfYYWNc2PU Ya21c9f3jLYZOqThaLFPn5jJcjB4+Sww+Ascr/ZsSlJRfs6HWLol/xIr53c6gLmxI0RBAlMyB7aBi cfNCDDUmKsw4VjDqaAaw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzdVo-00000004T8e-2zbR; Wed, 24 Apr 2024 14:22:16 +0000 Received: from relay9-d.mail.gandi.net ([2001:4b98:dc4:8::229]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rzdVk-00000004T5s-1V7P; Wed, 24 Apr 2024 14:22:15 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 2E576FF809; Wed, 24 Apr 2024 14:22:02 +0000 (UTC) Message-ID: <6c624361-a968-498b-a9fb-ea2aaec70ce8@ghiti.fr> Date: Wed, 24 Apr 2024 16:22:02 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 06/17] riscv: Fix extension subset checking Content-Language: en-US To: Charlie Jenkins , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Paul Walmsley , Palmer Dabbelt , Albert Ou , Guo Ren , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Conor Dooley , Evan Green , =?UTF-8?B?Q2zDqW1lbnQgTMOpZ2Vy?= , Jonathan Corbet , Shuah Khan Cc: linux-riscv@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Palmer Dabbelt , linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org References: <20240420-dev-charlie-support_thead_vector_6_9-v3-0-67cff4271d1d@rivosinc.com> <20240420-dev-charlie-support_thead_vector_6_9-v3-6-67cff4271d1d@rivosinc.com> From: Alexandre Ghiti In-Reply-To: <20240420-dev-charlie-support_thead_vector_6_9-v3-6-67cff4271d1d@rivosinc.com> X-GND-Sasl: alex@ghiti.fr X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240424_072212_658981_69D4000A X-CRM114-Status: GOOD ( 17.45 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 > Reviewed-by: Conor Dooley > 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. You can add: Reviewed-by: Alexandre Ghiti Thanks, Alex _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel