diff options
author | Maciej W. Rozycki <macro@imgtec.com> | 2016-01-30 09:08:16 (GMT) |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2016-02-02 01:16:11 (GMT) |
commit | 10f6d99f0fb186bbca1e9e2905d0d3693f941396 (patch) | |
tree | 799f019d31d366ae739189daef1b154e91c3202e /arch/mn10300/configs | |
parent | 87bee0ecf01d2ed0d48bba1fb12c954f9476d243 (diff) | |
download | linux-10f6d99f0fb186bbca1e9e2905d0d3693f941396.tar.xz |
MIPS: traps.c: Don't emulate RDHWR in the CpU #0 exception handler
In the regular MIPS instruction set RDHWR is encoded with the SPECIAL3
(011111) major opcode. Therefore it cannot trigger the CpU (Coprocessor
Unusable) exception, and certainly not for coprocessor 0, as the opcode
does not overlap with any of the older ISA reservations, i.e. LWC0
(110000), SWC0 (111000), LDC0 (110100) or SDC0 (111100). The closest
match might be SDC3 (111111), possibly causing a CpU #3 exception,
however our code does not handle it anyway. A quick check with a MIPS I
and a MIPS III processor:
CPU0 revision is: 00000220 (R3000)
CPU0 revision is: 00000440 (R4400SC)
indeed indicates that the RI (Reserved Instruction) exception is
triggered. It's only LL and SC that require emulation in the CpU #0
exception handler as they reuse the LWC0 and SWC0 opcodes respectively.
In the microMIPS instruction set RDHWR is mandatory and triggering the
RI exception is required on unimplemented or disabled register accesses.
Therefore emulating the microMIPS instruction in the CpU #0 exception
handler is not required either.
Signed-off-by: Maciej W. Rozycki <macro@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/12280/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mn10300/configs')
0 files changed, 0 insertions, 0 deletions