Skip to contentSkip to conversation

x86/pci: patches for tip/x86/unify-pci

PATCH In review Robert Richter 4 participants 16 messages Jul 10, 2008 – Jul 11, 2008

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

cover x86/pci: patches for tip/x86/unify-pci

This patch series contains patches for tip/x86/unify-pci. It fixes NUMA initialization code reflecting latest changes in tip/master. Also there are build fixes and minor cleanups. Patch #5 is a cherry pick that fixes build on UP systems. Code reboots for smp/nosmp, acpi/noacpi, numaq, 32/64bit. It compiles for visws.

#1 lore raw

PATCH 1/5 x86/pci: Fix build error for X86_VISWS

---
 arch/x86/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/Kconfig +1 -1
index bb0c0d0..51329ee 100644
@@ -283,7 +283,7 @@ config X86_VOYAGER
 
 config X86_VISWS
 	bool "SGI 320/540 (Visual Workstation)"
-	depends on X86_32 && !PCI
+	depends on X86_32 && PCI
 	help
 	  The SGI Visual Workstation series is an IA32-based workstation
 	  based on SGI systems chips with some legacy PC hardware attached.
Signature · 1 line
1.5.5.4
#2 lore raw

PATCH 2/5 x86/pci: Makefile merge: Changing 32bit ordering

In reply to Robert Richter

This should be save since VISWS and NUMAQ exclud each other.

---
 arch/x86/pci/Makefile |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
arch/x86/pci/Makefile +1 -2
index 99d9f09..2a08d2d 100644
@@ -8,12 +8,11 @@ obj-$(CONFIG_PCI_OLPC)		+= olpc.o
 pci-y				:= fixup.o
 pci-$(CONFIG_ACPI)		+= acpi.o
 pci-y				+= legacy.o irq.o
+pci-$(CONFIG_X86_NUMAQ)		+= numa.o
 
 # Careful: VISWS overrule the pci-y above. The colons are
 # therefor correct. This needs a proper fix by distangling the code.
 pci-$(CONFIG_X86_VISWS)		:= visws.o fixup.o
 
-pci-$(CONFIG_X86_NUMAQ)		+= numa.o
-
 obj-y				+= $(pci-y) common.o early.o
 obj-y				+= amd_bus.o
Signature · 1 line
1.5.5.4
#3 lore raw

PATCH 3/5 x86/pci merge: Fixing numaq initialization

In reply to Robert Richter

Patch d49c4288 (tip/x86/mpparse) introduced some changes in calling subsys_init calls if CONFIG_X86_NUMAQ option is set. This patch updates subsystem initalization according to this changes.

---
 arch/x86/pci/legacy.c |    3 +++
 arch/x86/pci/numa.c   |   10 +---------
 arch/x86/pci/pci.h    |    1 +
 3 files changed, 5 insertions(+), 9 deletions(-)
arch/x86/pci/legacy.c +3 -0
index 3c1d795..d8b6e92 100644
@@ -62,6 +62,9 @@ int __init pci_subsys_init(void)
 #endif
 	pci_legacy_init();
 	pcibios_irq_init();
+#ifdef CONFIG_X86_NUMAQ
+	pci_numa_init();
+#endif
 	pcibios_init();
 }
 subsys_initcall(pci_subsys_init);
arch/x86/pci/numa.c +1 -9
index e1620dc..8b5ca19 100644
@@ -151,7 +151,7 @@ static void __devinit pci_fixup_i450nx(struct pci_dev *d)
 }
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82451NX, pci_fixup_i450nx);
 
-static int __init pci_numa_init(void)
+int __init pci_numa_init(void)
 {
 	int quad;
 
@@ -176,11 +176,3 @@ static int __init pci_numa_init(void)
 		}
 	return 0;
 }
-
-static __init int pci_subsys_init(void)
-{
-	pci_numa_init();
-	pcibios_irq_init();
-	pcibios_init();
-}
-subsys_initcall(pci_subsys_init);
arch/x86/pci/pci.h +1 -0
index 5824174..b2270a5 100644
@@ -107,6 +107,7 @@ extern void __init dmi_check_skip_isa_align(void);
 /* some common used subsys_initcalls */
 extern int __init pci_acpi_init(void);
 extern int __init pcibios_irq_init(void);
+extern int __init pci_numa_init(void);
 extern int __init pcibios_init(void);
 
 /* pci-mmconfig.c */
Signature · 1 line
1.5.5.4
#4 lore raw

Re: [PATCH 3/5] x86/pci merge: Fixing numaq initialization

Quoted 16 lines · Robert Richter

Patch d49c4288 (tip/x86/mpparse) introduced some changes in calling subsys_init calls if CONFIG_X86_NUMAQ option is set. This patch updates subsystem initalization according to this changes.

---
 arch/x86/pci/legacy.c |    3 +++
 arch/x86/pci/numa.c   |   10 +---------
 arch/x86/pci/pci.h    |    1 +
 3 files changed, 5 insertions(+), 9 deletions(-)
arch/x86/pci/legacy.c +0 -0
index 3c1d795..d8b6e92 100644

arch/x86/pci/legacy.c int __init pci_subsys_init(void) · line 69

Quoted 8 lines
arch/x86/pci/legacy.c +3 -0
@@ -62,6 +62,9 @@ int __init pci_subsys_init(void)
 #endif
       pci_legacy_init();
       pcibios_irq_init();
+#ifdef CONFIG_X86_NUMAQ
+       pci_numa_init();
+#endif
       pcibios_init();
 }

please change sequence to

+#ifdef CONFIG_X86_NUMAQ
+ pci_numa_init();
+#endif

#ifdef CONFIG_ACPI
        pci_acpi_init();
#endif
        pci_legacy_init();

YH

#5 lore raw

PATCH 4/5 x86/pci: Fix warnings in subsys_initcall functions

In reply to Robert Richter
---
 arch/x86/pci/legacy.c |    2 ++
 arch/x86/pci/visws.c  |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)
arch/x86/pci/legacy.c +2 -0
index d8b6e92..132876c 100644
@@ -66,5 +66,7 @@ int __init pci_subsys_init(void)
 	pci_numa_init();
 #endif
 	pcibios_init();
+
+	return 0;
 }
 subsys_initcall(pci_subsys_init);
arch/x86/pci/visws.c +2 -0
index 16e5206..852998b 100644
@@ -109,5 +109,7 @@ static __init int pci_subsys_init(void)
 {
 	pci_visws_init();
 	pcibios_init();
+
+	return 0;
 }
 subsys_initcall(pci_subsys_init);
Signature · 1 line
1.5.5.4
#6 lore raw

PATCH 5/5 x86: build fix for "x86: fix C1E && nx6325 stability problem"

In reply to Robert Richter

From: Ingo Molnar <[email protected]>

fix:

arch/x86/kernel/built-in.o: In function `dmi_ignore_irq0_timer_override':
boot.c:(.init.text+0x3ea4): undefined reference to `force_mask_ioapic_irq_2'

---
 include/asm-x86/genapic_32.h |    4 ++++
 include/asm-x86/genapic_64.h |    4 ++++
 2 files changed, 8 insertions(+), 0 deletions(-)
include/asm-x86/genapic_32.h +4 -0
index 8d4c8bd..33a73f5 100644
@@ -119,6 +119,10 @@ enum uv_system_type {UV_NONE, UV_LEGACY_APIC, UV_X2APIC, UV_NON_UNIQUE_APIC};
 #define is_uv_system()			0
 #define uv_wakeup_secondary(a, b)	1
 
+#ifdef CONFIG_X86_IO_APIC
 extern void force_mask_ioapic_irq_2(void);
+#else
+static inline void force_mask_ioapic_irq_2(void) { }
+#endif
 
 #endif
include/asm-x86/genapic_64.h +4 -0
index 082ad02..647e4e5 100644
@@ -46,6 +46,10 @@ extern int uv_wakeup_secondary(int phys_apicid, unsigned int start_rip);
 
 extern void setup_apic_routing(void);
 
+#ifdef CONFIG_X86_IO_APIC
 extern void force_mask_ioapic_irq_2(void);
+#else
+static inline void force_mask_ioapic_irq_2(void) { }
+#endif
 
 #endif
Signature · 1 line
1.5.5.4
#7 lore raw
In reply to Robert Richter
Quoted 5 lines · Robert Richter

This patch series contains patches for tip/x86/unify-pci. It fixes NUMA initialization code reflecting latest changes in tip/master. Also there are build fixes and minor cleanups. Patch #5 is a cherry pick that fixes build on UP systems. Code reboots for smp/nosmp, acpi/noacpi, numaq, 32/64bit. It compiles for visws.

thanks Robert. Today i've eliminated the VISWS subarch which greatly simplified your series. I've picked up these two fixes:

Robert Richter (2):
x86/pci merge: fixing numaq initialization x86/pci: fix warnings in subsys_initcall functions

the others were moot i think.

Please check the tip/x86/generalize-visws, i just pushed them all out.

Ingo

#8 lore raw
Quoted 8 lines · Ingo Molnar
Quoted 5 lines · Robert Richter

This patch series contains patches for tip/x86/unify-pci. It fixes NUMA initialization code reflecting latest changes in tip/master. Also there are build fixes and minor cleanups. Patch #5 is a cherry pick that fixes build on UP systems. Code reboots for smp/nosmp, acpi/noacpi, numaq, 32/64bit. It compiles for visws.

Quoted 6 lines

thanks Robert. Today i've eliminated the VISWS subarch which greatly simplified your series. I've picked up these two fixes:

Robert Richter (2):
x86/pci merge: fixing numaq initialization x86/pci: fix warnings in subsys_initcall functions

btw., this is how arch/x86/pci/Makefile looks like now in tip/master:

----------------------------------------->

pci-y                           := fixup.o
pci-$(CONFIG_ACPI)              += acpi.o
pci-y                           += legacy.o irq.o

pci-$(CONFIG_X86_VISWS) += visws.o

pci-$(CONFIG_X86_NUMAQ) += numa.o

obj-y += $(pci-y) common.o early.o
obj-y += amd_bus.o
<-----------------------------------------

it's _really_ clean now, and we dont have those weird overrides anymore. Both VisWS and NUMAQ are now two straightforward runtime PCI overrides - not build-time complications. Much more maintainable i think.

Ingo

#9 lore raw
Quoted 25 lines · Ingo Molnar
Quoted 8 lines · Ingo Molnar
Quoted 5 lines · Robert Richter

This patch series contains patches for tip/x86/unify-pci. It fixes NUMA initialization code reflecting latest changes in tip/master. Also there are build fixes and minor cleanups. Patch #5 is a cherry pick that fixes build on UP systems. Code reboots for smp/nosmp, acpi/noacpi, numaq, 32/64bit. It compiles for visws.

Quoted 6 lines

thanks Robert. Today i've eliminated the VISWS subarch which greatly simplified your series. I've picked up these two fixes:

Robert Richter (2):
x86/pci merge: fixing numaq initialization x86/pci: fix warnings in subsys_initcall functions

btw., this is how arch/x86/pci/Makefile looks like now in tip/master:

----------------------------------------->

pci-y                           := fixup.o
pci-$(CONFIG_ACPI)              += acpi.o
pci-y                           += legacy.o irq.o
Quoted 7 lines

pci-$(CONFIG_X86_VISWS) += visws.o

pci-$(CONFIG_X86_NUMAQ) += numa.o

obj-y += $(pci-y) common.o early.o
obj-y += amd_bus.o
<-----------------------------------------

So if I am not mistaken you can kill pci-y entirely:

obj-y                           := fixup.o
obj-$(CONFIG_ACPI)              += acpi.o
obj-y                           += legacy.o irq.o

obj-$(CONFIG_X86_VISWS) += visws.o

obj-$(CONFIG_X86_NUMAQ) += numa.o

obj-y += common.o early.o
obj-y += amd_bus.o

Sam

#10 lore raw
Quoted 40 lines · Sam Ravnborg
Quoted 25 lines · Ingo Molnar
Quoted 8 lines · Ingo Molnar
Quoted 5 lines · Robert Richter

This patch series contains patches for tip/x86/unify-pci. It fixes NUMA initialization code reflecting latest changes in tip/master. Also there are build fixes and minor cleanups. Patch #5 is a cherry pick that fixes build on UP systems. Code reboots for smp/nosmp, acpi/noacpi, numaq, 32/64bit. It compiles for visws.

Quoted 6 lines

thanks Robert. Today i've eliminated the VISWS subarch which greatly simplified your series. I've picked up these two fixes:

Robert Richter (2):
x86/pci merge: fixing numaq initialization x86/pci: fix warnings in subsys_initcall functions

btw., this is how arch/x86/pci/Makefile looks like now in tip/master:

----------------------------------------->

pci-y                           := fixup.o
pci-$(CONFIG_ACPI)              += acpi.o
pci-y                           += legacy.o irq.o
Quoted 7 lines

pci-$(CONFIG_X86_VISWS) += visws.o

pci-$(CONFIG_X86_NUMAQ) += numa.o

obj-y += $(pci-y) common.o early.o
obj-y += amd_bus.o
<-----------------------------------------

So if I am not mistaken you can kill pci-y entirely:

obj-y                           := fixup.o
obj-$(CONFIG_ACPI)              += acpi.o
obj-y                           += legacy.o irq.o
Quoted 6 lines

obj-$(CONFIG_X86_VISWS) += visws.o

obj-$(CONFIG_X86_NUMAQ) += numa.o

obj-y += common.o early.o
obj-y += amd_bus.o

ah, indeed :-) Very nice.

Ingo

#11 lore raw
Quoted 31 lines · Ingo Molnar
Quoted 28 lines · Sam Ravnborg
Quoted 27 lines · Ingo Molnar
Quoted 8 lines · Ingo Molnar
Quoted 5 lines · Robert Richter

This patch series contains patches for tip/x86/unify-pci. It fixes NUMA initialization code reflecting latest changes in tip/master. Also there are build fixes and minor cleanups. Patch #5 is a cherry pick that fixes build on UP systems. Code reboots for smp/nosmp, acpi/noacpi, numaq, 32/64bit. It compiles for visws.

Quoted 6 lines

thanks Robert. Today i've eliminated the VISWS subarch which greatly simplified your series. I've picked up these two fixes:

Robert Richter (2):
x86/pci merge: fixing numaq initialization x86/pci: fix warnings in subsys_initcall functions

btw., this is how arch/x86/pci/Makefile looks like now in tip/master:

----------------------------------------->

pci-y                           := fixup.o
pci-$(CONFIG_ACPI)              += acpi.o
pci-y                           += legacy.o irq.o

pci-$(CONFIG_X86_VISWS) += visws.o

Quoted 7 lines
Quoted 7 lines
Quoted 5 lines

pci-$(CONFIG_X86_NUMAQ) += numa.o

obj-y += $(pci-y) common.o early.o
obj-y += amd_bus.o
<-----------------------------------------

So if I am not mistaken you can kill pci-y entirely:

Yes, but...

Quoted 2 lines
Quoted 2 lines

obj-y := fixup.o

... this is with a plus:

obj-y += fixup.o

Quoted 14 lines
Quoted 9 lines

obj-$(CONFIG_ACPI) += acpi.o
obj-y += legacy.o irq.o

obj-$(CONFIG_X86_VISWS) += visws.o

obj-$(CONFIG_X86_NUMAQ) += numa.o

obj-y += common.o early.o
obj-y += amd_bus.o

ah, indeed :-) Very nice.

Ingo

Signature · 3 lines
Advanced Micro Devices, Inc.
Operating System Research Center
email: [email protected]
#12 lore raw
Quoted 11 lines
Quoted 2 lines
Quoted 2 lines

So if I am not mistaken you can kill pci-y entirely:

Yes, but...

Quoted 2 lines
Quoted 2 lines

obj-y := fixup.o

... this is with a plus:

obj-y += fixup.o

obj-y is empty when you enter the Makefile.
So if you start out with ':=' or '+=' is no difference.

Sam

#13 lore raw
Quoted 6 lines · Sam Ravnborg
Quoted 6 lines
Quoted 2 lines
Quoted 2 lines

So if I am not mistaken you can kill pci-y entirely:

Yes, but...

Quoted 1 line
Quoted 1 line
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Quoted 1 line

obj-y := fixup.o

... this is with a plus:

obj-y += fixup.o

obj-y is empty when you enter the Makefile.
So if you start out with ':=' or '+=' is no difference.

i guess it's safer to use +=, because it's ordering invariant.

We should use := only if we absolutely want to override the current rules.

Ingo

#14 lore raw
Quoted 8 lines
Quoted 3 lines

obj-y is empty when you enter the Makefile.
So if you start out with ':=' or '+=' is no difference.

i guess it's safer to use +=, because it's ordering invariant.

We should use := only if we absolutely want to override the current rules.

In the past I was carefully to use ':=' for the first assignmnet so the variable was a " simply expanded variables" variable.
But as I have added a 'obj-y := ' in kbuild we should
be safe.

" simply expanded variables" is some special make stuff.

A typical:

FOO = bar

is a "recursively expanded variable".
Here the assingment is evaluated on each usage.

Sam

#15 lore raw
In reply to Ingo Molnar
Quoted 29 lines · Ingo Molnar
Quoted 8 lines · Ingo Molnar
Quoted 5 lines · Robert Richter

This patch series contains patches for tip/x86/unify-pci. It fixes NUMA initialization code reflecting latest changes in tip/master. Also there are build fixes and minor cleanups. Patch #5 is a cherry pick that fixes build on UP systems. Code reboots for smp/nosmp, acpi/noacpi, numaq, 32/64bit. It compiles for visws.

Quoted 6 lines

thanks Robert. Today i've eliminated the VISWS subarch which greatly simplified your series. I've picked up these two fixes:

Robert Richter (2):
x86/pci merge: fixing numaq initialization x86/pci: fix warnings in subsys_initcall functions

btw., this is how arch/x86/pci/Makefile looks like now in tip/master:

----------------------------------------->

pci-y                           := fixup.o
pci-$(CONFIG_ACPI)              += acpi.o
pci-y                           += legacy.o irq.o

pci-$(CONFIG_X86_VISWS) += visws.o

pci-$(CONFIG_X86_NUMAQ) += numa.o

Quoted 7 lines

obj-y += $(pci-y) common.o early.o
obj-y += amd_bus.o
<-----------------------------------------

it's _really_ clean now, and we dont have those weird overrides anymore. Both VisWS and NUMAQ are now two straightforward runtime PCI overrides - not build-time complications. Much more maintainable i think.

Yes, it really looks nice now.

-Robert

Signature · 3 lines
Advanced Micro Devices, Inc.
Operating System Research Center
email: [email protected]