From: Julien Grall Date: Tue, 24 Sep 2019 11:48:47 +0000 (+0100) Subject: xen/arm: Allow insn.h to be called from assembly X-Git-Tag: 4.13.0-rc2~4 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=7afbbca21bbacb9011da05055a911bca6aa895c5;p=xen.git xen/arm: Allow insn.h to be called from assembly 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 Reviewed-by: Stefano Stabellini Release-acked-by: Juergen Gross --- diff --git a/xen/include/asm-arm/insn.h b/xen/include/asm-arm/insn.h index 19277212e1..27271e95f9 100644 --- a/xen/include/asm-arm/insn.h +++ b/xen/include/asm-arm/insn.h @@ -1,6 +1,8 @@ #ifndef __ARCH_ARM_INSN #define __ARCH_ARM_INSN +#ifndef __ASSEMBLY__ + #include #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