diff options
author | Leonid Yegoshin <Leonid.Yegoshin@imgtec.com> | 2014-12-03 10:47:03 -0500 |
---|---|---|
committer | Markos Chandras <markos.chandras@imgtec.com> | 2015-02-17 10:37:37 -0500 |
commit | b0a668fb2038d846a466c7a16a358d874002b697 (patch) | |
tree | 78e1a41109308a34e08dd552ddf6834f085d288c /arch/mips/Kconfig | |
parent | b55b9e271544a23ca23b7ca3a87baf6329fcb341 (diff) |
MIPS: kernel: mips-r2-to-r6-emul: Add R2 emulator for MIPS R6
MIPS R6 removed quite a few R2 instructions. However, there
is plenty of <R6 userland code so we add an in-kernel emulator
so we can still be able to execute all R2 userland out there.
The emulator comes with a handy debugfs under /mips/ directory
(r2-emul-stats) to provide some basic statistics of the
instructions that are being emulated.
Below are some statistics from booting a minimal buildroot image:
Instruction Total BDslot
------------------------------
movs 236969 0
hilo 56686 0
muls 55279 0
divs 10941 0
dsps 0 0
bops 1 0
traps 0 0
fpus 0 0
loads 214981 17
stores 103364 0
llsc 56898 0
dsemul 150418 0
jr 370158
bltzl 43
bgezl 1594
bltzll 0
bgezll 0
bltzal 39
bgezal 39
beql 14503
bnel 138741
blezl 0
bgtzl 3988
Signed-off-by: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Diffstat (limited to 'arch/mips/Kconfig')
-rw-r--r-- | arch/mips/Kconfig | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 883eb3aacedf..afa808ab9f44 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -2063,6 +2063,19 @@ config MIPS_MT_FPAFF | |||
2063 | default y | 2063 | default y |
2064 | depends on MIPS_MT_SMP | 2064 | depends on MIPS_MT_SMP |
2065 | 2065 | ||
2066 | config MIPSR2_TO_R6_EMULATOR | ||
2067 | bool "MIPS R2-to-R6 emulator" | ||
2068 | depends on CPU_MIPSR6 && !SMP | ||
2069 | default y | ||
2070 | help | ||
2071 | Choose this option if you want to run non-R6 MIPS userland code. | ||
2072 | Even if you say 'Y' here, the emulator will still be disabled by | ||
2073 | default. You can enable it using the 'mipsr2emul' kernel option. | ||
2074 | The only reason this is a build-time option is to save ~14K from the | ||
2075 | final kernel image. | ||
2076 | comment "MIPS R2-to-R6 emulator is only available for UP kernels" | ||
2077 | depends on SMP && CPU_MIPSR6 | ||
2078 | |||
2066 | config MIPS_VPE_LOADER | 2079 | config MIPS_VPE_LOADER |
2067 | bool "VPE loader support." | 2080 | bool "VPE loader support." |
2068 | depends on SYS_SUPPORTS_MULTITHREADING && MODULES | 2081 | depends on SYS_SUPPORTS_MULTITHREADING && MODULES |