]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: Add defs & probing of BadInstr[P] registers
authorJames Hogan <james.hogan@imgtec.com>
Wed, 11 May 2016 12:50:51 +0000 (13:50 +0100)
committerRalf Baechle <ralf@linux-mips.org>
Fri, 13 May 2016 13:30:25 +0000 (15:30 +0200)
commitd576ceabb1ef4347462176db8cd17d35ffca706f
tree4bf416b2262006e60bd3b81c24d089c03f5f3e37
parente70f5085c7cf6df95b128808cd2d3a119719b117
MIPS: Add defs & probing of BadInstr[P] registers

The optional CP0_BadInstr and CP0_BadInstrP registers are written with
the encoding of the instruction that caused a synchronous exception to
occur, and the prior branch instruction if in a delay slot.

These will be useful for instruction emulation in KVM, and especially
for VZ support where reading guest virtual memory is a bit more awkward.

Add CPU option numbers and cpu_has_* definitions to indicate the
presence of each registers, and add code to probe for them using bits in
the CP0_Config3 register.

[ralf@linux-mips.org: resolve merge conflict.]

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/13224/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/include/asm/cpu-features.h
arch/mips/include/asm/cpu.h
arch/mips/include/asm/mipsregs.h
arch/mips/kernel/cpu-probe.c