arm64: alternatives: use tpidr_el2 on VHE hosts
authorJames Morse <james.morse@arm.com>
Mon, 8 Jan 2018 15:38:06 +0000 (15:38 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Sat, 13 Jan 2018 10:44:33 +0000 (10:44 +0000)
commit6d99b68933fbcf51f84fcbba49246ce1209ec193
tree894dd012b15f34f5c31f952fb52fc51485f24e9b
parentc97e166e54b662717d20ec2e36761758d2b6a7c2
arm64: alternatives: use tpidr_el2 on VHE hosts

Now that KVM uses tpidr_el2 in the same way as Linux's cpu_offset in
tpidr_el1, merge the two. This saves KVM from save/restoring tpidr_el1
on VHE hosts, and allows future code to blindly access per-cpu variables
without triggering world-switch.

Signed-off-by: James Morse <james.morse@arm.com>
Reviewed-by: Christoffer Dall <cdall@linaro.org>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/alternative.h
arch/arm64/include/asm/assembler.h
arch/arm64/include/asm/percpu.h
arch/arm64/kernel/alternative.c
arch/arm64/kernel/cpufeature.c
arch/arm64/mm/proc.S