From: Laura Abbott Date: Fri, 21 Nov 2014 21:50:39 +0000 (+0000) Subject: arm64: Switch to adrp for loading the stub vectors X-Git-Tag: v3.19-rc1~173^2~22 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=ac2dec5f6c27a581f8571da605d9ba04df18330d;p=~emulex%2Finfiniband.git arm64: Switch to adrp for loading the stub vectors The hyp stub vectors are currently loaded using adr. This instruction has a +/- 1MB range for the loading address. If the alignment for sections is changed the address may be more than 1MB away, resulting in reclocation errors. Switch to using adrp for getting the address to ensure we aren't affected by the location of the __hyp_stub_vectors. Acked-by: Ard Biesheuvel Acked-by: Marc Zyngier Tested-by: Mark Rutland Tested-by: Kees Cook Signed-off-by: Laura Abbott Signed-off-by: Will Deacon --- diff --git a/arch/arm64/kernel/head.S b/arch/arm64/kernel/head.S index 5a76e3ab788..fddda8565a5 100644 --- a/arch/arm64/kernel/head.S +++ b/arch/arm64/kernel/head.S @@ -341,7 +341,8 @@ CPU_LE( movk x0, #0x30d0, lsl #16 ) // Clear EE and E0E on LE systems msr vttbr_el2, xzr /* Hypervisor stub */ - adr x0, __hyp_stub_vectors + adrp x0, __hyp_stub_vectors + add x0, x0, #:lo12:__hyp_stub_vectors msr vbar_el2, x0 /* spsr */