arm64: Make BP hardening slot counter available
authorMarc Zyngier <marc.zyngier@arm.com>
Tue, 13 Mar 2018 12:40:39 +0000 (12:40 +0000)
committerMarc Zyngier <marc.zyngier@arm.com>
Mon, 19 Mar 2018 13:06:39 +0000 (13:06 +0000)
commit4205a89b8060141ac0216a507b9f70728f056a10
tree644f8d7106da0caa44d9fd4b73b3f0e0e37d3745
parentdc2e4633ff39c9fb5ef3a5443721f0e3499b36ed
arm64: Make BP hardening slot counter available

We're about to need to allocate hardening slots from other parts
of the kernel (in order to support ARM64_HARDEN_EL2_VECTORS).

Turn the counter into an atomic_t and make it available to the
rest of the kernel. Also add BP_HARDEN_EL2_SLOTS as the number of
slots instead of the hardcoded 4...

Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
arch/arm64/include/asm/mmu.h
arch/arm64/kernel/bpi.S
arch/arm64/kernel/cpu_errata.c