arm64: kvm: eliminate literal pool entries
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Fri, 7 Nov 2014 14:12:34 +0000 (14:12 +0000)
committerWill Deacon <will.deacon@arm.com>
Fri, 7 Nov 2014 15:04:54 +0000 (15:04 +0000)
Replace two instances of 'ldr xN, =(constant)' in the world switch
hot path with 'mov' instructions.

Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/kvm/hyp.S

index b72aa9f9215ca7d658390e3a368d5be39415b834..fbe909fb0a1a8b95ab4f6e3ade19daaa21c70436 100644 (file)
 .macro activate_traps
        ldr     x2, [x0, #VCPU_HCR_EL2]
        msr     hcr_el2, x2
-       ldr     x2, =(CPTR_EL2_TTA)
+       mov     x2, #CPTR_EL2_TTA
        msr     cptr_el2, x2
 
-       ldr     x2, =(1 << 15)  // Trap CP15 Cr=15
+       mov     x2, #(1 << 15)  // Trap CP15 Cr=15
        msr     hstr_el2, x2
 
        mrs     x2, mdcr_el2