diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2006-02-15 10:17:19 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2006-03-21 08:27:45 -0500 |
commit | c1449c8fa40859eb269025a7db85b34115205f5b (patch) | |
tree | f92bf4d9544aec45b978ed8e3f638018054b3a5c /arch | |
parent | 37caa934af02bc01d0e1366a49e1c89360fa0f29 (diff) |
[MIPS] Symmetric Uniprocessor support for Qemu.
SMP bits needed to builds and run an SMP kernel. While only a single
processor is supported ATM it's still useful for some SMP debugging using
Qemu.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/mips/Kconfig | 2 | ||||
-rw-r--r-- | arch/mips/qemu/Makefile | 2 | ||||
-rw-r--r-- | arch/mips/qemu/q-smp.c | 48 |
3 files changed, 51 insertions, 1 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 9d1e78f9c060..6356f7d52ce6 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -1582,7 +1582,7 @@ source "mm/Kconfig" | |||
1582 | 1582 | ||
1583 | config SMP | 1583 | config SMP |
1584 | bool "Multi-Processing support" | 1584 | bool "Multi-Processing support" |
1585 | depends on CPU_RM9000 || ((SIBYTE_BCM1x80 || SIBYTE_BCM1x55 || SIBYTE_SB1250) && !SIBYTE_STANDALONE) || SGI_IP27 || MIPS_MT_SMP | 1585 | depends on CPU_RM9000 || ((SIBYTE_BCM1x80 || SIBYTE_BCM1x55 || SIBYTE_SB1250 || QEMU) && !SIBYTE_STANDALONE) || SGI_IP27 || MIPS_MT_SMP |
1586 | ---help--- | 1586 | ---help--- |
1587 | This enables support for systems with more than one CPU. If you have | 1587 | This enables support for systems with more than one CPU. If you have |
1588 | a system with only one CPU, like most personal computers, say N. If | 1588 | a system with only one CPU, like most personal computers, say N. If |
diff --git a/arch/mips/qemu/Makefile b/arch/mips/qemu/Makefile index 934944ab9e85..6a8e8bcef552 100644 --- a/arch/mips/qemu/Makefile +++ b/arch/mips/qemu/Makefile | |||
@@ -3,3 +3,5 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y = q-firmware.o q-int.o q-irq.o q-mem.o q-setup.o | 5 | obj-y = q-firmware.o q-int.o q-irq.o q-mem.o q-setup.o |
6 | |||
7 | obj-$(CONFIG_SMP) += q-smp.o | ||
diff --git a/arch/mips/qemu/q-smp.c b/arch/mips/qemu/q-smp.c new file mode 100644 index 000000000000..5a12354cd576 --- /dev/null +++ b/arch/mips/qemu/q-smp.c | |||
@@ -0,0 +1,48 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2006 by Ralf Baechle (ralf@linux-mips.org) | ||
7 | * | ||
8 | * Symmetric Uniprocessor (TM) Support | ||
9 | */ | ||
10 | #include <linux/kernel.h> | ||
11 | #include <linux/sched.h> | ||
12 | |||
13 | /* | ||
14 | * Send inter-processor interrupt | ||
15 | */ | ||
16 | void core_send_ipi(int cpu, unsigned int action) | ||
17 | { | ||
18 | panic(KERN_ERR "%s called", __FUNCTION__); | ||
19 | } | ||
20 | |||
21 | /* | ||
22 | * After we've done initial boot, this function is called to allow the | ||
23 | * board code to clean up state, if needed | ||
24 | */ | ||
25 | void prom_init_secondary(void) | ||
26 | { | ||
27 | } | ||
28 | |||
29 | void prom_smp_finish(void) | ||
30 | { | ||
31 | } | ||
32 | |||
33 | /* Hook for after all CPUs are online */ | ||
34 | void prom_cpus_done(void) | ||
35 | { | ||
36 | } | ||
37 | |||
38 | void __init prom_prepare_cpus(unsigned int max_cpus) | ||
39 | { | ||
40 | cpus_clear(phys_cpu_present_map); | ||
41 | } | ||
42 | |||
43 | /* | ||
44 | * Firmware CPU startup hook | ||
45 | */ | ||
46 | void prom_boot_secondary(int cpu, struct task_struct *idle) | ||
47 | { | ||
48 | } | ||