aboutsummaryrefslogtreecommitdiff
path: root/arch/arm64/kernel/cpu_errata.c
diff options
context:
space:
mode:
authorMark Rutland <[email protected]>2018-07-11 14:56:37 +0100
committerWill Deacon <[email protected]>2018-07-12 14:40:38 +0100
commit1c312e84c2d71da4101754fa6118f703f7473e01 (patch)
treeed4fdb6154157dc4d354127370cf6491a1b45bd7 /arch/arm64/kernel/cpu_errata.c
parent3eb6f1f9e6364d5eca1ddf3c9e963c5916069190 (diff)
arm64: move SCTLR_EL{1,2} assertions to <asm/sysreg.h>
Currently we assert that the SCTLR_EL{1,2}_{SET,CLEAR} bits are self-consistent with an assertion in config_sctlr_el1(). This is a bit unusual, since config_sctlr_el1() doesn't make use of these definitions, and is far away from the definitions themselves. We can use the CPP #error directive to have equivalent assertions in <asm/sysreg.h>, next to the definitions of the set/clear bits, which is a bit clearer and simpler. At the same time, lets fill in the upper 32 bits for both registers in their respective RES0 definitions. This could be a little nicer with GENMASK_ULL(63, 32), but this currently lives in <linux/bitops.h>, which cannot safely be included from assembly, as <asm/sysreg.h> can. Note the when the preprocessor evaluates an expression for an #if directive, all signed or unsigned values are treated as intmax_t or uintmax_t respectively. To avoid ambiguity, we define explicitly define the mask of all 64 bits. Signed-off-by: Mark Rutland <[email protected]> Acked-by: Catalin Marinas <[email protected]> Cc: Dave Martin <[email protected]> Cc: James Morse <[email protected]> Cc: Will Deacon <[email protected]> Signed-off-by: Will Deacon <[email protected]>
Diffstat (limited to 'arch/arm64/kernel/cpu_errata.c')
0 files changed, 0 insertions, 0 deletions