Skip to content

Commit

Permalink
arm64: kvm: eliminate literal pool entries
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ard Biesheuvel authored and Will Deacon committed Nov 7, 2014
1 parent f1ba46e commit 302cd37
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/arm64/kvm/hyp.S
Original file line number Diff line number Diff line change
Expand Up @@ -761,10 +761,10 @@
.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
Expand Down

0 comments on commit 302cd37

Please sign in to comment.