diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2017-04-03 14:38:04 -0400 |
---|---|---|
committer | Christoffer Dall <cdall@linaro.org> | 2017-04-09 10:49:34 -0400 |
commit | 0b51c547fdb7ee05b6d65471785a1d899c8a667c (patch) | |
tree | 4174536093de2937f730e4a4ad0f92454b911460 | |
parent | ecb5d61daaa2fc09235191926ea808e00e2e1c0c (diff) |
arm64: hyp-stub/KVM: Kill __hyp_get_vectors
Nobody is using __hyp_get_vectors anymore, so let's remove both
implementations (hyp-stub and KVM).
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <cdall@linaro.org>
-rw-r--r-- | arch/arm64/include/asm/virt.h | 12 | ||||
-rw-r--r-- | arch/arm64/kernel/hyp-stub.S | 13 | ||||
-rw-r--r-- | arch/arm64/kvm/hyp-init.S | 7 | ||||
-rw-r--r-- | arch/arm64/kvm/hyp.S | 2 |
4 files changed, 7 insertions, 27 deletions
diff --git a/arch/arm64/include/asm/virt.h b/arch/arm64/include/asm/virt.h index 435514c52b0f..c5f89442785c 100644 --- a/arch/arm64/include/asm/virt.h +++ b/arch/arm64/include/asm/virt.h | |||
@@ -29,28 +29,25 @@ | |||
29 | * indirection of a function call (as implemented in hyp-stub.S). | 29 | * indirection of a function call (as implemented in hyp-stub.S). |
30 | */ | 30 | */ |
31 | 31 | ||
32 | /* HVC_GET_VECTORS - Return the value of the vbar_el2 register. */ | ||
33 | #define HVC_GET_VECTORS 0 | ||
34 | |||
35 | /* | 32 | /* |
36 | * HVC_SET_VECTORS - Set the value of the vbar_el2 register. | 33 | * HVC_SET_VECTORS - Set the value of the vbar_el2 register. |
37 | * | 34 | * |
38 | * @x1: Physical address of the new vector table. | 35 | * @x1: Physical address of the new vector table. |
39 | */ | 36 | */ |
40 | #define HVC_SET_VECTORS 1 | 37 | #define HVC_SET_VECTORS 0 |
41 | 38 | ||
42 | /* | 39 | /* |
43 | * HVC_SOFT_RESTART - CPU soft reset, used by the cpu_soft_restart routine. | 40 | * HVC_SOFT_RESTART - CPU soft reset, used by the cpu_soft_restart routine. |
44 | */ | 41 | */ |
45 | #define HVC_SOFT_RESTART 2 | 42 | #define HVC_SOFT_RESTART 1 |
46 | 43 | ||
47 | /* | 44 | /* |
48 | * HVC_RESET_VECTORS - Restore the vectors to the original HYP stubs | 45 | * HVC_RESET_VECTORS - Restore the vectors to the original HYP stubs |
49 | */ | 46 | */ |
50 | #define HVC_RESET_VECTORS 3 | 47 | #define HVC_RESET_VECTORS 2 |
51 | 48 | ||
52 | /* Max number of HYP stub hypercalls */ | 49 | /* Max number of HYP stub hypercalls */ |
53 | #define HVC_STUB_HCALL_NR 4 | 50 | #define HVC_STUB_HCALL_NR 3 |
54 | 51 | ||
55 | /* Error returned when an invalid stub number is passed into x0 */ | 52 | /* Error returned when an invalid stub number is passed into x0 */ |
56 | #define HVC_STUB_ERR 0xbadca11 | 53 | #define HVC_STUB_ERR 0xbadca11 |
@@ -77,7 +74,6 @@ | |||
77 | extern u32 __boot_cpu_mode[2]; | 74 | extern u32 __boot_cpu_mode[2]; |
78 | 75 | ||
79 | void __hyp_set_vectors(phys_addr_t phys_vector_base); | 76 | void __hyp_set_vectors(phys_addr_t phys_vector_base); |
80 | phys_addr_t __hyp_get_vectors(void); | ||
81 | void __hyp_reset_vectors(void); | 77 | void __hyp_reset_vectors(void); |
82 | 78 | ||
83 | /* Reports the availability of HYP mode */ | 79 | /* Reports the availability of HYP mode */ |
diff --git a/arch/arm64/kernel/hyp-stub.S b/arch/arm64/kernel/hyp-stub.S index 8226fd90f73c..d55604d91e33 100644 --- a/arch/arm64/kernel/hyp-stub.S +++ b/arch/arm64/kernel/hyp-stub.S | |||
@@ -55,12 +55,7 @@ ENDPROC(__hyp_stub_vectors) | |||
55 | .align 11 | 55 | .align 11 |
56 | 56 | ||
57 | el1_sync: | 57 | el1_sync: |
58 | cmp x0, #HVC_GET_VECTORS | 58 | cmp x0, #HVC_SET_VECTORS |
59 | b.ne 1f | ||
60 | mrs x0, vbar_el2 | ||
61 | b 9f | ||
62 | |||
63 | 1: cmp x0, #HVC_SET_VECTORS | ||
64 | b.ne 2f | 59 | b.ne 2f |
65 | msr vbar_el2, x1 | 60 | msr vbar_el2, x1 |
66 | b 9f | 61 | b 9f |
@@ -118,12 +113,6 @@ ENDPROC(\label) | |||
118 | * initialisation entry point. | 113 | * initialisation entry point. |
119 | */ | 114 | */ |
120 | 115 | ||
121 | ENTRY(__hyp_get_vectors) | ||
122 | mov x0, #HVC_GET_VECTORS | ||
123 | hvc #0 | ||
124 | ret | ||
125 | ENDPROC(__hyp_get_vectors) | ||
126 | |||
127 | ENTRY(__hyp_set_vectors) | 116 | ENTRY(__hyp_set_vectors) |
128 | mov x1, x0 | 117 | mov x1, x0 |
129 | mov x0, #HVC_SET_VECTORS | 118 | mov x0, #HVC_SET_VECTORS |
diff --git a/arch/arm64/kvm/hyp-init.S b/arch/arm64/kvm/hyp-init.S index 0ad34fd6d2fc..3734e6315cd7 100644 --- a/arch/arm64/kvm/hyp-init.S +++ b/arch/arm64/kvm/hyp-init.S | |||
@@ -124,12 +124,7 @@ __do_hyp_init: | |||
124 | ENDPROC(__kvm_hyp_init) | 124 | ENDPROC(__kvm_hyp_init) |
125 | 125 | ||
126 | ENTRY(__kvm_handle_stub_hvc) | 126 | ENTRY(__kvm_handle_stub_hvc) |
127 | cmp x0, #HVC_GET_VECTORS | 127 | cmp x0, #HVC_SOFT_RESTART |
128 | b.ne 1f | ||
129 | mrs x0, vbar_el2 | ||
130 | b exit | ||
131 | |||
132 | 1: cmp x0, #HVC_SOFT_RESTART | ||
133 | b.ne 1f | 128 | b.ne 1f |
134 | 129 | ||
135 | /* This is where we're about to jump, staying at EL2 */ | 130 | /* This is where we're about to jump, staying at EL2 */ |
diff --git a/arch/arm64/kvm/hyp.S b/arch/arm64/kvm/hyp.S index f6f20b58d65a..952f6cb9cf72 100644 --- a/arch/arm64/kvm/hyp.S +++ b/arch/arm64/kvm/hyp.S | |||
@@ -36,7 +36,7 @@ | |||
36 | * passed in x0. | 36 | * passed in x0. |
37 | * | 37 | * |
38 | * A function pointer with a value less than 0xfff has a special meaning, | 38 | * A function pointer with a value less than 0xfff has a special meaning, |
39 | * and is used to implement __hyp_get_vectors in the same way as in | 39 | * and is used to implement hyp stubs in the same way as in |
40 | * arch/arm64/kernel/hyp_stub.S. | 40 | * arch/arm64/kernel/hyp_stub.S. |
41 | */ | 41 | */ |
42 | ENTRY(__kvm_call_hyp) | 42 | ENTRY(__kvm_call_hyp) |