]> xenbits.xensource.com Git - xen.git/commitdiff
xen/arm: don't enable VFP on XEN during the boot
authorJulien Grall <julien.grall@linaro.org>
Mon, 17 Jun 2013 13:47:12 +0000 (14:47 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 4 Jul 2013 10:09:57 +0000 (11:09 +0100)
We can safely remove VFP support in XEN because:
    - the guest will enable VFP support when a process requires it
    - XEN doesn't use VFP

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/arm/Rules.mk
xen/arch/arm/setup.c
xen/arch/arm/smpboot.c
xen/include/asm-arm/vfp.h [deleted file]

index 422ed04cbe5b2031c77f4b71ddd56e2361027fc7..a18e7fd79550a7e58b344c2ce1771f093072a5b7 100644 (file)
@@ -22,7 +22,7 @@ arm := y
 ifeq ($(TARGET_SUBARCH),arm32)
 # Prevent floating-point variables from creeping into Xen.
 CFLAGS += -msoft-float
-CFLAGS += -mcpu=cortex-a15 -mfpu=vfpv3 -mfloat-abi=softfp
+CFLAGS += -mcpu=cortex-a15
 arm32 := y
 arm64 := n
 endif
index da2a734b586afb8969ad574478d9ddba889889f8..b192d15d51873d455e7491ad937d01a49a752d50 100644 (file)
@@ -38,7 +38,6 @@
 #include <asm/page.h>
 #include <asm/current.h>
 #include <asm/setup.h>
-#include <asm/vfp.h>
 #include <asm/early_printk.h>
 #include <asm/gic.h>
 #include <asm/cpufeature.h>
@@ -457,8 +456,6 @@ void __init start_xen(unsigned long boot_phys_offset,
 
     setup_virt_paging();
 
-    enable_vfp();
-
     softirq_init();
 
     tasklet_subsys_init();
index 8011987310f756d16669fc34c12322ff259bd123..c7421fc793d7f5b2d373bb912d71311333d36b31 100644 (file)
@@ -28,7 +28,6 @@
 #include <xen/softirq.h>
 #include <xen/timer.h>
 #include <xen/irq.h>
-#include <asm/vfp.h>
 #include <asm/gic.h>
 
 cpumask_t cpu_online_map;
@@ -153,7 +152,6 @@ void __cpuinit start_secondary(unsigned long boot_phys_offset,
     setup_virt_paging();
 
     mmu_init_secondary_cpu();
-    enable_vfp();
 
     gic_init_secondary_cpu();
 
diff --git a/xen/include/asm-arm/vfp.h b/xen/include/asm-arm/vfp.h
deleted file mode 100644 (file)
index b800816..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-#ifndef __ARM_VFP_H_
-#define __ARM_VFP_H_
-
-#include <xen/types.h>
-
-
-#ifdef CONFIG_ARM_32
-
-#define FPEXC_EN (1u << 30)
-
-/* Save and restore FP state.
- * Ought to be using the new vmrs/vmsr names, but older binutils has a
- * bug where it only allows them to target fpscr (and not, say, fpexc). */
-#define READ_FP(reg) ({                                 \
-    uint32_t val;                                       \
-    asm volatile ("fmrx %0, fp" #reg : "=r" (val));     \
-    val; })
-
-#define WRITE_FP(reg, val) do {                         \
-    asm volatile ("fmxr fp" #reg ", %0" : : "r" (val)); \
-} while (0)
-
-/* Start-of-day: Turn on VFP */
-static inline void enable_vfp(void)
-{
-    WRITE_FP(exc, READ_FP(exc) | FPEXC_EN);
-}
-#else
-static inline void enable_vfp(void)
-{
-    /* Always enable on 64-bit */
-}
-#endif
-
-#endif
-/*
- * Local variables:
- * mode: C
- * c-file-style: "BSD"
- * c-basic-offset: 4
- * indent-tabs-mode: nil
- * End:
- */