Skip to content

Commit a4c0e91

Browse files
author
Ingo Molnar
committed
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: f41f082: ("x86/entry/xen: Route #DB correctly on Xen PV") Cc: Andy Lutomirski <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Peter Zijlstra (Intel) <[email protected]> Cc: [email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent cc80183 commit a4c0e91

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/x86/include/asm/idtentry.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ DECLARE_IDTENTRY_RAW(X86_TRAP_MC, exc_machine_check);
553553

554554
/* NMI */
555555
DECLARE_IDTENTRY_NMI(X86_TRAP_NMI, exc_nmi);
556-
#ifdef CONFIG_XEN_PV
556+
#if defined(CONFIG_XEN_PV) && defined(CONFIG_X86_64)
557557
DECLARE_IDTENTRY_RAW(X86_TRAP_NMI, xenpv_exc_nmi);
558558
#endif
559559

@@ -563,7 +563,7 @@ DECLARE_IDTENTRY_DEBUG(X86_TRAP_DB, exc_debug);
563563
#else
564564
DECLARE_IDTENTRY_RAW(X86_TRAP_DB, exc_debug);
565565
#endif
566-
#ifdef CONFIG_XEN_PV
566+
#if defined(CONFIG_XEN_PV) && defined(CONFIG_X86_64)
567567
DECLARE_IDTENTRY_RAW(X86_TRAP_DB, xenpv_exc_debug);
568568
#endif
569569

0 commit comments

Comments
 (0)