When indirect_thunk_asm.h is instantiated directly into assembly files CONFIG_INDIRECT_THUNK might not be defined, and thus using .if against it is wrong.
Add a check to define CONFIG_INDIRECT_THUNK to 0 if not defined, so that using .if CONFIG_INDIRECT_THUNK is always correct. This suppresses the following clang error: <instantiation>:8:9: error: expected absolute expression .if CONFIG_INDIRECT_THUNK == 1 ^ <instantiation>:1:1: note: while in macro instantiation INDIRECT_BRANCH call %rdx ^ entry.S:589:9: note: while in macro instantiation INDIRECT_CALL %rdx ^ Signed-off-by: Roger Pau Monné <roger....@citrix.com> --- Cc: Jan Beulich <jbeul...@suse.com> Cc: Andrew Cooper <andrew.coop...@citrix.com> --- xen/include/asm-x86/asm_defns.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xen/include/asm-x86/asm_defns.h b/xen/include/asm-x86/asm_defns.h index 447bf67aed..aa32f10967 100644 --- a/xen/include/asm-x86/asm_defns.h +++ b/xen/include/asm-x86/asm_defns.h @@ -14,6 +14,9 @@ #include <asm/alternative.h> #ifdef __ASSEMBLY__ +# ifndef CONFIG_INDIRECT_THUNK +# define CONFIG_INDIRECT_THUNK 0 +# endif # include <asm/indirect_thunk_asm.h> #else /* -- 2.15.1 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel