import PULS_20160108
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / arm / kernel / head.S
index 8bac553fe213def562dec9e30cad88c827d6239c..b42251ac516d2f2f8810e1eff2d6a039cbe73067 100644 (file)
@@ -22,6 +22,7 @@
 #include <asm/memory.h>
 #include <asm/thread_info.h>
 #include <asm/pgtable.h>
+#include <asm/vfpmacros.h>
 
 #if defined(CONFIG_DEBUG_LL) && !defined(CONFIG_DEBUG_SEMIHOSTING)
 #include CONFIG_DEBUG_LL_INCLUDE
@@ -344,6 +345,17 @@ __turn_mmu_on_loc:
 #if defined(CONFIG_SMP)
        __CPUINIT
 ENTRY(secondary_startup)
+#ifdef CONFIG_VFP_OPT
+       ldr     r10, =(0xF << 20)
+       mcr     p15, 0, r10, c1, c0, 2
+       VFPFMRX r10, FPEXC                      @ Is the VFP enabled?
+       orr     r10, r10, #FPEXC_EN             @ user FPEXC has the enable bit set
+       bic     r10, r10, #FPEXC_EX             @ make sure exceptions are disabled
+       VFPFMXR FPEXC, r10                      @ enable VFP, disable any pending
+                                               @ exceptions, so we can get at the
+                                               @ rest of it
+#endif
+
        /*
         * Common entry point for secondary CPUs.
         *