diff options
author | Jean-Philippe Brucker <jean-philippe.brucker@arm.com> | 2016-02-19 05:04:45 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2016-02-22 06:39:41 -0500 |
commit | 8d9f49136770e8a49c4efd5a4a5b23f75fefaaea (patch) | |
tree | 7703e4aa3f9980963f0d7ea25e9de5ef48dacc26 | |
parent | 8ff97fa31333e8d0f4f7029798d9c7d59359b05c (diff) |
ARM: 8534/1: virt: fix hyp-stub build for pre-ARMv7 CPUs
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>
-rw-r--r-- | arch/arm/boot/compressed/Makefile | 2 | ||||
-rw-r--r-- | arch/arm/kernel/Makefile | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index 4c23a68a0917..af8ff8aeca45 100644 --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile | |||
@@ -186,5 +186,7 @@ CFLAGS_font.o := -Dstatic= | |||
186 | $(obj)/font.c: $(FONTC) | 186 | $(obj)/font.c: $(FONTC) |
187 | $(call cmd,shipped) | 187 | $(call cmd,shipped) |
188 | 188 | ||
189 | AFLAGS_hyp-stub.o := -Wa,-march=armv7-a | ||
190 | |||
189 | $(obj)/hyp-stub.S: $(srctree)/arch/$(SRCARCH)/kernel/hyp-stub.S | 191 | $(obj)/hyp-stub.S: $(srctree)/arch/$(SRCARCH)/kernel/hyp-stub.S |
190 | $(call cmd,shipped) | 192 | $(call cmd,shipped) |
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile index 2c5f160be65e..ad325a8c7e1e 100644 --- a/arch/arm/kernel/Makefile +++ b/arch/arm/kernel/Makefile | |||
@@ -88,6 +88,7 @@ obj-$(CONFIG_DEBUG_LL) += debug.o | |||
88 | obj-$(CONFIG_EARLY_PRINTK) += early_printk.o | 88 | obj-$(CONFIG_EARLY_PRINTK) += early_printk.o |
89 | 89 | ||
90 | obj-$(CONFIG_ARM_VIRT_EXT) += hyp-stub.o | 90 | obj-$(CONFIG_ARM_VIRT_EXT) += hyp-stub.o |
91 | AFLAGS_hyp-stub.o :=-Wa,-march=armv7-a | ||
91 | ifeq ($(CONFIG_ARM_PSCI),y) | 92 | ifeq ($(CONFIG_ARM_PSCI),y) |
92 | obj-$(CONFIG_SMP) += psci_smp.o | 93 | obj-$(CONFIG_SMP) += psci_smp.o |
93 | endif | 94 | endif |