From patchwork Thu May 30 14:38:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 17305 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-gg0-f199.google.com (mail-gg0-f199.google.com [209.85.161.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id AF15A25C6D for ; Thu, 30 May 2013 14:39:09 +0000 (UTC) Received: by mail-gg0-f199.google.com with SMTP id q3sf306088gge.2 for ; Thu, 30 May 2013 07:39:09 -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=2rINADwI5cIMHcRsx2jcUFKqB8bAx6PZ09n1wgIXP5g=; b=XurOkNiRrHfryrhSXbRad+Qcp4VaAkbVoSw4fy5EGnzudHF+26aVL7Z/4zECv0XyLM 2S9S0MQfijSGyi4LFj+A5pj5GiRJ9R1fI48iQMbevq5UUqsDLRW/YwE3D+RAPr0jkiw4 fdykfb52Hm4OzQ9vV1nyKFcpfwl3i4LwTfBINSCB6ue+QQ0PcVvrYbOGLCvKpiU6pFNo AXg3lrcFG5f3RO4qtLCPDb2FHftOPTLuk4HG18X0eBzNVQyk04U+XkccNBaJmC3do3MR 2nZnyFj8OlhMQZC2p1E26AxOaxGc/LmSxGiE7g7IsA+cPB7hJHjjoAeBiC/RggeKrwoA UMgQ== X-Received: by 10.236.28.43 with SMTP id f31mr3969188yha.1.1369924749402; Thu, 30 May 2013 07:39:09 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.13.225 with SMTP id k1ls416247qec.44.gmail; Thu, 30 May 2013 07:39:09 -0700 (PDT) X-Received: by 10.58.200.131 with SMTP id js3mr5793254vec.33.1369924749225; Thu, 30 May 2013 07:39:09 -0700 (PDT) Received: from mail-ve0-x233.google.com (mail-ve0-x233.google.com [2607:f8b0:400c:c01::233]) by mx.google.com with ESMTPS id ad7si25004809vdc.146.2013.05.30.07.39.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 30 May 2013 07:39:09 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c01::233 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::233; Received: by mail-ve0-f179.google.com with SMTP id d10so234514vea.38 for ; Thu, 30 May 2013 07:39:09 -0700 (PDT) X-Received: by 10.58.90.5 with SMTP id bs5mr5638143veb.60.1369924749097; Thu, 30 May 2013 07:39:09 -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 jj7csp10781vcb; Thu, 30 May 2013 07:39:08 -0700 (PDT) X-Received: by 10.180.90.43 with SMTP id bt11mr2689889wib.30.1369924747985; Thu, 30 May 2013 07:39:07 -0700 (PDT) Received: from mail-we0-x230.google.com (mail-we0-x230.google.com [2a00:1450:400c:c03::230]) by mx.google.com with ESMTPS id yo5si6318970wjc.150.2013.05.30.07.39.07 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 30 May 2013 07:39:07 -0700 (PDT) Received-SPF: neutral (google.com: 2a00:1450:400c:c03::230 is neither permitted nor denied by best guess record for domain of julien.grall@linaro.org) client-ip=2a00:1450:400c:c03::230; Received: by mail-we0-f176.google.com with SMTP id p58so318408wes.7 for ; Thu, 30 May 2013 07:39:07 -0700 (PDT) X-Received: by 10.180.20.208 with SMTP id p16mr4958298wie.59.1369924747520; Thu, 30 May 2013 07:39:07 -0700 (PDT) Received: from belegaer.uk.xensource.com. (firewall.ctxuk.citrix.com. [46.33.159.2]) by mx.google.com with ESMTPSA id ff10sm38403857wib.10.2013.05.30.07.39.05 for (version=TLSv1.2 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 30 May 2013 07:39:06 -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 2/2] xen/arm: don't enable VFP on XEN during the boot Date: Thu, 30 May 2013 15:38:53 +0100 Message-Id: <1369924733-18701-3-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1369924733-18701-1-git-send-email-julien.grall@linaro.org> References: <1369924733-18701-1-git-send-email-julien.grall@linaro.org> X-Gm-Message-State: ALoCoQkVYnfcgUlv1nTdiqj0oGhYM1xgO1/REow9lAU/1j5dFLJ7PFzAzon/5ISVchIzerH85ICb X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c01::233 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 --- xen/arch/arm/Rules.mk | 2 +- xen/arch/arm/setup.c | 2 -- xen/arch/arm/smpboot.c | 1 - xen/include/asm-arm/vfp.h | 28 ---------------------------- 4 files changed, 1 insertion(+), 32 deletions(-) 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..2df091e 100644 --- a/xen/arch/arm/setup.c +++ b/xen/arch/arm/setup.c @@ -457,8 +457,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..67e20d0 100644 --- a/xen/arch/arm/smpboot.c +++ b/xen/arch/arm/smpboot.c @@ -153,7 +153,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 index 6ba3cd1..fcffdf2 100644 --- a/xen/include/asm-arm/vfp.h +++ b/xen/include/asm-arm/vfp.h @@ -11,34 +11,6 @@ # error "Unknown ARM variant" #endif -#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 - void vfp_save_state(struct vcpu *v); void vfp_restore_state(struct vcpu *v);