Skip to contentSkip to conversation

Summit support for pcibus <-> cpumask topology

PATCH New Matthew Dobson 1 participant 1 message Mar 14, 2003

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Summit support for pcibus <-> cpumask topology

Here's a patch to dig the PCI bus to node mapping information out of the deep, dank recesses of the EBDA tables for the Summit machines. This info is then used for the pcibus_to_cpumask() topology function.

brief summary:
This patch adds a new file, arch/i386/kernel/summit.c, for summit-specific code. Adds some structures to mach_mpparse.h. Also adds a hook in setup_arch() to dig out the PCI info, and stores it in the mp_bus_id_to_node[] array, where it can be read by the topology functions.

As always, questions, comments, or praise (yeah, right) welcome!

 arch/i386/kernel/Makefile                   |    1
 arch/i386/kernel/setup.c                    |    3
 arch/i386/kernel/summit.c                   |  162 
++++++++++++++++++++++++++++
 include/asm-i386/mach-summit/mach_mpparse.h |   69 +++++++++++
 include/asm-i386/mpspec.h                   |    4
 5 files changed, 239 insertions(+)

Cheers!

-Matt

arch/i386/kernel/Makefile +1 -0
diff -Nur --exclude-from=/usr/src/.dontdiff linux-2.5.64-vanilla/arch/i386/kernel/Makefile linux-2.5.64-summit_pcimap/arch/i386/kernel/Makefile
@@ -25,6 +25,7 @@
 obj-$(CONFIG_X86_IO_APIC)	+= io_apic.o
 obj-$(CONFIG_SOFTWARE_SUSPEND)	+= suspend.o suspend_asm.o
 obj-$(CONFIG_X86_NUMAQ)		+= numaq.o
+obj-$(CONFIG_X86_SUMMIT)	+= summit.o
 obj-$(CONFIG_EDD)             	+= edd.o
 obj-$(CONFIG_MODULES)		+= module.o
 obj-y				+= sysenter.o
arch/i386/kernel/setup.c +3 -0
diff -Nur --exclude-from=/usr/src/.dontdiff linux-2.5.64-vanilla/arch/i386/kernel/setup.c linux-2.5.64-summit_pcimap/arch/i386/kernel/setup.c
@@ -918,6 +918,9 @@
 	if (smp_found_config)
 		get_smp_config();
 #endif
+#ifdef CONFIG_X86_SUMMIT
+	setup_summit();
+#endif
 
 	register_memory(max_low_pfn);
 
arch/i386/kernel/summit.c +162 -0

162 lines not on this page · raw message

include/asm-i386/mach-summit/mach_mpparse.h +69 -0

79 lines not on this page · raw message

include/asm-i386/mpspec.h +4 -0
diff -Nur --exclude-from=/usr/src/.dontdiff linux-2.5.64-vanilla/include/asm-i386/mpspec.h linux-2.5.64-summit_pcimap/include/asm-i386/mpspec.h
@@ -222,6 +222,10 @@
 extern int pic_mode;
 extern int using_apic_timer;
 
+#ifdef CONFIG_X86_SUMMIT
+extern void setup_summit (void);
+#endif
+
 #ifdef CONFIG_ACPI_BOOT
 extern void mp_register_lapic (u8 id, u8 enabled);
 extern void mp_register_lapic_address (u64 address);