diff options
author | James Morse <james.morse@arm.com> | 2018-01-08 15:38:06 +0000 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2018-01-13 10:44:33 +0000 |
commit | 6d99b68933fbcf51f84fcbba49246ce1209ec193 (patch) | |
tree | 894dd012b15f34f5c31f952fb52fc51485f24e9b /arch/arm64/include/asm/alternative.h | |
parent | c97e166e54b662717d20ec2e36761758d2b6a7c2 (diff) | |
download | linux-6d99b68933fbcf51f84fcbba49246ce1209ec193.tar.gz |
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>
Diffstat (limited to 'arch/arm64/include/asm/alternative.h')
-rw-r--r-- | arch/arm64/include/asm/alternative.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/alternative.h b/arch/arm64/include/asm/alternative.h index 4a85c6952a22..669028172fd6 100644 --- a/arch/arm64/include/asm/alternative.h +++ b/arch/arm64/include/asm/alternative.h @@ -12,6 +12,8 @@ #include <linux/stddef.h> #include <linux/stringify.h> +extern int alternatives_applied; + struct alt_instr { s32 orig_offset; /* offset to original instruction */ s32 alt_offset; /* offset to replacement instruction */ |