From patchwork Thu May 30 16:01:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 17307 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f200.google.com (mail-vc0-f200.google.com [209.85.220.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8DE5E25D81 for ; Thu, 30 May 2013 16:02:08 +0000 (UTC) Received: by mail-vc0-f200.google.com with SMTP id hr11sf467919vcb.7 for ; Thu, 30 May 2013 09:02:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=f92B7w4CFM+PCeSDLrUrbI1N+eq4psR+L692au+IqQ0=; b=dmIkPPnTh0yU0sEsVjmzuz/NOEJuK7WvFqdhRGXpGOL/vWfwrFSvfENzr1M/tuGG3m 2CKURvg7C/eg4rc/PU7a192OBaRlDEz4ZfmyTFEaiYZaoz6G0CCPxYbywa7ITvQn6OCw t7168x9b70j8VBwWONWdOBXna5SeRC9nofnUVYKeEIj5PhJXZEeF2JpL4Wyqvw7bw4ym 39yOI5dqRdP/tSHG382XpX7K1XJWMBQbzqpUOxCD4685DMb+rAoW3YpNarMzDVT2lHX6 k9TuntiJEY2IILAcY3eVaye1xZ+hNI381klSRSHSX3f+/59V7ZRwDQM2CTu0gzoYNvCJ r3iA== X-Received: by 10.58.169.136 with SMTP id ae8mr2390491vec.7.1369929728246; Thu, 30 May 2013 09:02:08 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.101.34 with SMTP id fd2ls443460qeb.7.gmail; Thu, 30 May 2013 09:02:08 -0700 (PDT) X-Received: by 10.52.228.67 with SMTP id sg3mr5276124vdc.55.1369929728007; Thu, 30 May 2013 09:02:08 -0700 (PDT) Received: from mail-vb0-x22b.google.com (mail-vb0-x22b.google.com [2607:f8b0:400c:c02::22b]) by mx.google.com with ESMTPS id iz8si25264631vdb.58.2013.05.30.09.02.07 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 30 May 2013 09:02:07 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::22b is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c02::22b; Received: by mail-vb0-f43.google.com with SMTP id e12so295516vbg.16 for ; Thu, 30 May 2013 09:02:07 -0700 (PDT) X-Received: by 10.52.69.200 with SMTP id g8mr5240027vdu.4.1369929727845; Thu, 30 May 2013 09:02:07 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.229.199 with SMTP id jj7csp14095vcb; Thu, 30 May 2013 09:02:07 -0700 (PDT) X-Received: by 10.194.158.102 with SMTP id wt6mr5479260wjb.5.1369929726221; Thu, 30 May 2013 09:02:06 -0700 (PDT) Received: from mail-we0-x233.google.com (mail-we0-x233.google.com [2a00:1450:400c:c03::233]) by mx.google.com with ESMTPS id j4si8549327wiz.5.2013.05.30.09.02.05 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 30 May 2013 09:02:06 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c03::233 is neither permitted nor denied by best guess record for domain of julien.grall@linaro.org) client-ip=2a00:1450:400c:c03::233; Received: by mail-we0-f179.google.com with SMTP id m46so414973wev.10 for ; Thu, 30 May 2013 09:02:05 -0700 (PDT) X-Received: by 10.194.179.102 with SMTP id df6mr5402052wjc.42.1369929725826; Thu, 30 May 2013 09:02:05 -0700 (PDT) Received: from belegaer.uk.xensource.com. (firewall.ctxuk.citrix.com. [46.33.159.2]) by mx.google.com with ESMTPSA id eq15sm38906245wic.4.2013.05.30.09.02.04 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 30 May 2013 09:02:05 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Cc: Stefano.Stabellini@eu.citrix.com, ian.campbell@citrix.com, tim@xen.org, patches@linaro.org, Julien Grall 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 Message-Id: <1369929719-26298-2-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1369929719-26298-1-git-send-email-julien.grall@linaro.org> References: <1369929719-26298-1-git-send-email-julien.grall@linaro.org> X-Gm-Message-State: ALoCoQkzAmIhgBIbj+zmVNc3wA2iGm5NmptXuEy9/HbpLmbtZhfzyvuZacqOiHGEbppZezYL41p2 X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::22b is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 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 #include #include -#include #include #include #include @@ -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 #include #include -#include #include 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 - - -#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: - */