[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240418-harsh-childlike-94403aa132b3@wendy>
Date: Thu, 18 Apr 2024 10:54:12 +0100
From: Conor Dooley <conor.dooley@...rochip.com>
To: Andy Chiu <andy.chiu@...ive.com>
CC: Paul Walmsley <paul.walmsley@...ive.com>, Palmer Dabbelt
<palmer@...belt.com>, Albert Ou <aou@...s.berkeley.edu>, Heiko Stuebner
<heiko@...ech.de>, Guo Ren <guoren@...nel.org>, Conor Dooley
<conor@...nel.org>, Rob Herring <robh@...nel.org>, Krzysztof Kozlowski
<krzysztof.kozlowski+dt@...aro.org>, Jonathan Corbet <corbet@....net>, Evan
Green <evan@...osinc.com>, Clément Léger
<cleger@...osinc.com>, Shuah Khan <shuah@...nel.org>,
<linux-riscv@...ts.infradead.org>, <linux-kernel@...r.kernel.org>, Palmer
Dabbelt <palmer@...osinc.com>, Vincent Chen <vincent.chen@...ive.com>,
Greentime Hu <greentime.hu@...ive.com>, <devicetree@...r.kernel.org>,
<linux-doc@...r.kernel.org>, <linux-kselftest@...r.kernel.org>
Subject: Re: [PATCH v4 1/9] riscv: vector: add a comment when calling
riscv_setup_vsize()
On Fri, Apr 12, 2024 at 02:48:57PM +0800, Andy Chiu wrote:
> The function would fail when it detects the calling hart's vlen doesn't
> match the first one's. The boot hart is the first hart calling this
> function during riscv_fill_hwcap, so it is impossible to fail here. Add
> a comment about this behavior.
>
> Signed-off-by: Andy Chiu <andy.chiu@...ive.com>
> ---
> Changelog v2:
> - update the comment (Conor)
> ---
> arch/riscv/kernel/cpufeature.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c
> index 3ed2359eae35..d22b12072579 100644
> --- a/arch/riscv/kernel/cpufeature.c
> +++ b/arch/riscv/kernel/cpufeature.c
> @@ -683,6 +683,10 @@ void __init riscv_fill_hwcap(void)
> }
>
> if (elf_hwcap & COMPAT_HWCAP_ISA_V) {
> + /*
> + * This callsite can't fail here. It cannot fail when called on
> + * the boot hart.
I am loathe to comment on this again, so
Reviewed-by: Conor Dooley <conor.dooley@...rochip.com>
but you could just write this as "This cannot fail when called on the
boot hart."
Cheers,
Conor.
> + */
> riscv_v_setup_vsize();
> /*
> * ISA string in device tree might have 'v' flag, but
>
> --
> 2.44.0.rc2
>
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists