mirror of
https://github.com/torvalds/linux.git
synced 2026-01-12 00:42:35 +08:00
riscv: cpufeature: Fix Zk bundled extension missing Zknh
The Zk extension is a bundle consisting of Zkn, Zkr, and Zkt. The Zkn
extension itself is a bundle consisting of Zbkb, Zbkc, Zbkx, Zknd, Zkne,
and Zknh.
The current implementation of riscv_zk_bundled_exts manually listed
the dependencies but missed RISCV_ISA_EXT_ZKNH.
Fix this by introducing a RISCV_ISA_EXT_ZKN macro that lists the Zkn
components and using it in both riscv_zk_bundled_exts and
riscv_zkn_bundled_exts.
This adds the missing Zknh extension to Zk and reduces code duplication.
Fixes: 0d8295ed97 ("riscv: add ISA extension parsing for scalar crypto")
Link: https://patch.msgid.link/20231114141256.126749-4-cleger@rivosinc.com/
Signed-off-by: Guodong Xu <guodong@riscstar.com>
Reviewed-by: Clément Léger <cleger@rivosinc.com>
Link: https://patch.msgid.link/20251223-zk-missing-zknh-v1-1-b627c990ee1a@riscstar.com
Signed-off-by: Paul Walmsley <pjw@kernel.org>
This commit is contained in:
committed by
Paul Walmsley
parent
641ecc8900
commit
8632180daf
@@ -301,23 +301,22 @@ static const unsigned int riscv_a_exts[] = {
|
||||
RISCV_ISA_EXT_ZALRSC,
|
||||
};
|
||||
|
||||
#define RISCV_ISA_EXT_ZKN \
|
||||
RISCV_ISA_EXT_ZBKB, \
|
||||
RISCV_ISA_EXT_ZBKC, \
|
||||
RISCV_ISA_EXT_ZBKX, \
|
||||
RISCV_ISA_EXT_ZKND, \
|
||||
RISCV_ISA_EXT_ZKNE, \
|
||||
RISCV_ISA_EXT_ZKNH
|
||||
|
||||
static const unsigned int riscv_zk_bundled_exts[] = {
|
||||
RISCV_ISA_EXT_ZBKB,
|
||||
RISCV_ISA_EXT_ZBKC,
|
||||
RISCV_ISA_EXT_ZBKX,
|
||||
RISCV_ISA_EXT_ZKND,
|
||||
RISCV_ISA_EXT_ZKNE,
|
||||
RISCV_ISA_EXT_ZKN,
|
||||
RISCV_ISA_EXT_ZKR,
|
||||
RISCV_ISA_EXT_ZKT,
|
||||
RISCV_ISA_EXT_ZKT
|
||||
};
|
||||
|
||||
static const unsigned int riscv_zkn_bundled_exts[] = {
|
||||
RISCV_ISA_EXT_ZBKB,
|
||||
RISCV_ISA_EXT_ZBKC,
|
||||
RISCV_ISA_EXT_ZBKX,
|
||||
RISCV_ISA_EXT_ZKND,
|
||||
RISCV_ISA_EXT_ZKNE,
|
||||
RISCV_ISA_EXT_ZKNH,
|
||||
RISCV_ISA_EXT_ZKN
|
||||
};
|
||||
|
||||
static const unsigned int riscv_zks_bundled_exts[] = {
|
||||
|
||||
Reference in New Issue
Block a user