diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2014-01-21 13:56:26 -0500 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2014-03-02 20:15:23 -0500 |
commit | 547f781378a22b65c2ab468f235c23001b5924da (patch) | |
tree | 994fc62fb6a003444b652e25dd1a423507613ad1 | |
parent | 46c214dd595381c880794413facadfa07fba5c95 (diff) |
ARM: KVM: fix ordering of 64bit coprocessor accesses
Commit 240e99cbd00a (ARM: KVM: Fix 64-bit coprocessor handling)
added an ordering dependency for the 64bit registers.
The order described is: CRn, CRm, Op1, Op2, 64bit-first.
Unfortunately, the implementation is: CRn, 64bit-first, CRm...
Move the 64bit test to be last in order to match the documentation.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-by: Christoffer Dall <christoffer.dall@linaro.org>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
-rw-r--r-- | arch/arm/kvm/coproc.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/kvm/coproc.h b/arch/arm/kvm/coproc.h index c5ad7ff40c96..8dda870e84f9 100644 --- a/arch/arm/kvm/coproc.h +++ b/arch/arm/kvm/coproc.h | |||
@@ -135,13 +135,13 @@ static inline int cmp_reg(const struct coproc_reg *i1, | |||
135 | return -1; | 135 | return -1; |
136 | if (i1->CRn != i2->CRn) | 136 | if (i1->CRn != i2->CRn) |
137 | return i1->CRn - i2->CRn; | 137 | return i1->CRn - i2->CRn; |
138 | if (i1->is_64 != i2->is_64) | ||
139 | return i2->is_64 - i1->is_64; | ||
140 | if (i1->CRm != i2->CRm) | 138 | if (i1->CRm != i2->CRm) |
141 | return i1->CRm - i2->CRm; | 139 | return i1->CRm - i2->CRm; |
142 | if (i1->Op1 != i2->Op1) | 140 | if (i1->Op1 != i2->Op1) |
143 | return i1->Op1 - i2->Op1; | 141 | return i1->Op1 - i2->Op1; |
144 | return i1->Op2 - i2->Op2; | 142 | if (i1->Op2 != i2->Op2) |
143 | return i1->Op2 - i2->Op2; | ||
144 | return i2->is_64 - i1->is_64; | ||
145 | } | 145 | } |
146 | 146 | ||
147 | 147 | ||