diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2015-10-26 05:10:07 -0400 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2015-12-14 06:30:44 -0500 |
commit | 3ffa75cd18134a03f86f9d9b8b6e9128e0eda254 (patch) | |
tree | d21ecf5f6d09e3210c8f07912b831c613c9853e8 | |
parent | 23a13465c84c51ec4330863b59e9d50ee671f8b4 (diff) |
arm64: KVM: Remove weak attributes
As we've now switched to the new world switch implementation,
remove the weak attributes, as nobody is supposed to override
it anymore.
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
-rw-r--r-- | arch/arm64/kvm/hyp/debug-sr.c | 5 | ||||
-rw-r--r-- | arch/arm64/kvm/hyp/hyp-entry.S | 3 | ||||
-rw-r--r-- | arch/arm64/kvm/hyp/switch.c | 5 | ||||
-rw-r--r-- | arch/arm64/kvm/hyp/tlb.c | 16 | ||||
-rw-r--r-- | arch/arm64/kvm/hyp/vgic-v3-sr.c | 5 |
5 files changed, 13 insertions, 21 deletions
diff --git a/arch/arm64/kvm/hyp/debug-sr.c b/arch/arm64/kvm/hyp/debug-sr.c index 567a0d6aa1df..c9c1e97501a9 100644 --- a/arch/arm64/kvm/hyp/debug-sr.c +++ b/arch/arm64/kvm/hyp/debug-sr.c | |||
@@ -132,10 +132,9 @@ void __hyp_text __debug_cond_restore_host_state(struct kvm_vcpu *vcpu) | |||
132 | vcpu->arch.debug_flags &= ~KVM_ARM64_DEBUG_DIRTY; | 132 | vcpu->arch.debug_flags &= ~KVM_ARM64_DEBUG_DIRTY; |
133 | } | 133 | } |
134 | 134 | ||
135 | u32 __hyp_text __debug_read_mdcr_el2(void) | 135 | static u32 __hyp_text __debug_read_mdcr_el2(void) |
136 | { | 136 | { |
137 | return read_sysreg(mdcr_el2); | 137 | return read_sysreg(mdcr_el2); |
138 | } | 138 | } |
139 | 139 | ||
140 | __alias(__debug_read_mdcr_el2) | 140 | __alias(__debug_read_mdcr_el2) u32 __kvm_get_mdcr_el2(void); |
141 | u32 __weak __kvm_get_mdcr_el2(void); | ||
diff --git a/arch/arm64/kvm/hyp/hyp-entry.S b/arch/arm64/kvm/hyp/hyp-entry.S index 10d6d2a5390e..93e8d983c0bd 100644 --- a/arch/arm64/kvm/hyp/hyp-entry.S +++ b/arch/arm64/kvm/hyp/hyp-entry.S | |||
@@ -189,9 +189,7 @@ ENDPROC(\label) | |||
189 | 189 | ||
190 | .align 11 | 190 | .align 11 |
191 | 191 | ||
192 | .weak __kvm_hyp_vector | ||
193 | ENTRY(__kvm_hyp_vector) | 192 | ENTRY(__kvm_hyp_vector) |
194 | ENTRY(__hyp_vector) | ||
195 | ventry el2t_sync_invalid // Synchronous EL2t | 193 | ventry el2t_sync_invalid // Synchronous EL2t |
196 | ventry el2t_irq_invalid // IRQ EL2t | 194 | ventry el2t_irq_invalid // IRQ EL2t |
197 | ventry el2t_fiq_invalid // FIQ EL2t | 195 | ventry el2t_fiq_invalid // FIQ EL2t |
@@ -211,5 +209,4 @@ ENTRY(__hyp_vector) | |||
211 | ventry el1_irq // IRQ 32-bit EL1 | 209 | ventry el1_irq // IRQ 32-bit EL1 |
212 | ventry el1_fiq_invalid // FIQ 32-bit EL1 | 210 | ventry el1_fiq_invalid // FIQ 32-bit EL1 |
213 | ventry el1_error_invalid // Error 32-bit EL1 | 211 | ventry el1_error_invalid // Error 32-bit EL1 |
214 | ENDPROC(__hyp_vector) | ||
215 | ENDPROC(__kvm_hyp_vector) | 212 | ENDPROC(__kvm_hyp_vector) |
diff --git a/arch/arm64/kvm/hyp/switch.c b/arch/arm64/kvm/hyp/switch.c index 7457ae4db86e..ca8f5a5e2f96 100644 --- a/arch/arm64/kvm/hyp/switch.c +++ b/arch/arm64/kvm/hyp/switch.c | |||
@@ -85,7 +85,7 @@ static void __hyp_text __vgic_restore_state(struct kvm_vcpu *vcpu) | |||
85 | __vgic_call_restore_state()(vcpu); | 85 | __vgic_call_restore_state()(vcpu); |
86 | } | 86 | } |
87 | 87 | ||
88 | int __hyp_text __guest_run(struct kvm_vcpu *vcpu) | 88 | static int __hyp_text __guest_run(struct kvm_vcpu *vcpu) |
89 | { | 89 | { |
90 | struct kvm_cpu_context *host_ctxt; | 90 | struct kvm_cpu_context *host_ctxt; |
91 | struct kvm_cpu_context *guest_ctxt; | 91 | struct kvm_cpu_context *guest_ctxt; |
@@ -142,8 +142,7 @@ int __hyp_text __guest_run(struct kvm_vcpu *vcpu) | |||
142 | return exit_code; | 142 | return exit_code; |
143 | } | 143 | } |
144 | 144 | ||
145 | __alias(__guest_run) | 145 | __alias(__guest_run) int __kvm_vcpu_run(struct kvm_vcpu *vcpu); |
146 | int __weak __kvm_vcpu_run(struct kvm_vcpu *vcpu); | ||
147 | 146 | ||
148 | static const char __hyp_panic_string[] = "HYP panic:\nPS:%08llx PC:%016llx ESR:%08llx\nFAR:%016llx HPFAR:%016llx PAR:%016llx\nVCPU:%p\n"; | 147 | static const char __hyp_panic_string[] = "HYP panic:\nPS:%08llx PC:%016llx ESR:%08llx\nFAR:%016llx HPFAR:%016llx PAR:%016llx\nVCPU:%p\n"; |
149 | 148 | ||
diff --git a/arch/arm64/kvm/hyp/tlb.c b/arch/arm64/kvm/hyp/tlb.c index 5f815cf53a9a..2a7e0d838698 100644 --- a/arch/arm64/kvm/hyp/tlb.c +++ b/arch/arm64/kvm/hyp/tlb.c | |||
@@ -17,7 +17,7 @@ | |||
17 | 17 | ||
18 | #include "hyp.h" | 18 | #include "hyp.h" |
19 | 19 | ||
20 | void __hyp_text __tlb_flush_vmid_ipa(struct kvm *kvm, phys_addr_t ipa) | 20 | static void __hyp_text __tlb_flush_vmid_ipa(struct kvm *kvm, phys_addr_t ipa) |
21 | { | 21 | { |
22 | dsb(ishst); | 22 | dsb(ishst); |
23 | 23 | ||
@@ -48,10 +48,10 @@ void __hyp_text __tlb_flush_vmid_ipa(struct kvm *kvm, phys_addr_t ipa) | |||
48 | write_sysreg(0, vttbr_el2); | 48 | write_sysreg(0, vttbr_el2); |
49 | } | 49 | } |
50 | 50 | ||
51 | __alias(__tlb_flush_vmid_ipa) | 51 | __alias(__tlb_flush_vmid_ipa) void __kvm_tlb_flush_vmid_ipa(struct kvm *kvm, |
52 | void __weak __kvm_tlb_flush_vmid_ipa(struct kvm *kvm, phys_addr_t ipa); | 52 | phys_addr_t ipa); |
53 | 53 | ||
54 | void __hyp_text __tlb_flush_vmid(struct kvm *kvm) | 54 | static void __hyp_text __tlb_flush_vmid(struct kvm *kvm) |
55 | { | 55 | { |
56 | dsb(ishst); | 56 | dsb(ishst); |
57 | 57 | ||
@@ -67,10 +67,9 @@ void __hyp_text __tlb_flush_vmid(struct kvm *kvm) | |||
67 | write_sysreg(0, vttbr_el2); | 67 | write_sysreg(0, vttbr_el2); |
68 | } | 68 | } |
69 | 69 | ||
70 | __alias(__tlb_flush_vmid) | 70 | __alias(__tlb_flush_vmid) void __kvm_tlb_flush_vmid(struct kvm *kvm); |
71 | void __weak __kvm_tlb_flush_vmid(struct kvm *kvm); | ||
72 | 71 | ||
73 | void __hyp_text __tlb_flush_vm_context(void) | 72 | static void __hyp_text __tlb_flush_vm_context(void) |
74 | { | 73 | { |
75 | dsb(ishst); | 74 | dsb(ishst); |
76 | asm volatile("tlbi alle1is \n" | 75 | asm volatile("tlbi alle1is \n" |
@@ -78,5 +77,4 @@ void __hyp_text __tlb_flush_vm_context(void) | |||
78 | dsb(ish); | 77 | dsb(ish); |
79 | } | 78 | } |
80 | 79 | ||
81 | __alias(__tlb_flush_vm_context) | 80 | __alias(__tlb_flush_vm_context) void __kvm_flush_vm_context(void); |
82 | void __weak __kvm_flush_vm_context(void); | ||
diff --git a/arch/arm64/kvm/hyp/vgic-v3-sr.c b/arch/arm64/kvm/hyp/vgic-v3-sr.c index a76945874d5d..9142e082f5f3 100644 --- a/arch/arm64/kvm/hyp/vgic-v3-sr.c +++ b/arch/arm64/kvm/hyp/vgic-v3-sr.c | |||
@@ -220,10 +220,9 @@ void __hyp_text __vgic_v3_restore_state(struct kvm_vcpu *vcpu) | |||
220 | } | 220 | } |
221 | } | 221 | } |
222 | 222 | ||
223 | u64 __hyp_text __vgic_v3_read_ich_vtr_el2(void) | 223 | static u64 __hyp_text __vgic_v3_read_ich_vtr_el2(void) |
224 | { | 224 | { |
225 | return read_gicreg(ICH_VTR_EL2); | 225 | return read_gicreg(ICH_VTR_EL2); |
226 | } | 226 | } |
227 | 227 | ||
228 | __alias(__vgic_v3_read_ich_vtr_el2) | 228 | __alias(__vgic_v3_read_ich_vtr_el2) u64 __vgic_v3_get_ich_vtr_el2(void); |
229 | u64 __weak __vgic_v3_get_ich_vtr_el2(void); | ||