aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mm
diff options
context:
space:
mode:
authorVladimir Murzin <murzin.v@gmail.com>2012-09-22 15:49:23 +0400
committerSimon Shields <keepcalm444@gmail.com>2015-12-09 17:35:26 +1100
commitcc2317978a88717198b5190124add3cc6e4936d9 (patch)
tree4e8b8bc713decbb0a147031e5ae54fc110720e3c /arch/arm/mm
parent827605e5a9479dc73285f3c40c177ac30e4bffa9 (diff)
downloadkernel_samsung_smdk4412-cc2317978a88717198b5190124add3cc6e4936d9.zip
kernel_samsung_smdk4412-cc2317978a88717198b5190124add3cc6e4936d9.tar.gz
kernel_samsung_smdk4412-cc2317978a88717198b5190124add3cc6e4936d9.tar.bz2
arm: add SDIV/UDIV emulation for ARMv7 processors
The Virtualization Extensions introduce the requirement for an ARMv7-A implementation to include SDIV and UDIV. Any implementation of the Virtualization Extensions must include the SDIV and UDIV instructions in the Thumb and ARM instruction sets. In an ARMv7-A implementation that does not include the Virtualization Extensions, it is IMPLEMENTATION DEFINED whether: * SDIV and UDIV are not implemented * SDIV and UDIV are implemented only in the Thumb instruction set * SDIV and UDIV are implemented in the Thumb and ARM instruction sets. This patch adds a handler to trap and emulate unimplemented SDIV and UDIV instructions in ARM and Thumb modes. Also some basic statistic is exported via /proc/cpu/idiv_emulation Change-Id: I8e721ecac62a05fab42ed7db7951b4c837a59bc7 Signed-off-by: Vladimir Murzin <murzin.v@gmail.com>
Diffstat (limited to 'arch/arm/mm')
-rw-r--r--arch/arm/mm/Kconfig26
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig
index cbab5c5..ebaee8e 100644
--- a/arch/arm/mm/Kconfig
+++ b/arch/arm/mm/Kconfig
@@ -687,6 +687,32 @@ config SWP_EMULATE
If unsure, say Y.
+config IDIV_EMULATE
+ bool "Emulate SDIV/UDIV instructions"
+ depends on !CPU_USE_DOMAINS && CPU_V7
+ select HAVE_PROC_CPU if PROC_FS
+ default y if SMP
+ help
+
+ The Virtualization Extensions introduce the requirement for an
+ ARMv7-A implementation to include SDIV and UDIV. Any
+ implementation of the Virtualization Extensions must include
+ the SDIV and UDIV instructions in the Thumb and ARM
+ instruction sets.
+
+ In an ARMv7-A implementation that does not include the
+ Virtualization Extensions, it is IMPLEMENTATION DEFINED whether:
+ * SDIV and UDIV are not implemented
+ * SDIV and UDIV are implemented only in the Thumb instruction set
+ * SDIV and UDIV are implemented in the Thumb and ARM
+ instruction sets.
+
+ This option allows to handle exeptions due to unimplemented
+ SDIV and UDIV instructions in ARM and Thumb modes.
+
+ If unsure, say Y.
+
+
config CPU_BIG_ENDIAN
bool "Build big-endian kernel"
depends on ARCH_SUPPORTS_BIG_ENDIAN