mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
riscv: Add Zicclsm to cpufeature and hwprobe
Zicclsm requires misaligned support for all regular load and store instructions, both scalar and vector, but not AMOs or other specialized forms of memory access, to main memory regions with both the cacheability and coherence PMAs, as defined in the profiles spec. Even though mandated, misaligned loads and stores might execute extremely slowly. Standard software distributions should assume their existence only for correctness, not for performance. Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Reviewed-by: Andy Chiu <andy.chiu@sifive.com> Reviewed-by: Charlie Jenkins <charlie@rivosinc.com> Tested-by: Charlie Jenkins <charlie@rivosinc.com> Signed-off-by: Jesse Taube <jesse@rivosinc.com> [andrew.jones: Rebased, rewrote doc text, minor commit message revisions] Signed-off-by: Andrew Jones <andrew.jones@oss.qualcomm.com> Signed-off-by: Guodong Xu <docular.xu@gmail.com> Link: https://patch.msgid.link/20260701-rva23u64-hwprobe-v2-v5-5-2c61f94a695a@gmail.com [pjw@kernel.org: updated to apply; added Andrew's username to his tag comments] Signed-off-by: Paul Walmsley <pjw@kernel.org>
This commit is contained in:
parent
fdef048705
commit
3cd63bc30c
|
|
@ -401,3 +401,7 @@ The following keys are defined:
|
|||
as defined in version 1.0 of the RISC-V Control-flow Integrity (CFI)
|
||||
extensions specification, ratified in commit 302a2d45c243
|
||||
("Update build-pdf.yml") of riscv-cfi.
|
||||
|
||||
* :c:macro:`RISCV_HWPROBE_EXT_ZICCLSM`: The Zicclsm extension is supported,
|
||||
as defined in the RISC-V Profiles specification starting from commit
|
||||
b1d80660 ("Updated to ratified state.")
|
||||
|
|
|
|||
|
|
@ -118,6 +118,7 @@
|
|||
#define RISCV_ISA_EXT_SSCCFG 109
|
||||
#define RISCV_ISA_EXT_SMCDELEG 110
|
||||
#define RISCV_ISA_EXT_SSQOSID 111
|
||||
#define RISCV_ISA_EXT_ZICCLSM 112
|
||||
|
||||
#define RISCV_ISA_EXT_XLINUXENVCFG 127
|
||||
|
||||
|
|
|
|||
|
|
@ -116,6 +116,7 @@ struct riscv_hwprobe {
|
|||
#define RISCV_HWPROBE_KEY_ZICBOP_BLOCK_SIZE 15
|
||||
#define RISCV_HWPROBE_KEY_IMA_EXT_1 16
|
||||
#define RISCV_HWPROBE_EXT_ZICFISS (1ULL << 0)
|
||||
#define RISCV_HWPROBE_EXT_ZICCLSM (1ULL << 1)
|
||||
|
||||
/* Increase RISCV_HWPROBE_MAX_KEY when adding items. */
|
||||
|
||||
|
|
|
|||
|
|
@ -525,6 +525,7 @@ const struct riscv_isa_ext_data riscv_isa_ext[] = {
|
|||
__RISCV_ISA_EXT_SUPERSET_VALIDATE(zicbom, RISCV_ISA_EXT_ZICBOM, riscv_xlinuxenvcfg_exts, riscv_ext_zicbom_validate),
|
||||
__RISCV_ISA_EXT_DATA_VALIDATE(zicbop, RISCV_ISA_EXT_ZICBOP, riscv_ext_zicbop_validate),
|
||||
__RISCV_ISA_EXT_SUPERSET_VALIDATE(zicboz, RISCV_ISA_EXT_ZICBOZ, riscv_xlinuxenvcfg_exts, riscv_ext_zicboz_validate),
|
||||
__RISCV_ISA_EXT_DATA(zicclsm, RISCV_ISA_EXT_ZICCLSM),
|
||||
__RISCV_ISA_EXT_DATA(ziccrse, RISCV_ISA_EXT_ZICCRSE),
|
||||
__RISCV_ISA_EXT_SUPERSET_VALIDATE(zicfilp, RISCV_ISA_EXT_ZICFILP, riscv_xlinuxenvcfg_exts,
|
||||
riscv_cfilp_validate),
|
||||
|
|
|
|||
|
|
@ -202,6 +202,7 @@ static void hwprobe_isa_ext1(struct riscv_hwprobe *pair,
|
|||
* in the hart_isa bitmap, are made.
|
||||
*/
|
||||
EXT_KEY(isainfo->isa, ZICFISS, pair->value, missing);
|
||||
EXT_KEY(isainfo->isa, ZICCLSM, pair->value, missing);
|
||||
}
|
||||
|
||||
/* Now turn off reporting features if any CPU is missing it. */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user