* [PATCH] x86: fix dependency tracking for asm/indirect_thunk_asm.h
@ 2018-06-26 7:37 Jan Beulich
2018-06-26 7:52 ` Wei Liu
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Jan Beulich @ 2018-06-26 7:37 UTC (permalink / raw)
To: xen-devel; +Cc: Andrew Cooper
Including the header solely at the assembler level means the compiler
can't record the header as a dependency in .*.o.d files. Arrange for the
header to be include-able at the C level instead.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- a/xen/include/asm-x86/asm_defns.h
+++ b/xen/include/asm-x86/asm_defns.h
@@ -18,12 +18,11 @@
#ifndef CONFIG_INDIRECT_THUNK
.equ CONFIG_INDIRECT_THUNK, 0
#endif
-# include <asm/indirect_thunk_asm.h>
#else
asm ( "\t.equ CONFIG_INDIRECT_THUNK, "
__stringify(IS_ENABLED(CONFIG_INDIRECT_THUNK)) );
-asm ( "\t.include \"asm/indirect_thunk_asm.h\"" );
#endif
+#include <asm/indirect_thunk_asm.h>
#ifndef __ASSEMBLY__
void ret_from_intr(void);
--- a/xen/include/asm-x86/indirect_thunk_asm.h
+++ b/xen/include/asm-x86/indirect_thunk_asm.h
@@ -1,7 +1,17 @@
/*
- * Warning! This file is included at an assembler level for .c files, causing
- * usual #ifdef'ary to turn into comments.
+ * Trickery to allow this header to be included at the C level, to permit
+ * proper dependency tracking in .*.o.d files, while still having it contain
+ * assembler only macros.
*/
+#ifndef __ASSEMBLY__
+# if 0
+ .if 0
+# endif
+asm ( "\t.include \"asm/indirect_thunk_asm.h\"" );
+# if 0
+ .endif
+# endif
+#else
.macro INDIRECT_BRANCH insn:req arg:req
/*
@@ -39,3 +49,5 @@
.macro INDIRECT_JMP arg:req
INDIRECT_BRANCH jmp \arg
.endm
+
+#endif
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] x86: fix dependency tracking for asm/indirect_thunk_asm.h
2018-06-26 7:37 [PATCH] x86: fix dependency tracking for asm/indirect_thunk_asm.h Jan Beulich
@ 2018-06-26 7:52 ` Wei Liu
2018-07-06 10:25 ` Ping: " Jan Beulich
2018-07-06 12:38 ` Andrew Cooper
2 siblings, 0 replies; 4+ messages in thread
From: Wei Liu @ 2018-06-26 7:52 UTC (permalink / raw)
To: Jan Beulich; +Cc: xen-devel, Wei Liu, Andrew Cooper
On Tue, Jun 26, 2018 at 01:37:02AM -0600, Jan Beulich wrote:
> Including the header solely at the assembler level means the compiler
> can't record the header as a dependency in .*.o.d files. Arrange for the
> header to be include-able at the C level instead.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Ping: [PATCH] x86: fix dependency tracking for asm/indirect_thunk_asm.h
2018-06-26 7:37 [PATCH] x86: fix dependency tracking for asm/indirect_thunk_asm.h Jan Beulich
2018-06-26 7:52 ` Wei Liu
@ 2018-07-06 10:25 ` Jan Beulich
2018-07-06 12:38 ` Andrew Cooper
2 siblings, 0 replies; 4+ messages in thread
From: Jan Beulich @ 2018-07-06 10:25 UTC (permalink / raw)
To: Andrew Cooper; +Cc: xen-devel
Ping?
>>> On 26.06.18 at 09:37, <JBeulich@suse.com> wrote:
> Including the header solely at the assembler level means the compiler
> can't record the header as a dependency in .*.o.d files. Arrange for the
> header to be include-able at the C level instead.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>
> --- a/xen/include/asm-x86/asm_defns.h
> +++ b/xen/include/asm-x86/asm_defns.h
> @@ -18,12 +18,11 @@
> #ifndef CONFIG_INDIRECT_THUNK
> .equ CONFIG_INDIRECT_THUNK, 0
> #endif
> -# include <asm/indirect_thunk_asm.h>
> #else
> asm ( "\t.equ CONFIG_INDIRECT_THUNK, "
> __stringify(IS_ENABLED(CONFIG_INDIRECT_THUNK)) );
> -asm ( "\t.include \"asm/indirect_thunk_asm.h\"" );
> #endif
> +#include <asm/indirect_thunk_asm.h>
>
> #ifndef __ASSEMBLY__
> void ret_from_intr(void);
> --- a/xen/include/asm-x86/indirect_thunk_asm.h
> +++ b/xen/include/asm-x86/indirect_thunk_asm.h
> @@ -1,7 +1,17 @@
> /*
> - * Warning! This file is included at an assembler level for .c files, causing
> - * usual #ifdef'ary to turn into comments.
> + * Trickery to allow this header to be included at the C level, to permit
> + * proper dependency tracking in .*.o.d files, while still having it contain
> + * assembler only macros.
> */
> +#ifndef __ASSEMBLY__
> +# if 0
> + .if 0
> +# endif
> +asm ( "\t.include \"asm/indirect_thunk_asm.h\"" );
> +# if 0
> + .endif
> +# endif
> +#else
>
> .macro INDIRECT_BRANCH insn:req arg:req
> /*
> @@ -39,3 +49,5 @@
> .macro INDIRECT_JMP arg:req
> INDIRECT_BRANCH jmp \arg
> .endm
> +
> +#endif
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] x86: fix dependency tracking for asm/indirect_thunk_asm.h
2018-06-26 7:37 [PATCH] x86: fix dependency tracking for asm/indirect_thunk_asm.h Jan Beulich
2018-06-26 7:52 ` Wei Liu
2018-07-06 10:25 ` Ping: " Jan Beulich
@ 2018-07-06 12:38 ` Andrew Cooper
2 siblings, 0 replies; 4+ messages in thread
From: Andrew Cooper @ 2018-07-06 12:38 UTC (permalink / raw)
To: Jan Beulich, xen-devel
On 26/06/18 08:37, Jan Beulich wrote:
> Including the header solely at the assembler level means the compiler
> can't record the header as a dependency in .*.o.d files. Arrange for the
> header to be include-able at the C level instead.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-07-06 12:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-26 7:37 [PATCH] x86: fix dependency tracking for asm/indirect_thunk_asm.h Jan Beulich
2018-06-26 7:52 ` Wei Liu
2018-07-06 10:25 ` Ping: " Jan Beulich
2018-07-06 12:38 ` Andrew Cooper
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.