linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [tip: x86/urgent] x86/entry/32: Fix XEN_PV build dependency
@ 2020-07-05 19:44 tip-bot2 for Ingo Molnar
  2020-07-05 20:24 ` Andy Lutomirski
  0 siblings, 1 reply; 3+ messages in thread
From: tip-bot2 for Ingo Molnar @ 2020-07-05 19:44 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: Andy Lutomirski, Thomas Gleixner, Peter Zijlstra (Intel),
	linux-kernel, Ingo Molnar, x86

The following commit has been merged into the x86/urgent branch of tip:

Commit-ID:     a4c0e91d1d65bc58f928b80ed824e10e165da22c
Gitweb:        https://git.kernel.org/tip/a4c0e91d1d65bc58f928b80ed824e10e165da22c
Author:        Ingo Molnar <mingo@kernel.org>
AuthorDate:    Sun, 05 Jul 2020 21:33:11 +02:00
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Sun, 05 Jul 2020 21:39:23 +02:00

x86/entry/32: Fix XEN_PV build dependency

xenpv_exc_nmi() and xenpv_exc_debug() are only defined on 64-bit kernels,
but they snuck into the 32-bit build via <asm/identry.h>, causing the link
to fail:

  ld: arch/x86/entry/entry_32.o: in function `asm_xenpv_exc_nmi':
  (.entry.text+0x817): undefined reference to `xenpv_exc_nmi'

  ld: arch/x86/entry/entry_32.o: in function `asm_xenpv_exc_debug':
  (.entry.text+0x827): undefined reference to `xenpv_exc_debug'

Only use them on 64-bit kernels.

Fixes: f41f0824224e: ("x86/entry/xen: Route #DB correctly on Xen PV")
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/include/asm/idtentry.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/include/asm/idtentry.h b/arch/x86/include/asm/idtentry.h
index eeac6dc..f3d7083 100644
--- a/arch/x86/include/asm/idtentry.h
+++ b/arch/x86/include/asm/idtentry.h
@@ -553,7 +553,7 @@ DECLARE_IDTENTRY_RAW(X86_TRAP_MC,	exc_machine_check);
 
 /* NMI */
 DECLARE_IDTENTRY_NMI(X86_TRAP_NMI,	exc_nmi);
-#ifdef CONFIG_XEN_PV
+#if defined(CONFIG_XEN_PV) && defined(CONFIG_X86_64)
 DECLARE_IDTENTRY_RAW(X86_TRAP_NMI,	xenpv_exc_nmi);
 #endif
 
@@ -563,7 +563,7 @@ DECLARE_IDTENTRY_DEBUG(X86_TRAP_DB,	exc_debug);
 #else
 DECLARE_IDTENTRY_RAW(X86_TRAP_DB,	exc_debug);
 #endif
-#ifdef CONFIG_XEN_PV
+#if defined(CONFIG_XEN_PV) && defined(CONFIG_X86_64)
 DECLARE_IDTENTRY_RAW(X86_TRAP_DB,	xenpv_exc_debug);
 #endif
 

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [tip: x86/urgent] x86/entry/32: Fix XEN_PV build dependency
  2020-07-05 19:44 [tip: x86/urgent] x86/entry/32: Fix XEN_PV build dependency tip-bot2 for Ingo Molnar
@ 2020-07-05 20:24 ` Andy Lutomirski
  2020-07-06  4:15   ` Jürgen Groß
  0 siblings, 1 reply; 3+ messages in thread
From: Andy Lutomirski @ 2020-07-05 20:24 UTC (permalink / raw)
  To: linux-kernel, Juergen Gross
  Cc: linux-tip-commits, Andy Lutomirski, Thomas Gleixner,
	Peter Zijlstra (Intel),
	Ingo Molnar, x86



> On Jul 5, 2020, at 12:44 PM, tip-bot2 for Ingo Molnar <tip-bot2@linutronix.de> wrote:
> 
> The following commit has been merged into the x86/urgent branch of tip:
> 
> Commit-ID:     a4c0e91d1d65bc58f928b80ed824e10e165da22c
> Gitweb:        https://git.kernel.org/tip/a4c0e91d1d65bc58f928b80ed824e10e165da22c
> Author:        Ingo Molnar <mingo@kernel.org>
> AuthorDate:    Sun, 05 Jul 2020 21:33:11 +02:00
> Committer:     Ingo Molnar <mingo@kernel.org>
> CommitterDate: Sun, 05 Jul 2020 21:39:23 +02:00
> 
> x86/entry/32: Fix XEN_PV build dependency
> 
> xenpv_exc_nmi() and xenpv_exc_debug() are only defined on 64-bit kernels,
> but they snuck into the 32-bit build via <asm/identry.h>, causing the link
> to fail:
> 
>  ld: arch/x86/entry/entry_32.o: in function `asm_xenpv_exc_nmi':
>  (.entry.text+0x817): undefined reference to `xenpv_exc_nmi'
> 
>  ld: arch/x86/entry/entry_32.o: in function `asm_xenpv_exc_debug':
>  (.entry.text+0x827): undefined reference to `xenpv_exc_debug'
> 
> Only use them on 64-bit kernels.

Jürgen, can you queue a revert for when PV32 goes away?

> 
> Fixes: f41f0824224e: ("x86/entry/xen: Route #DB correctly on Xen PV")
> Cc: Andy Lutomirski <luto@kernel.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Peter Zijlstra (Intel) <peterz@infradead.org>
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Ingo Molnar <mingo@kernel.org>
> ---
> arch/x86/include/asm/idtentry.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/include/asm/idtentry.h b/arch/x86/include/asm/idtentry.h
> index eeac6dc..f3d7083 100644
> --- a/arch/x86/include/asm/idtentry.h
> +++ b/arch/x86/include/asm/idtentry.h
> @@ -553,7 +553,7 @@ DECLARE_IDTENTRY_RAW(X86_TRAP_MC,    exc_machine_check);
> 
> /* NMI */
> DECLARE_IDTENTRY_NMI(X86_TRAP_NMI,    exc_nmi);
> -#ifdef CONFIG_XEN_PV
> +#if defined(CONFIG_XEN_PV) && defined(CONFIG_X86_64)
> DECLARE_IDTENTRY_RAW(X86_TRAP_NMI,    xenpv_exc_nmi);
> #endif
> 
> @@ -563,7 +563,7 @@ DECLARE_IDTENTRY_DEBUG(X86_TRAP_DB,    exc_debug);
> #else
> DECLARE_IDTENTRY_RAW(X86_TRAP_DB,    exc_debug);
> #endif
> -#ifdef CONFIG_XEN_PV
> +#if defined(CONFIG_XEN_PV) && defined(CONFIG_X86_64)
> DECLARE_IDTENTRY_RAW(X86_TRAP_DB,    xenpv_exc_debug);
> #endif
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [tip: x86/urgent] x86/entry/32: Fix XEN_PV build dependency
  2020-07-05 20:24 ` Andy Lutomirski
@ 2020-07-06  4:15   ` Jürgen Groß
  0 siblings, 0 replies; 3+ messages in thread
From: Jürgen Groß @ 2020-07-06  4:15 UTC (permalink / raw)
  To: Andy Lutomirski, linux-kernel
  Cc: linux-tip-commits, Andy Lutomirski, Thomas Gleixner,
	Peter Zijlstra (Intel),
	Ingo Molnar, x86

On 05.07.20 22:24, Andy Lutomirski wrote:
> 
> 
>> On Jul 5, 2020, at 12:44 PM, tip-bot2 for Ingo Molnar <tip-bot2@linutronix.de> wrote:
>>
>> The following commit has been merged into the x86/urgent branch of tip:
>>
>> Commit-ID:     a4c0e91d1d65bc58f928b80ed824e10e165da22c
>> Gitweb:        https://git.kernel.org/tip/a4c0e91d1d65bc58f928b80ed824e10e165da22c
>> Author:        Ingo Molnar <mingo@kernel.org>
>> AuthorDate:    Sun, 05 Jul 2020 21:33:11 +02:00
>> Committer:     Ingo Molnar <mingo@kernel.org>
>> CommitterDate: Sun, 05 Jul 2020 21:39:23 +02:00
>>
>> x86/entry/32: Fix XEN_PV build dependency
>>
>> xenpv_exc_nmi() and xenpv_exc_debug() are only defined on 64-bit kernels,
>> but they snuck into the 32-bit build via <asm/identry.h>, causing the link
>> to fail:
>>
>>   ld: arch/x86/entry/entry_32.o: in function `asm_xenpv_exc_nmi':
>>   (.entry.text+0x817): undefined reference to `xenpv_exc_nmi'
>>
>>   ld: arch/x86/entry/entry_32.o: in function `asm_xenpv_exc_debug':
>>   (.entry.text+0x827): undefined reference to `xenpv_exc_debug'
>>
>> Only use them on 64-bit kernels.
> 
> Jürgen, can you queue a revert for when PV32 goes away?

Yes, will do.


Juergen

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-07-06  4:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-05 19:44 [tip: x86/urgent] x86/entry/32: Fix XEN_PV build dependency tip-bot2 for Ingo Molnar
2020-07-05 20:24 ` Andy Lutomirski
2020-07-06  4:15   ` Jürgen Groß

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).