From: Roger Pau Monne <roger.pau@citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
Jan Beulich <jbeulich@suse.com>,
Roger Pau Monne <roger.pau@citrix.com>
Subject: [PATCH v3 3/5] x86: fix indirect thunk usage of CONFIG_INDIRECT_THUNK
Date: Mon, 29 Jan 2018 12:26:41 +0000 [thread overview]
Message-ID: <20180129122643.13008-4-roger.pau@citrix.com> (raw)
In-Reply-To: <20180129122643.13008-1-roger.pau@citrix.com>
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.pau@citrix.com>
---
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@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
next prev parent reply other threads:[~2018-01-29 12:28 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-29 12:26 [PATCH v3 0/5] clang fixes Roger Pau Monne
2018-01-29 12:26 ` [PATCH v3 1/5] build: filter out command line assembler arguments Roger Pau Monne
2018-01-29 14:12 ` Ian Jackson
2018-01-29 12:26 ` [PATCH v3 2/5] x86/clang: fix build with indirect thunks Roger Pau Monne
2018-01-29 16:42 ` Jan Beulich
2018-01-29 12:26 ` Roger Pau Monne [this message]
2018-01-29 16:45 ` [PATCH v3 3/5] x86: fix indirect thunk usage of CONFIG_INDIRECT_THUNK Jan Beulich
2018-01-29 17:00 ` Roger Pau Monné
2018-01-29 12:26 ` [PATCH v3 4/5] x86: move declaration of the exception_table to C Roger Pau Monne
2018-01-29 16:46 ` Jan Beulich
2018-01-29 12:26 ` [PATCH v3 5/5] x86: remove usage of .skip with non-absolute expressions Roger Pau Monne
2018-01-29 12:43 ` Wei Liu
2018-01-29 12:53 ` Roger Pau Monné
2018-01-29 13:02 ` Jan Beulich
2018-01-29 13:05 ` Andrew Cooper
2018-01-29 13:39 ` Jan Beulich
2018-01-29 16:50 ` Jan Beulich
2018-01-29 18:22 ` Andrew Cooper
2018-01-30 9:23 ` Roger Pau Monné
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180129122643.13008-4-roger.pau@citrix.com \
--to=roger.pau@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).