]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
arm64: sysreg: Move to use definitions for all the SCTLR bits
authorJames Morse <james.morse@arm.com>
Mon, 15 Jan 2018 19:38:55 +0000 (19:38 +0000)
committerSeth Forshee <seth.forshee@canonical.com>
Fri, 16 Mar 2018 15:45:25 +0000 (10:45 -0500)
commit995019915dd27b0195cd672477a069f178ea2780
tree8790d8e321d251686aff443e96939cb109604a5d
parent4852b9db32a51bf5b8e324de366fe7ddd3054601
arm64: sysreg: Move to use definitions for all the SCTLR bits

BugLink: http://bugs.launchpad.net/bugs/1756096
__cpu_setup() configures SCTLR_EL1 using some hard coded hex masks,
and el2_setup() duplicates some this when setting RES1 bits.

Lets make this the same as KVM's hyp_init, which uses named bits.

First, we add definitions for all the SCTLR_EL{1,2} bits, the RES{1,0}
bits, and those we want to set or clear.

Add a build_bug checks to ensures all bits are either set or clear.
This means we don't need to preserve endian-ness configuration
generated elsewhere.

Finally, move the head.S and proc.S users of these hard-coded masks
over to the macro versions.

Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit 7a00d68ebe5f07cb1db17e7fedfd031f0d87e8bb)
Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
arch/arm64/include/asm/sysreg.h
arch/arm64/kernel/head.S
arch/arm64/mm/proc.S