summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/chrp/smp.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2005-11-05 10:33:55 +1100
committerPaul Mackerras <paulus@samba.org>2005-11-05 10:33:55 +1100
commit5ad570786158e327a1c5d32dd3d66f26d8de6340 (patch)
tree0b4aafe469c72e5887ed0379d62a0ee390db3160 /arch/powerpc/platforms/chrp/smp.c
parentc3df69cd854551cf70e9c63aa509c26621084f60 (diff)
downloadop-kernel-dev-5ad570786158e327a1c5d32dd3d66f26d8de6340.zip
op-kernel-dev-5ad570786158e327a1c5d32dd3d66f26d8de6340.tar.gz
powerpc: Merge smp.c and smp.h
This also moves setup_cpu_maps to setup-common.c (calling it smp_setup_cpu_maps) and uses it on both 32-bit and 64-bit. Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/chrp/smp.c')
-rw-r--r--arch/powerpc/platforms/chrp/smp.c39
1 files changed, 1 insertions, 38 deletions
diff --git a/arch/powerpc/platforms/chrp/smp.c b/arch/powerpc/platforms/chrp/smp.c
index 31ee49c..bb23159 100644
--- a/arch/powerpc/platforms/chrp/smp.c
+++ b/arch/powerpc/platforms/chrp/smp.c
@@ -35,43 +35,6 @@
#include <asm/smp.h>
#include <asm/mpic.h>
-extern unsigned long smp_chrp_cpu_nr;
-
-static int __init smp_chrp_probe(void)
-{
- struct device_node *cpus = NULL;
- unsigned int *reg;
- int reglen;
- int ncpus = 0;
- int cpuid;
- unsigned int phys;
-
- /* Count CPUs in the device-tree */
- cpuid = 1; /* the boot cpu is logical cpu 0 */
- while ((cpus = of_find_node_by_type(cpus, "cpu")) != NULL) {
- phys = ncpus;
- reg = (unsigned int *) get_property(cpus, "reg", &reglen);
- if (reg && reglen >= sizeof(unsigned int))
- /* hmmm, not having a reg property would be bad */
- phys = *reg;
- if (phys != boot_cpuid_phys) {
- set_hard_smp_processor_id(cpuid, phys);
- ++cpuid;
- }
- ++ncpus;
- }
-
- printk(KERN_INFO "CHRP SMP probe found %d cpus\n", ncpus);
-
- /* Nothing more to do if less than 2 of them */
- if (ncpus <= 1)
- return 1;
-
- mpic_request_ipis();
-
- return ncpus;
-}
-
static void __devinit smp_chrp_kick_cpu(int nr)
{
*(unsigned long *)KERNELBASE = nr;
@@ -114,7 +77,7 @@ void __devinit smp_chrp_take_timebase(void)
/* CHRP with openpic */
struct smp_ops_t chrp_smp_ops = {
.message_pass = smp_mpic_message_pass,
- .probe = smp_chrp_probe,
+ .probe = smp_mpic_probe,
.kick_cpu = smp_chrp_kick_cpu,
.setup_cpu = smp_chrp_setup_cpu,
.give_timebase = smp_chrp_give_timebase,
OpenPOWER on IntegriCloud