ARM: 8534/1: virt: fix hyp-stub build for pre-ARMv7 CPUs
authorJean-Philippe Brucker <jean-philippe.brucker@arm.com>
Fri, 19 Feb 2016 10:04:45 +0000 (11:04 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 22 Feb 2016 11:39:13 +0000 (11:39 +0000)
ARMv6 CPUs do not have virtualisation extensions, but hyp-stub.S is
still included into the image to keep it generic. In order to use ARMv7
instructions during HYP initialisation, add -march=armv7-a flag to
hyp-stub's build.

On an ARMv6 CPU, __hyp_stub_install returns as soon as it detects that
the mode isn't HYP, so we will never reach those instructions.

Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/boot/compressed/Makefile
arch/arm/kernel/Makefile

index 7a6a58ef8aaf815728fd59b0ca7af752495595b0..43788b1a1ac5e64372e1f3d3b012ba97a2e2d6ea 100644 (file)
@@ -195,5 +195,7 @@ CFLAGS_font.o := -Dstatic=
 $(obj)/font.c: $(FONTC)
        $(call cmd,shipped)
 
+AFLAGS_hyp-stub.o := -Wa,-march=armv7-a
+
 $(obj)/hyp-stub.S: $(srctree)/arch/$(SRCARCH)/kernel/hyp-stub.S
        $(call cmd,shipped)
index 2c5f160be65e44cbabc2c5d01b023d56df0a1985..ad325a8c7e1e5d1dfbad11e8846169696d36e6bc 100644 (file)
@@ -88,6 +88,7 @@ obj-$(CONFIG_DEBUG_LL)        += debug.o
 obj-$(CONFIG_EARLY_PRINTK)     += early_printk.o
 
 obj-$(CONFIG_ARM_VIRT_EXT)     += hyp-stub.o
+AFLAGS_hyp-stub.o              :=-Wa,-march=armv7-a
 ifeq ($(CONFIG_ARM_PSCI),y)
 obj-$(CONFIG_SMP)              += psci_smp.o
 endif
This page took 0.029219 seconds and 5 git commands to generate.