86 lines
2.2 KiB
Diff
86 lines
2.2 KiB
Diff
# Fix bringup of non-contiguous CPU topology, from linux-mips.org
|
|
# 2.6.18-stable, scheduled for kernel.org mainline.
|
|
|
|
|
|
diff --git a/include/asm-mips/irq.h b/include/asm-mips/irq.h
|
|
index 896550b..d35c617 100644
|
|
--- a/include/asm-mips/irq.h
|
|
+++ b/include/asm-mips/irq.h
|
|
@@ -76,8 +76,4 @@ extern int setup_irq_smtc(unsigned int i
|
|
unsigned long hwmask);
|
|
#endif /* CONFIG_MIPS_MT_SMTC */
|
|
|
|
-#ifdef CONFIG_SMP
|
|
-#define ARCH_HAS_IRQ_PER_CPU
|
|
-#endif
|
|
-
|
|
#endif /* _ASM_IRQ_H */
|
|
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
|
|
index 330f6ab..96165d7 100644
|
|
--- a/arch/mips/Kconfig
|
|
+++ b/arch/mips/Kconfig
|
|
@@ -614,6 +610,7 @@ config SGI_IP27
|
|
select SYS_SUPPORTS_64BIT_KERNEL
|
|
select SYS_SUPPORTS_BIG_ENDIAN
|
|
select SYS_SUPPORTS_NUMA
|
|
+ select SYS_SUPPORTS_SMP
|
|
help
|
|
This are the SGI Origin 200, Origin 2000 and Onyx 2 Graphics
|
|
workstations. To compile a Linux kernel that runs on these, say Y
|
|
@@ -1649,9 +1648,7 @@ config GENERIC_IRQ_PROBE
|
|
default y
|
|
|
|
config IRQ_PER_CPU
|
|
- depends on SMP
|
|
bool
|
|
- default y
|
|
|
|
#
|
|
# - Highmem only makes sense for the 32-bit kernel.
|
|
@@ -1691,9 +1688,6 @@ config ARCH_DISCONTIGMEM_ENABLE
|
|
|
|
config ARCH_SPARSEMEM_ENABLE
|
|
bool
|
|
-
|
|
-config ARCH_SPARSEMEM_ENABLE
|
|
- bool
|
|
select SPARSEMEM_STATIC
|
|
|
|
config NUMA
|
|
@@ -1719,6 +1713,7 @@ source "mm/Kconfig"
|
|
config SMP
|
|
bool "Multi-Processing support"
|
|
depends on SYS_SUPPORTS_SMP
|
|
+ select IRQ_PER_CPU
|
|
help
|
|
This enables support for systems with more than one CPU. If you have
|
|
a system with only one CPU, like most personal computers, say N. If
|
|
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c
|
|
index 2218958..1af3612 100644
|
|
--- a/arch/mips/kernel/smp.c
|
|
+++ b/arch/mips/kernel/smp.c
|
|
@@ -467,14 +467,18 @@ static DEFINE_PER_CPU(struct cpu, cpu_de
|
|
|
|
static int __init topology_init(void)
|
|
{
|
|
- int cpu;
|
|
- int ret;
|
|
+ int i, ret;
|
|
|
|
- for_each_present_cpu(cpu) {
|
|
- ret = register_cpu(&per_cpu(cpu_devices, cpu), cpu);
|
|
+#ifdef CONFIG_NUMA
|
|
+ for_each_online_node(i)
|
|
+ register_one_node(i);
|
|
+#endif /* CONFIG_NUMA */
|
|
+
|
|
+ for_each_present_cpu(i) {
|
|
+ ret = register_cpu(&per_cpu(cpu_devices, i), i);
|
|
if (ret)
|
|
printk(KERN_WARNING "topology_init: register_cpu %d "
|
|
- "failed (%d)\n", cpu, ret);
|
|
+ "failed (%d)\n", i, ret);
|
|
}
|
|
|
|
return 0;
|