Skip to content

Commit f171f9e

Browse files
brooniectmarinas
authored andcommitted
arm64/fp: Make SVE and SME length register definition match architecture
Currently (as of DDI0487H.a) the architecture defines the vector length control field in ZCR and SMCR as being 4 bits wide with an additional 5 bits reserved above it marked as RAZ/WI for future expansion. The kernel currently attempts to anticipate such expansion by treating these extra bits as part of the LEN field but this will be inconvenient when we start generating the defines and would cause problems in the event that the architecture goes a different direction with these fields. Let's instead change the defines to reflect the currently defined architecture, we can update in future as needed. No change in behaviour should be seen in any system, even emulated systems using the maximum allowed vector length for the current architecture. Signed-off-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
1 parent 8c00c8f commit f171f9e

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

arch/arm64/include/asm/sysreg.h

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,26 +1113,16 @@
11131113
#define DCZID_DZP_SHIFT 4
11141114
#define DCZID_BS_SHIFT 0
11151115

1116-
/*
1117-
* The ZCR_ELx_LEN_* definitions intentionally include bits [8:4] which
1118-
* are reserved by the SVE architecture for future expansion of the LEN
1119-
* field, with compatible semantics.
1120-
*/
11211116
#define ZCR_ELx_LEN_SHIFT 0
1122-
#define ZCR_ELx_LEN_SIZE 9
1123-
#define ZCR_ELx_LEN_MASK 0x1ff
1117+
#define ZCR_ELx_LEN_SIZE 4
1118+
#define ZCR_ELx_LEN_MASK 0xf
11241119

11251120
#define SMCR_ELx_FA64_SHIFT 31
11261121
#define SMCR_ELx_FA64_MASK (1 << SMCR_ELx_FA64_SHIFT)
11271122

1128-
/*
1129-
* The SMCR_ELx_LEN_* definitions intentionally include bits [8:4] which
1130-
* are reserved by the SME architecture for future expansion of the LEN
1131-
* field, with compatible semantics.
1132-
*/
11331123
#define SMCR_ELx_LEN_SHIFT 0
1134-
#define SMCR_ELx_LEN_SIZE 9
1135-
#define SMCR_ELx_LEN_MASK 0x1ff
1124+
#define SMCR_ELx_LEN_SIZE 4
1125+
#define SMCR_ELx_LEN_MASK 0xf
11361126

11371127
#define CPACR_EL1_FPEN_EL1EN (BIT(20)) /* enable EL1 access */
11381128
#define CPACR_EL1_FPEN_EL0EN (BIT(21)) /* enable EL0 access, if EL1EN set */

0 commit comments

Comments
 (0)