Skip to content

Commit c7edd7f

Browse files
Jean-Philippe BruckerRussell King
authored andcommitted
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>
1 parent e972c37 commit c7edd7f

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

arch/arm/boot/compressed/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,5 +195,7 @@ CFLAGS_font.o := -Dstatic=
195195
$(obj)/font.c: $(FONTC)
196196
$(call cmd,shipped)
197197

198+
AFLAGS_hyp-stub.o := -Wa,-march=armv7-a
199+
198200
$(obj)/hyp-stub.S: $(srctree)/arch/$(SRCARCH)/kernel/hyp-stub.S
199201
$(call cmd,shipped)

arch/arm/kernel/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ obj-$(CONFIG_DEBUG_LL) += debug.o
8888
obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
8989

9090
obj-$(CONFIG_ARM_VIRT_EXT) += hyp-stub.o
91+
AFLAGS_hyp-stub.o :=-Wa,-march=armv7-a
9192
ifeq ($(CONFIG_ARM_PSCI),y)
9293
obj-$(CONFIG_SMP) += psci_smp.o
9394
endif

0 commit comments

Comments
 (0)