diff mbox

[09/10] fixup! ARM: virt: Initial Virtualization Extensions support

Message ID 1329329763-31508-10-git-send-email-dave.martin@linaro.org
State Not Applicable
Headers show

Commit Message

Dave Martin Feb. 15, 2012, 6:16 p.m. UTC
Use virtualisation instruction macros so that we can build the core
boot-time code without requiring excessively new tools.

Signed-off-by: Dave Martin <dave.martin@linaro.org>
---
 arch/arm/boot/compressed/Makefile |    2 +-
 arch/arm/kernel/Makefile          |    2 +-
 arch/arm/kernel/hyp-stub.S        |    4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)
diff mbox

Patch

diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index 2a597d1..732dd44 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -32,7 +32,7 @@  CFLAGS_string.o	:= -Os
 
 ifeq ($(CONFIG_ARM_VIRT),y)
 OBJS		+= hyp-stub.o
-AFLAGS_hyp-stub.o := -Wa,-march=armv7-a+virt
+AFLAGS_hyp-stub.o := $(call cc-option,-Wa$(comma)-march=armv7-a+virt,-DAS_NEEDS_HVC)
 endif
 
 #
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile
index 9f49f21..d98c4b5 100644
--- a/arch/arm/kernel/Makefile
+++ b/arch/arm/kernel/Makefile
@@ -84,6 +84,6 @@  obj-$(CONFIG_DEBUG_LL)	+= debug.o
 obj-$(CONFIG_EARLY_PRINTK)	+= early_printk.o
 
 obj-$(CONFIG_ARM_VIRT)		+= hyp-stub.o
-AFLAGS_hyp-stub.o		:= -Wa,-march=armv7-a+virt
+AFLAGS_hyp-stub.o	:= $(call cc-option,-Wa$(comma)-march=armv7-a+virt,-DAS_NEEDS_HVC)
 
 extra-y := $(head-y) init_task.o vmlinux.lds
diff --git a/arch/arm/kernel/hyp-stub.S b/arch/arm/kernel/hyp-stub.S
index 83097ad..8de03fb 100644
--- a/arch/arm/kernel/hyp-stub.S
+++ b/arch/arm/kernel/hyp-stub.S
@@ -91,7 +91,7 @@  ENTRY(__hyp_stub_install_secondary)
 	bic	r7, r6, #MODE_MASK
 	orr	r7, r7, #SVC_MODE
 	msr	spsr_cxsf, r7
-	msr	elr_hyp, lr
+	msr_elr_hyp 14			@ msr elr_hyp, lr
 	eret				@ return, switching to SVC mode
 ENDPROC(__hyp_stub_install_secondary)
 
@@ -123,7 +123,7 @@  ENDPROC(__hyp_stub_do_trap)
  * initialisation entry point.
  */
 ENTRY(__hyp_set_vectors)
-	hvc	#0
+	hvc	0
 	bx	lr
 ENDPROC(__hyp_set_vectors)