diff options
author | Mark Rutland <mark.rutland@arm.com> | 2018-07-11 14:56:37 +0100 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2018-07-12 14:40:38 +0100 |
commit | 1c312e84c2d71da4101754fa6118f703f7473e01 (patch) | |
tree | ed4fdb6154157dc4d354127370cf6491a1b45bd7 /net/9p | |
parent | 3eb6f1f9e6364d5eca1ddf3c9e963c5916069190 (diff) | |
download | linux-1c312e84c2d71da4101754fa6118f703f7473e01.tar.gz linux-1c312e84c2d71da4101754fa6118f703f7473e01.tar.bz2 linux-1c312e84c2d71da4101754fa6118f703f7473e01.zip |
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 <mark.rutland@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Dave Martin <dave.martin@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'net/9p')
0 files changed, 0 insertions, 0 deletions