linux/debian/patches/bugfix/mips/smp-cpu-bringup.patch

86 lines
2.2 KiB
Diff
Raw Normal View History

* Add patches from linux-mips.org's 2.6.18-stable branch: - bugfix/copy-user-highpage.patch, needed for cache alias handling on mips/mipsel/hppa. - bugfix/mips/syscall-wiring.patch, fixes TLS register access, and n32 rt_sigqueueinfo. - bugfix/mips/sb1-flush-cache-data-page.patch, missing cache flush on SB-1. - bugfix/mips/trylock.patch, fix trylock implementation for R1x000 and R3xxx. - bugfix/mips/smp-cpu-bringup.patch, correct initialization of non-contiguous CPU topology. - bugfix/mips/header-exports.patch, clean up userland exports of kernel headers. - bugfix/mips/sb1-interrupt-handler.patch, fix broken interrupt routing on SB-1. - bugfix/mips/cache-alias.patch, fixes #387498 for mips/mipsel. - bugfix/mips/ip22-zilog-console.patch, fix long delays seen with SGI ip22 serial console. - bugfix/mips/signal-handling.patch, fixes a signal handling race condition shown with gdb. - bugfix/mips/sb1-duart-tts.patch, replaces mips-sb1-duart-tts.patch, use standard Linux names for SB-1 consoles. - bugfix/mips/wait-race.patch, correct behaviour of the idle loop. - bugfix/mips/sgi-ioc3.patch, checksumming fix for IOC3 network driver. - features/mips/qemu-kernel.patch, support for the mips/mipsel machine emulated by Qemu. - features/mips/backtrace.patch, reimplementation of stack analysis and backtrace printing, useful for in-kernel debugging. - bugfix/mips/dec-scsi.patch, replaces mips-dec-scsi.patch, fixes DSP SCSI driver for DECstations. - bugfix/mips/dec-serial.patch, replaces mips-dec-serial.patch, fix serial console handling on DECstations. svn path=/dists/trunk/linux-2.6/; revision=7681
2006-11-02 09:54:18 +00:00
# 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;