From patchwork Tue Dec 17 09:34:31 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 22563 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f72.google.com (mail-vb0-f72.google.com [209.85.212.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D429323FC6 for ; Tue, 17 Dec 2013 09:35:04 +0000 (UTC) Received: by mail-vb0-f72.google.com with SMTP id x8sf10723810vbf.7 for ; Tue, 17 Dec 2013 01:35:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=ZfWtEGhVXjsasIkHHEbTN0l2UXDyN0Wpc7G6ds4qqPM=; b=h5aGabNJA18PsMQcmH0i+w41albPyrWpQUzHuqCca+JcUefW0OXzQk5UP3j4pBZ4qt VRkxzWgxw9V8QMYr7biFPgDVquLXVh0mvu7iycDrPvDMtKiHqkNivE6YNGz3dY6qYcFY FBMNZrHK+Q586rIGYj8Tu4ce2vw9Mm//SEpgFrlgOWBM4yTxOJly5flUA9/AvqgOAN8S 8+veVn1RxFEr3M+v5SgAFvTSr9RgDeRMFnHFRChVcZVciWDHBILIqbqbhAszkNJFqFoW Uc1DBHzieOafYvo2fhWfrCkwZb+HC9gpza99ZE+iJIqPB+4cxvr+Eiq6TWHUFIf32oDR P8Mw== X-Gm-Message-State: ALoCoQmpogXLjrCt24R0GEpOwLI+8eKkLEsjcJWACRiZK3D5nWm7fJa3b/qqzAmD6Qg66JW3ho+i X-Received: by 10.236.0.232 with SMTP id 68mr6320522yhb.16.1387272904083; Tue, 17 Dec 2013 01:35:04 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.131.162 with SMTP id on2ls2480460qeb.73.gmail; Tue, 17 Dec 2013 01:35:04 -0800 (PST) X-Received: by 10.58.118.36 with SMTP id kj4mr10475802veb.2.1387272903979; Tue, 17 Dec 2013 01:35:03 -0800 (PST) Received: from mail-ve0-f176.google.com (mail-ve0-f176.google.com [209.85.128.176]) by mx.google.com with ESMTPS id er6si4708590vdc.10.2013.12.17.01.35.03 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 17 Dec 2013 01:35:03 -0800 (PST) Received-SPF: neutral (google.com: 209.85.128.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.176; Received: by mail-ve0-f176.google.com with SMTP id oz11so4080144veb.21 for ; Tue, 17 Dec 2013 01:35:03 -0800 (PST) X-Received: by 10.58.156.106 with SMTP id wd10mr10179628veb.7.1387272903774; Tue, 17 Dec 2013 01:35:03 -0800 (PST) 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.174.196 with SMTP id u4csp56320vcz; Tue, 17 Dec 2013 01:35:03 -0800 (PST) X-Received: by 10.204.179.135 with SMTP id bq7mr963641bkb.5.1387272902782; Tue, 17 Dec 2013 01:35:02 -0800 (PST) Received: from mail-bk0-f48.google.com (mail-bk0-f48.google.com [209.85.214.48]) by mx.google.com with ESMTPS id ti7si5126477bkb.115.2013.12.17.01.35.02 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 17 Dec 2013 01:35:02 -0800 (PST) Received-SPF: neutral (google.com: 209.85.214.48 is neither permitted nor denied by best guess record for domain of andre.przywara@linaro.org) client-ip=209.85.214.48; Received: by mail-bk0-f48.google.com with SMTP id r7so2728165bkg.35 for ; Tue, 17 Dec 2013 01:35:02 -0800 (PST) X-Received: by 10.204.229.139 with SMTP id ji11mr6329428bkb.4.1387272902139; Tue, 17 Dec 2013 01:35:02 -0800 (PST) Received: from slackpad.drs.calxeda.com (g224197078.adsl.alicedsl.de. [92.224.197.78]) by mx.google.com with ESMTPSA id d5sm12978133bkc.9.2013.12.17.01.35.00 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Dec 2013 01:35:01 -0800 (PST) From: Andre Przywara To: Ian.Campbell@citrix.com, stefano.stabellini@eu.citrix.com Cc: julien.grall@linaro.org, xen-devel@lists.xenproject.org, patches@linaro.org, Andre Przywara Subject: [PATCH] ARM: refine compiler target architecture Date: Tue, 17 Dec 2013 10:34:31 +0100 Message-Id: <1387272871-2341-1-git-send-email-andre.przywara@linaro.org> X-Mailer: git-send-email 1.7.12.1 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: andre.przywara@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.176 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: , Currently we compile the tools just with -marm. This breaks compilation when the toolchain default is less than ARMv7, because we require the "dmb" instruction in xenstored. One possible (and working) fix would be to just adjust that for the tools, but in fact the same rationale is true for the hypervisor. So lets mandate ARMv7-A as the minimum for both Xen and the tools. Unfortunately for some reasons -mcpu=cortex-a15 does not go together with this -march, so lets be more generic and explicitly specify the architecture extensions we actually need for the hypervisor. This fixes native tool compilation on my Slackware system. Signed-off-by: Andre Przywara --- Not sure if this is safe enough for 4.4. On normal build environemnts this shouldn't change anything, but one never knows. In any case I want to drop it here for reference. I will try to do some tests to prove that it's harmless enough. Regards, Andre. config/arm32.mk | 4 ++-- xen/arch/arm/Rules.mk | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/config/arm32.mk b/config/arm32.mk index aa79d22..c5eb30e 100644 --- a/config/arm32.mk +++ b/config/arm32.mk @@ -6,8 +6,8 @@ CONFIG_XEN_INSTALL_SUFFIX := # -march= -mcpu= -# Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb: -CFLAGS += -marm +# Explicitly specifiy 32-bit ARMv7-A ISA since toolchain default can be less: +CFLAGS += -marm -march=armv7-a HAS_PL011 := y HAS_EXYNOS4210 := y diff --git a/xen/arch/arm/Rules.mk b/xen/arch/arm/Rules.mk index aaa203e..891df25 100644 --- a/xen/arch/arm/Rules.mk +++ b/xen/arch/arm/Rules.mk @@ -20,7 +20,8 @@ arm := y ifeq ($(TARGET_SUBARCH),arm32) # Prevent floating-point variables from creeping into Xen. CFLAGS += -msoft-float -CFLAGS += -mcpu=cortex-a15 +# allow assembly of virtualization extension instructions and smc for PSCI +CFLAGS += -Wa,-march=armv7-a+sec+virt arm32 := y arm64 := n endif