MIPS: KVM: Simplify TLB_* macros
authorJames Hogan <james.hogan@imgtec.com>
Thu, 9 Jun 2016 13:19:18 +0000 (14:19 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 14 Jun 2016 09:02:46 +0000 (11:02 +0200)
commit19d194c62b25cafaf64a5fe74305b3e9b84d63d8
tree71915404ccb9a8c1696ffcb3ecbb2e5486991852
parent9fbfb06a4065772571aa58d2583868268fc8be53
MIPS: KVM: Simplify TLB_* macros

Simplify some of the TLB_ macros making use of the arrayification of
tlb_lo. Basically we index the array by the bit of the virtual address
which determines whether the even or odd entry is used, instead of
having a conditional.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Cc: linux-mips@linux-mips.org
Cc: kvm@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/mips/include/asm/kvm_host.h