]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
xen/arm: Allow insn.h to be called from assembly
authorJulien Grall <julien.grall@arm.com>
Tue, 24 Sep 2019 11:48:47 +0000 (12:48 +0100)
committerJulien Grall <julien.grall@arm.com>
Fri, 1 Nov 2019 14:32:38 +0000 (14:32 +0000)
A follow-up patch will require to include insn.h from assembly code. So
we need to protect any C-specific definition to avoid compilation
errors when used in assembly code.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Release-acked-by: Juergen Gross <jgross@suse.com>
xen/include/asm-arm/insn.h

index 19277212e1d4b5da837a98cd31ffd2cb4296f863..27271e95f9e202a2d0767e2b4c10446193c93ae9 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef __ARCH_ARM_INSN
 #define __ARCH_ARM_INSN
 
+#ifndef __ASSEMBLY__
+
 #include <xen/types.h>
 
 #if defined(CONFIG_ARM_64)
@@ -11,6 +13,8 @@
 # error "unknown ARM variant"
 #endif
 
+#endif /* __ASSEMBLY__ */
+
 /* On ARM32,64 instructions are always 4 bytes long. */
 #define ARCH_PATCH_INSN_SIZE 4