From: Dou Liyang <douly.fnst@cn.fujitsu.com>
To: Arnd Bergmann <arnd@arndb.de>,
Jan Kiszka <jan.kiszka@siemens.com>,
Thomas Gleixner <tglx@linutronix.de>, <x86@kernel.org>
Cc: <jailhouse-dev@googlegroups.com>, Ingo Molnar <mingo@redhat.com>,
"H. Peter Anvin" <hpa@zytor.com>, Juergen Gross <jgross@suse.com>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86/jailhouse: fix building without X86_X2APIC
Date: Tue, 16 Jan 2018 09:25:04 +0800 [thread overview]
Message-ID: <afce4e9a-bb5d-6a53-bef7-1f7804785eb2@cn.fujitsu.com> (raw)
In-Reply-To: <20180115202335.1645883-1-arnd@arndb.de>
Hi Arnd,
At 01/16/2018 04:23 AM, Arnd Bergmann wrote:
> When CONFIG_X86_X2APIC is disabled, jailhouse fails to build:
>
> arch/x86/kernel/jailhouse.c: In function 'jailhouse_get_smp_config':
> arch/x86/kernel/jailhouse.c:73:3: error: 'x2apic_phys' undeclared (first use in this function); did you mean 'x2apic_mode'?
>
> The code is protected by an appropriate x2apic_enabled() check that leads
> to the assignment being optimized out without a link-time reference to
> x2apic_phys, so we just lack a declaration.
>
> Let's move x2apic_mode and x2apic_phys outside of the #ifdef together,
> for consistency.
>
> Fixes: 11c8dc419bbc ("x86/jailhouse: Enable APIC and SMP support")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> arch/x86/include/asm/apic.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h
> index 98722773391d..0317d635d9ba 100644
> --- a/arch/x86/include/asm/apic.h
> +++ b/arch/x86/include/asm/apic.h
> @@ -188,6 +188,8 @@ static inline void lapic_assign_system_vectors(void) { }
> static inline void lapic_assign_legacy_vector(unsigned int i, bool r) { }
> #endif /* !CONFIG_X86_LOCAL_APIC */
>
> +extern int x2apic_mode;
> +extern int x2apic_phys;
We can't do that, adding a macro for the X2APIC=n case is enough
Thanks,
dou
-------------------------8<----------------------
Subject: [PATCH] x86/apic: Add a macro named x2apic_phys for the
X2APIC=n case
The x86 system may build failed in the X2APIC=n case, due to the missing of
x2apic_phys.
So add a macro named x2apic_phys for the X2APIC=n case.
Signed-off-by: Dou Liyang <douly.fnst@cn.fujitsu.com>
---
arch/x86/include/asm/apic.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h
index a9e57f08bfa6..ca5940fb995a 100644
--- a/arch/x86/include/asm/apic.h
+++ b/arch/x86/include/asm/apic.h
@@ -264,7 +264,8 @@ static inline void x2apic_setup(void) { }
static inline int x2apic_enabled(void) { return 0; }
#define x2apic_mode (0)
-#define x2apic_supported() (0)
+#define x2apic_phys (0)
+#define x2apic_supported() (0)
#endif /* !CONFIG_X86_X2APIC */
struct irq_data;
--
next prev parent reply other threads:[~2018-01-16 1:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-15 20:23 Arnd Bergmann
2018-01-16 1:25 ` Dou Liyang [this message]
2018-01-16 2:34 ` Dou Liyang
2018-01-16 7:21 ` Arnd Bergmann
2018-01-16 8:17 ` Dou Liyang
2018-01-16 8:50 ` Arnd Bergmann
2018-01-16 11:02 ` Dou Liyang
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=afce4e9a-bb5d-6a53-bef7-1f7804785eb2@cn.fujitsu.com \
--to=douly.fnst@cn.fujitsu.com \
--cc=arnd@arndb.de \
--cc=hpa@zytor.com \
--cc=jailhouse-dev@googlegroups.com \
--cc=jan.kiszka@siemens.com \
--cc=jgross@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.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
all inboxes | Powered by JetHome®