* [PATCH] x86: xen: Fix xen_initdom_restore_msi #ifdef
@ 2021-12-15 14:01 Arnd Bergmann
2021-12-15 15:19 ` [tip: irq/msi] x86/xen: Use correct #ifdef guard for xen_initdom_restore_msi() tip-bot2 for Arnd Bergmann
0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2021-12-15 14:01 UTC (permalink / raw)
To: Thomas Gleixner
Cc: Arnd Bergmann, Boris Ostrovsky, Juergen Gross, Stefano Stabellini,
Ingo Molnar, Borislav Petkov, Dave Hansen, x86, H. Peter Anvin,
Bjorn Helgaas, Jason Gunthorpe, xen-devel, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
The #ifdef check around the definition doesn't match the one around the
declaration, leading to a link failure when CONFIG_XEN_DOM0 is enabled
but CONFIG_XEN_PV_DOM0 is not:
x86_64-linux-ld: arch/x86/kernel/apic/msi.o: in function `arch_restore_msi_irqs':
msi.c:(.text+0x29a): undefined reference to `xen_initdom_restore_msi'
Change the declaration to use the same check that was already
present around the function definition.
Fixes: ae72f3156729 ("PCI/MSI: Make arch_restore_msi_irqs() less horrible.")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
This should go on top the irq/msi branch of the tip tree, which
introduced the build regression
---
arch/x86/include/asm/xen/hypervisor.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/include/asm/xen/hypervisor.h b/arch/x86/include/asm/xen/hypervisor.h
index 677f84d0039f..1bf2ad34188a 100644
--- a/arch/x86/include/asm/xen/hypervisor.h
+++ b/arch/x86/include/asm/xen/hypervisor.h
@@ -59,7 +59,7 @@ static inline bool __init xen_x2apic_para_available(void)
struct pci_dev;
-#ifdef CONFIG_XEN_DOM0
+#ifdef CONFIG_XEN_PV_DOM0
bool xen_initdom_restore_msi(struct pci_dev *dev);
#else
static inline bool xen_initdom_restore_msi(struct pci_dev *dev) { return true; }
--
2.29.2
^ permalink raw reply related [flat|nested] 2+ messages in thread* [tip: irq/msi] x86/xen: Use correct #ifdef guard for xen_initdom_restore_msi()
2021-12-15 14:01 [PATCH] x86: xen: Fix xen_initdom_restore_msi #ifdef Arnd Bergmann
@ 2021-12-15 15:19 ` tip-bot2 for Arnd Bergmann
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot2 for Arnd Bergmann @ 2021-12-15 15:19 UTC (permalink / raw)
To: linux-tip-commits; +Cc: Arnd Bergmann, Thomas Gleixner, x86, linux-kernel
The following commit has been merged into the irq/msi branch of tip:
Commit-ID: 91f7d2dbf952f54442fa81bb62f78ee023179bf9
Gitweb: https://git.kernel.org/tip/91f7d2dbf952f54442fa81bb62f78ee023179bf9
Author: Arnd Bergmann <arnd@arndb.de>
AuthorDate: Wed, 15 Dec 2021 15:01:59 +01:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Wed, 15 Dec 2021 16:13:23 +01:00
x86/xen: Use correct #ifdef guard for xen_initdom_restore_msi()
The #ifdef check around the definition doesn't match the one around the
declaration, leading to a link failure when CONFIG_XEN_DOM0 is enabled
but CONFIG_XEN_PV_DOM0 is not:
x86_64-linux-ld: arch/x86/kernel/apic/msi.o: in function `arch_restore_msi_irqs':
msi.c:(.text+0x29a): undefined reference to `xen_initdom_restore_msi'
Change the declaration to use the same check that was already present
around the function definition.
Fixes: ae72f3156729 ("PCI/MSI: Make arch_restore_msi_irqs() less horrible.")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20211215140209.451379-1-arnd@kernel.org
---
arch/x86/include/asm/xen/hypervisor.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/include/asm/xen/hypervisor.h b/arch/x86/include/asm/xen/hypervisor.h
index 677f84d..1bf2ad3 100644
--- a/arch/x86/include/asm/xen/hypervisor.h
+++ b/arch/x86/include/asm/xen/hypervisor.h
@@ -59,7 +59,7 @@ static inline bool __init xen_x2apic_para_available(void)
struct pci_dev;
-#ifdef CONFIG_XEN_DOM0
+#ifdef CONFIG_XEN_PV_DOM0
bool xen_initdom_restore_msi(struct pci_dev *dev);
#else
static inline bool xen_initdom_restore_msi(struct pci_dev *dev) { return true; }
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-15 15:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-15 14:01 [PATCH] x86: xen: Fix xen_initdom_restore_msi #ifdef Arnd Bergmann
2021-12-15 15:19 ` [tip: irq/msi] x86/xen: Use correct #ifdef guard for xen_initdom_restore_msi() tip-bot2 for Arnd Bergmann
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.