Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: 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: Russell King <rmk+kernel@armlinux.org.uk>
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>

authored by

Marc Zyngier and committed by
Christoffer Dall
ecb5d61d 4897e36c

+6 -28
+4 -6
arch/arm/include/asm/virt.h
··· 53 53 } 54 54 55 55 void __hyp_set_vectors(unsigned long phys_vector_base); 56 - unsigned long __hyp_get_vectors(void); 57 56 void __hyp_reset_vectors(void); 58 57 #else 59 58 #define __boot_cpu_mode (SVC_MODE) ··· 98 99 99 100 /* Only assembly code should need those */ 100 101 101 - #define HVC_GET_VECTORS 0 102 - #define HVC_SET_VECTORS 1 103 - #define HVC_SOFT_RESTART 2 104 - #define HVC_RESET_VECTORS 3 102 + #define HVC_SET_VECTORS 0 103 + #define HVC_SOFT_RESTART 1 104 + #define HVC_RESET_VECTORS 2 105 105 106 - #define HVC_STUB_HCALL_NR 4 106 + #define HVC_STUB_HCALL_NR 3 107 107 108 108 #endif /* __ASSEMBLY__ */ 109 109
+1 -12
arch/arm/kernel/hyp-stub.S
··· 202 202 ENDPROC(__hyp_stub_install_secondary) 203 203 204 204 __hyp_stub_do_trap: 205 - teq r0, #HVC_GET_VECTORS 206 - bne 1f 207 - mrc p15, 4, r0, c12, c0, 0 @ get HVBAR 208 - b __hyp_stub_exit 209 - 210 - 1: teq r0, #HVC_SET_VECTORS 205 + teq r0, #HVC_SET_VECTORS 211 206 bne 1f 212 207 mcr p15, 4, r1, c12, c0, 0 @ set HVBAR 213 208 b __hyp_stub_exit ··· 242 247 * so you will need to set that to something sensible at the new hypervisor's 243 248 * initialisation entry point. 244 249 */ 245 - ENTRY(__hyp_get_vectors) 246 - mov r0, #HVC_GET_VECTORS 247 - __HVC(0) 248 - ret lr 249 - ENDPROC(__hyp_get_vectors) 250 - 251 250 ENTRY(__hyp_set_vectors) 252 251 mov r1, r0 253 252 mov r0, #HVC_SET_VECTORS
+1 -6
arch/arm/kvm/init.S
··· 122 122 eret 123 123 124 124 ENTRY(__kvm_handle_stub_hvc) 125 - cmp r0, #HVC_GET_VECTORS 126 - bne 1f 127 - mrc p15, 4, r0, c12, c0, 0 @ get HVBAR 128 - b exit 129 - 130 - 1: cmp r0, #HVC_SOFT_RESTART 125 + cmp r0, #HVC_SOFT_RESTART 131 126 bne 1f 132 127 133 128 /* The target is expected in r1 */
-4
arch/arm/kvm/interrupts.S
··· 37 37 * in Hyp mode (see init_hyp_mode in arch/arm/kvm/arm.c). Return values are 38 38 * passed in r0 (strictly 32bit). 39 39 * 40 - * A function pointer with a value of 0xffffffff has a special meaning, 41 - * and is used to implement __hyp_get_vectors in the same way as in 42 - * arch/arm/kernel/hyp_stub.S. 43 - * 44 40 * The calling convention follows the standard AAPCS: 45 41 * r0 - r3: caller save 46 42 * r12: caller save