From patchwork Mon Jun 17 13:47:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 17951 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f72.google.com (mail-qa0-f72.google.com [209.85.216.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BFF5923971 for ; Mon, 17 Jun 2013 13:47:23 +0000 (UTC) Received: by mail-qa0-f72.google.com with SMTP id f14sf3365626qak.11 for ; Mon, 17 Jun 2013 06:47:23 -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=rABAqwFyxuWbrn7a6jfSiodwfTo2qpTtvuL3hLLVZpM=; b=e24lZ8kW2pCTRhbrD64+WwSz/jD9nAE3e4vFCWuuEc/f5+IUDGG6/lrY/oumL5bnj7 /F0xOh/TmDph6v79TM64T9ZGU5OFGBkcBO6aecsE8zSeotlT8zPGvSDE0u2nqVJpqH+2 q7Je+HLJhvfOjFQi2P4eVqng3kFssfho8TCNFwwM56hnJA9bYWeB+8/8wVh7UAR14fXS TnzjPOOmHL6uyHs/RTCMq1hZtHyBLxQ2iapThnf9UvjTFN51RSD2irdk/CYlU0PI+bR1 snAhBCG6YhWlFtHguoIylr5ZzfAmHkH8hKSj6UOvrTNJQSfcp4qs3Xz0UZfGW2G2ndsn akfg== X-Received: by 10.236.55.129 with SMTP id k1mr8873834yhc.1.1371476843559; Mon, 17 Jun 2013 06:47:23 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.110.194 with SMTP id ic2ls999234qeb.36.gmail; Mon, 17 Jun 2013 06:47:23 -0700 (PDT) X-Received: by 10.220.202.197 with SMTP id ff5mr4482242vcb.3.1371476843328; Mon, 17 Jun 2013 06:47:23 -0700 (PDT) Received: from mail-ve0-x22c.google.com (mail-ve0-x22c.google.com [2607:f8b0:400c:c01::22c]) by mx.google.com with ESMTPS id fb8si3991295vcb.33.2013.06.17.06.47.23 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Jun 2013 06:47:23 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c01::22c 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:c01::22c; Received: by mail-ve0-f172.google.com with SMTP id jz10so2111883veb.17 for ; Mon, 17 Jun 2013 06:47:23 -0700 (PDT) X-Received: by 10.58.173.36 with SMTP id bh4mr4605530vec.9.1371476843069; Mon, 17 Jun 2013 06:47:23 -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.58.165.8 with SMTP id yu8csp35371veb; Mon, 17 Jun 2013 06:47:21 -0700 (PDT) X-Received: by 10.180.85.195 with SMTP id j3mr1414712wiz.26.1371476841175; Mon, 17 Jun 2013 06:47:21 -0700 (PDT) Received: from mail-wi0-x234.google.com (mail-wi0-x234.google.com [2a00:1450:400c:c05::234]) by mx.google.com with ESMTPS id ej4si5390855wid.29.2013.06.17.06.47.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Jun 2013 06:47:21 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c05::234 is neither permitted nor denied by best guess record for domain of julien.grall@linaro.org) client-ip=2a00:1450:400c:c05::234; Received: by mail-wi0-f180.google.com with SMTP id c10so2192975wiw.7 for ; Mon, 17 Jun 2013 06:47:20 -0700 (PDT) X-Received: by 10.180.185.175 with SMTP id fd15mr4941941wic.34.1371476840489; Mon, 17 Jun 2013 06:47:20 -0700 (PDT) Received: from belegaer.uk.xensource.com (firewall.ctxuk.citrix.com. [46.33.159.2]) by mx.google.com with ESMTPSA id en3sm22224937wid.1.2013.06.17.06.47.18 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Jun 2013 06:47:19 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xen.org Cc: patches@linaro.org, Stefano.Stabellini@eu.citrix.com, ian.campbell@citrix.com, tim@xen.org, Julien Grall Subject: [PATCH v4 1/2] xen/arm: don't enable VFP on XEN during the boot Date: Mon, 17 Jun 2013 14:47:12 +0100 Message-Id: <1371476833-32475-2-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1371476833-32475-1-git-send-email-julien.grall@linaro.org> References: <1371476833-32475-1-git-send-email-julien.grall@linaro.org> X-Gm-Message-State: ALoCoQlTfp3b3UDJF96yavQaApRbhroMNOf/GadOr4btUI4GwB5TkUZl8XVeLZsPcyeM8eEwEQB0 X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c01::22c 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: - */