MIPS: Clean up RDHWR handling
authorJames Hogan <james.hogan@imgtec.com>
Wed, 15 Jun 2016 18:29:52 +0000 (19:29 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 15 Jun 2016 21:58:25 +0000 (23:58 +0200)
commitaff565aab961d3cab3299a7008af6cdef88b79a0
tree1b350bd49c8a40b56da58af78d4a3078d75a9190
parente57759306c44ba6105c04eafc3b22efc55bb7ad2
MIPS: Clean up RDHWR handling

No preprocessor definitions are used in the handling of the registers
accessible with the RDHWR instruction, nor the corresponding bits in the
CP0 HWREna register.

Add definitions for both the register numbers (MIPS_HWR_*) and HWREna
bits (MIPS_HWRENA_*) in asm/mipsregs.h and make use of them in the
initialisation of HWREna and emulation of the RDHWR instruction.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Cc: David Daney <david.daney@cavium.com>
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/mach-cavium-octeon/cpu-feature-overrides.h
arch/mips/include/asm/mipsregs.h
arch/mips/kernel/traps.c
arch/mips/kvm/emulate.c