Message ID | 1415369554-7444-2-git-send-email-ard.biesheuvel@linaro.org |
---|---|
State | Accepted |
Commit | 302cd37c417d59549d073a8986fd028998409cb9 |
Headers | show |
On 07/11/14 14:12, Ard Biesheuvel wrote: > Replace two instances of 'ldr xN, =(constant)' in the world switch > hot path with 'mov' instructions. > > Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> > --- > arch/arm64/kvm/hyp.S | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/arm64/kvm/hyp.S b/arch/arm64/kvm/hyp.S > index b72aa9f9215c..fbe909fb0a1a 100644 > --- a/arch/arm64/kvm/hyp.S > +++ b/arch/arm64/kvm/hyp.S > @@ -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 > Looks good to me. Acked-by: Marc Zyngier <marc.zyngier@arm.com> M.
On Fri, Nov 07, 2014 at 02:44:28PM +0000, Marc Zyngier wrote: > On 07/11/14 14:12, Ard Biesheuvel wrote: > > Replace two instances of 'ldr xN, =(constant)' in the world switch > > hot path with 'mov' instructions. > > > > Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> > > --- > > arch/arm64/kvm/hyp.S | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/arch/arm64/kvm/hyp.S b/arch/arm64/kvm/hyp.S > > index b72aa9f9215c..fbe909fb0a1a 100644 > > --- a/arch/arm64/kvm/hyp.S > > +++ b/arch/arm64/kvm/hyp.S > > @@ -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 > > > > Looks good to me. > > Acked-by: Marc Zyngier <marc.zyngier@arm.com> > Yup, me too: Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
On Fri, Nov 07, 2014 at 02:51:50PM +0000, Christoffer Dall wrote: > On Fri, Nov 07, 2014 at 02:44:28PM +0000, Marc Zyngier wrote: > > On 07/11/14 14:12, Ard Biesheuvel wrote: > > > Replace two instances of 'ldr xN, =(constant)' in the world switch > > > hot path with 'mov' instructions. > > > > > > Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> > > > --- > > > arch/arm64/kvm/hyp.S | 4 ++-- > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > diff --git a/arch/arm64/kvm/hyp.S b/arch/arm64/kvm/hyp.S > > > index b72aa9f9215c..fbe909fb0a1a 100644 > > > --- a/arch/arm64/kvm/hyp.S > > > +++ b/arch/arm64/kvm/hyp.S > > > @@ -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 > > > > > > > Looks good to me. > > > > Acked-by: Marc Zyngier <marc.zyngier@arm.com> > > > Yup, me too: > > Acked-by: Christoffer Dall <christoffer.dall@linaro.org> Cheers guys, I've applied both patches to the arm64 tree for 3.19. Will
diff --git a/arch/arm64/kvm/hyp.S b/arch/arm64/kvm/hyp.S index b72aa9f9215c..fbe909fb0a1a 100644 --- a/arch/arm64/kvm/hyp.S +++ b/arch/arm64/kvm/hyp.S @@ -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
Replace two instances of 'ldr xN, =(constant)' in the world switch hot path with 'mov' instructions. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> --- arch/arm64/kvm/hyp.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)