Skip to contentSkip to conversation

x86/PCI: Fix compile errors when CONFIG_PCI is disabled

PATCH In review Hans de Goede 3 participants 3 messages Oct 20, 2021 – Oct 25, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/PCI: Fix compile errors when CONFIG_PCI is disabled

arch/x86/include/asm/pci_x86.h uses a number of data -types and defines without including the headers which define these.

Instead so far it has been relying on files including it including the necessary headers first.

Recently a include <asm/pci_x86.h> was added to arch/x86/kernel/resource.c which does not include the necessary headers first.

Add the missing includes to arch/x86/include/asm/pci_x86.h to fix the compile errors (with certain .config-s) when it is included from arch/x86/kernel/resource.c.

Fixes f10507a66e36 ("x86/PCI: Ignore E820 reservations for bridge windows on newer systems")
---
 arch/x86/include/asm/pci_x86.h | 3 +++
 1 file changed, 3 insertions(+)
arch/x86/include/asm/pci_x86.h +3 -0
index 0bb4e7dd0ffc..c5413d8007ed 100644
@@ -5,7 +5,10 @@
  *	(c) 1999 Martin Mares <[email protected]>
  */
 
+#include <linux/errno.h>
+#include <linux/init.h>
 #include <linux/ioport.h>
+#include <linux/spinlock.h>
 
 #undef DEBUG
 
Signature · 1 line
2.31.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Hans de Goede

arch/x86/include/asm/pci_x86.h uses a number of data -types and defines without including the headers which define these.

Instead so far it has been relying on files including it including the necessary headers first.

Recently a include <asm/pci_x86.h> was added to arch/x86/kernel/resource.c which does not include the necessary headers first.

Quoted 7 lines

Add the missing includes to arch/x86/include/asm/pci_x86.h to fix the compile errors (with certain .config-s) when it is included from arch/x86/kernel/resource.c.

Fixes f10507a66e36 ("x86/PCI: Ignore E820 reservations for bridge windows on newer systems")
maintainer
#2 lore raw
Quoted 14 lines · Mika Westerberg
Quoted 13 lines · Hans de Goede

arch/x86/include/asm/pci_x86.h uses a number of data -types and defines without including the headers which define these.

Instead so far it has been relying on files including it including the necessary headers first.

Recently a include <asm/pci_x86.h> was added to arch/x86/kernel/resource.c which does not include the necessary headers first.

Add the missing includes to arch/x86/include/asm/pci_x86.h to fix the compile errors (with certain .config-s) when it is included from arch/x86/kernel/resource.c.

Quoted 5 lines
Quoted 3 lines
Fixes f10507a66e36 ("x86/PCI: Ignore E820 reservations for bridge windows on newer systems")

IIRC, this was squashed into the Fixes: patch:

https://lore.kernel.org/r/20211020211455.GA2641031@bhelgaas

Signature · 4 lines
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette