diff options
author | James Hogan <james.hogan@imgtec.com> | 2014-03-14 13:06:10 +0000 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-03-19 17:01:50 +0100 |
commit | 36c95494609cd6d2541c08e806b4d6bc401bc53f (patch) | |
tree | 59998fbf13a6b52dd58cd90fd053e62139bbfea8 /arch/mips | |
parent | 26f4f3b57862642296a2e613674e7f00d91c022f (diff) | |
download | linux-stable-36c95494609cd6d2541c08e806b4d6bc401bc53f.tar.gz linux-stable-36c95494609cd6d2541c08e806b4d6bc401bc53f.tar.bz2 linux-stable-36c95494609cd6d2541c08e806b4d6bc401bc53f.zip |
MIPS: KVM: Remove dead code in CP0 emulation
The code to check whether rd > MIPS_CP0_DESAVE is dead code, since
MIPS_CP0_DESAVE = 31 and rd is already masked with 0x1f. Remove it.
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Gleb Natapov <gleb@kernel.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Sanjay Lal <sanjayl@kymasys.com>
Cc: linux-mips@linux-mips.org
Cc: kvm@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/kvm/kvm_mips_emul.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/arch/mips/kvm/kvm_mips_emul.c b/arch/mips/kvm/kvm_mips_emul.c index d562572c2efc..e3fec99941a7 100644 --- a/arch/mips/kvm/kvm_mips_emul.c +++ b/arch/mips/kvm/kvm_mips_emul.c @@ -436,13 +436,6 @@ kvm_mips_emulate_CP0(uint32_t inst, uint32_t *opc, uint32_t cause, sel = inst & 0x7; co_bit = (inst >> 25) & 1; - /* Verify that the register is valid */ - if (rd > MIPS_CP0_DESAVE) { - printk("Invalid rd: %d\n", rd); - er = EMULATE_FAIL; - goto done; - } - if (co_bit) { op = (inst) & 0xff; |