[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tencent_5B500856E30E1FB920B6B68D6315EE70CC06@qq.com>
Date: Thu, 14 Nov 2024 10:44:37 +0800
From: Yangyu Chen <cyy@...self.name>
To: Charlie Jenkins <charlie@...osinc.com>, Conor Dooley <conor@...nel.org>,
Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Paul Walmsley <paul.walmsley@...ive.com>, Palmer Dabbelt
<palmer@...belt.com>, Albert Ou <aou@...s.berkeley.edu>,
Jisheng Zhang <jszhang@...nel.org>, Chen-Yu Tsai <wens@...e.org>,
Jernej Skrabec <jernej.skrabec@...il.com>,
Samuel Holland <samuel@...lland.org>,
Samuel Holland <samuel.holland@...ive.com>, Jonathan Corbet
<corbet@....net>, Shuah Khan <shuah@...nel.org>, Guo Ren
<guoren@...nel.org>, Evan Green <evan@...osinc.com>,
Jessica Clarke <jrtc27@...c27.com>, Andrew Jones <ajones@...tanamicro.com>,
Andy Chiu <andybnac@...il.com>
Cc: linux-riscv@...ts.infradead.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-sunxi@...ts.linux.dev,
linux-doc@...r.kernel.org, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH v11 10/14] riscv: hwprobe: Add thead vendor extension
probing
On 11/14/24 10:21, Charlie Jenkins wrote:
> Add a new hwprobe key "RISCV_HWPROBE_KEY_VENDOR_EXT_THEAD_0" which
> allows userspace to probe for the new RISCV_ISA_VENDOR_EXT_XTHEADVECTOR
> vendor extension.
>
Hi Charlie,
How about changing the name of the key from
"RISCV_ISA_VENDOR_EXT_XTHEADVECTOR" to "RISCV_HWPROBE_KEY_VENDOR_EXT_0"
and use marchid to identify what the vendor is, each vendor will have
its own bit definition in this value. So we can avoid adding so many
hwprobe keys for each vendor in the future.
I proposed a commit here:
https://github.com/cyyself/linux/commit/36390645d85d1ac75dd71172f167719df4297f59
> This new key will allow userspace code to probe for which thead vendor
> extensions are supported. This API is modeled to be consistent with
> RISCV_HWPROBE_KEY_IMA_EXT_0. The bitmask returned will have each bit
> corresponding to a supported thead vendor extension of the cpumask set.
> Just like RISCV_HWPROBE_KEY_IMA_EXT_0, this allows a userspace program
> to determine all of the supported thead vendor extensions in one call.
>
> Signed-off-by: Charlie Jenkins <charlie@...osinc.com>
> Reviewed-by: Evan Green <evan@...osinc.com>
> ---
> arch/riscv/include/asm/hwprobe.h | 3 +-
> .../include/asm/vendor_extensions/thead_hwprobe.h | 19 +++++++++++
> .../include/asm/vendor_extensions/vendor_hwprobe.h | 37 ++++++++++++++++++++++
> arch/riscv/include/uapi/asm/hwprobe.h | 3 +-
> arch/riscv/include/uapi/asm/vendor/thead.h | 3 ++
> arch/riscv/kernel/sys_hwprobe.c | 5 +++
> arch/riscv/kernel/vendor_extensions/Makefile | 1 +
> .../riscv/kernel/vendor_extensions/thead_hwprobe.c | 19 +++++++++++
> 8 files changed, 88 insertions(+), 2 deletions(-)
>
Powered by blists - more mailing lists