From: Conor Dooley <conor@kernel.org>
To: Heiko Stuebner <heiko@sntech.de>
Cc: linux-riscv@lists.infradead.org, palmer@dabbelt.com,
christoph.muellner@vrull.eu, philipp.tomsich@vrull.eu,
ajones@ventanamicro.com, jszhang@kernel.org,
Heiko Stuebner <heiko.stuebner@vrull.eu>
Subject: Re: [PATCH 1/4] RISC-V: use bit-values instead of numbers to identify patched cpu-features
Date: Sat, 14 Jan 2023 17:54:27 +0000 [thread overview]
Message-ID: <Y8LsUyEHMRriwhZ5@spud> (raw)
In-Reply-To: <20230113212351.3534769-2-heiko@sntech.de>
[-- Attachment #1.1: Type: text/plain, Size: 1326 bytes --]
On Fri, Jan 13, 2023 at 10:23:48PM +0100, Heiko Stuebner wrote:
> From: Heiko Stuebner <heiko.stuebner@vrull.eu>
>
> RISC-V cpufeatures are often based on available extensions and maybe even
> some combination of them. Using a bitfield for the errata-id gives us a
> simple way to also require a combination of extensions for a specific
> alternative patch.
>
> Signed-off-by: Heiko Stuebner <heiko.stuebner@vrull.eu>
> ---
> diff --git a/arch/riscv/kernel/cpufeature.c b/arch/riscv/kernel/cpufeature.c
> index 7bfc6eb9a5cf..8c83bd9d0e22 100644
> --- a/arch/riscv/kernel/cpufeature.c
> +++ b/arch/riscv/kernel/cpufeature.c
> @@ -350,13 +350,13 @@ static u32 __init_or_module cpufeature_probe(unsigned int stage)
> u32 cpu_req_feature = 0;
>
> if (cpufeature_probe_svpbmt(stage))
> - cpu_req_feature |= BIT(CPUFEATURE_SVPBMT);
> + cpu_req_feature |= CPUFEATURE_SVPBMT;
>
> if (cpufeature_probe_zicbom(stage))
> - cpu_req_feature |= BIT(CPUFEATURE_ZICBOM);
> + cpu_req_feature |= CPUFEATURE_ZICBOM;
I know the behaviour isn't changing here, but using a bit per feature
seems like scarily few, especially if people come along with variants
they want for all the various dinky extensions that exit.
Probably gonna need an iteration on this stuff in the not-too-distant
future...
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
[-- Attachment #2: Type: text/plain, Size: 161 bytes --]
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2023-01-14 17:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-13 21:23 [PATCH 0/4] Zbb + fast-unaligned string optimization Heiko Stuebner
2023-01-13 21:23 ` [PATCH 1/4] RISC-V: use bit-values instead of numbers to identify patched cpu-features Heiko Stuebner
2023-01-14 17:54 ` Conor Dooley [this message]
2023-01-13 21:23 ` [PATCH 2/4] RISC-V: add alternative-field for bits to not match against Heiko Stuebner
2023-01-14 17:44 ` Conor Dooley
2023-01-17 12:41 ` Andrew Jones
2023-01-13 21:23 ` [PATCH 3/4] RISC-V: add cpufeature probing for fast-unaligned access Heiko Stuebner
2023-01-13 21:23 ` [PATCH 4/4] RISC-V: add strcmp variant using zbb and " Heiko Stuebner
2023-05-11 21:06 ` [PATCH 0/4] Zbb + fast-unaligned string optimization Palmer Dabbelt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y8LsUyEHMRriwhZ5@spud \
--to=conor@kernel.org \
--cc=ajones@ventanamicro.com \
--cc=christoph.muellner@vrull.eu \
--cc=heiko.stuebner@vrull.eu \
--cc=heiko@sntech.de \
--cc=jszhang@kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=philipp.tomsich@vrull.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox