From: Julien Grall <julien.grall@linaro.org>
To: xen-devel@lists.xen.org
Cc: patches@linaro.org, tim@xen.org, ian.campbell@citrix.com,
Julien Grall <julien.grall@linaro.org>,
Stefano.Stabellini@eu.citrix.com
Subject: [PATCH v2 1/2] xen/arm: don't enable VFP on XEN during the boot
Date: Thu, 30 May 2013 17:01:58 +0100 [thread overview]
Message-ID: <1369929719-26298-2-git-send-email-julien.grall@linaro.org> (raw)
In-Reply-To: <1369929719-26298-1-git-send-email-julien.grall@linaro.org>
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>
Changes in v2:
- Remove asm/vfp.h and all the inclusions of this header
---
xen/arch/arm/Rules.mk | 2 +-
xen/arch/arm/setup.c | 3 ---
xen/arch/arm/smpboot.c | 2 --
xen/include/asm-arm/vfp.h | 43 -------------------------------------------
4 files changed, 1 insertion(+), 49 deletions(-)
delete mode 100644 xen/include/asm-arm/vfp.h
diff --git a/xen/arch/arm/Rules.mk b/xen/arch/arm/Rules.mk
index 422ed04..a18e7fd 100644
--- a/xen/arch/arm/Rules.mk
+++ b/xen/arch/arm/Rules.mk
@@ -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
diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c
index da2a734..b192d15 100644
--- a/xen/arch/arm/setup.c
+++ b/xen/arch/arm/setup.c
@@ -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();
diff --git a/xen/arch/arm/smpboot.c b/xen/arch/arm/smpboot.c
index 8011987..c7421fc 100644
--- a/xen/arch/arm/smpboot.c
+++ b/xen/arch/arm/smpboot.c
@@ -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
index b800816..0000000
--- a/xen/include/asm-arm/vfp.h
+++ /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:
- */
--
1.7.10.4
next prev parent reply other threads:[~2013-05-30 16:01 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-30 16:01 [PATCH v2 0/2] Implement VFP context switch for arm32 Julien Grall
2013-05-30 16:01 ` Julien Grall [this message]
2013-05-30 16:01 ` [PATCH v2 2/2] xen/arm32: implement VFP context switch Julien Grall
2013-05-31 14:12 ` Ian Campbell
2013-05-31 15:27 ` Julien Grall
2013-05-31 15:54 ` Ian Campbell
2013-06-03 11:14 ` Julien Grall
2013-06-03 11:25 ` Ian Campbell
2013-06-03 11:10 ` Julien Grall
2013-06-03 11:23 ` Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1369929719-26298-2-git-send-email-julien.grall@linaro.org \
--to=julien.grall@linaro.org \
--cc=Stefano.Stabellini@eu.citrix.com \
--cc=ian.campbell@citrix.com \
--cc=patches@linaro.org \
--cc=tim@xen.org \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).