aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2007-02-08 02:34:04 -0500
committerPaul Mackerras <paulus@samba.org>2007-02-13 19:50:04 -0500
commit775aeff44774c6933d8f9c14e1f325d8acd03136 (patch)
tree72bbf4d7704f3237a7b3eb11cee89a68a1537a82 /arch
parentdce623e0827e8d0ad60ce7f385c3394bf1b0bae0 (diff)
[POWERPC] Move MPIC smp routines into mpic.c
Move a couple of MPIC smp routines into mpic.c, they're inside an SMP block in mpic.c - so they're still only built for SMP. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/kernel/smp.c23
-rw-r--r--arch/powerpc/sysdev/mpic.c21
2 files changed, 21 insertions, 23 deletions
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index 0e8beca460af..924d692bc8f9 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -78,29 +78,6 @@ int smt_enabled_at_boot = 1;
78 78
79static void (*crash_ipi_function_ptr)(struct pt_regs *) = NULL; 79static void (*crash_ipi_function_ptr)(struct pt_regs *) = NULL;
80 80
81#ifdef CONFIG_MPIC
82int __init smp_mpic_probe(void)
83{
84 int nr_cpus;
85
86 DBG("smp_mpic_probe()...\n");
87
88 nr_cpus = cpus_weight(cpu_possible_map);
89
90 DBG("nr_cpus: %d\n", nr_cpus);
91
92 if (nr_cpus > 1)
93 mpic_request_ipis();
94
95 return nr_cpus;
96}
97
98void __devinit smp_mpic_setup_cpu(int cpu)
99{
100 mpic_setup_this_cpu();
101}
102#endif /* CONFIG_MPIC */
103
104#ifdef CONFIG_PPC64 81#ifdef CONFIG_PPC64
105void __devinit smp_generic_kick_cpu(int nr) 82void __devinit smp_generic_kick_cpu(int nr)
106{ 83{
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index aa701cc27ecc..4e54a09dd33b 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -1395,4 +1395,25 @@ void smp_mpic_message_pass(int target, int msg)
1395 break; 1395 break;
1396 } 1396 }
1397} 1397}
1398
1399int __init smp_mpic_probe(void)
1400{
1401 int nr_cpus;
1402
1403 DBG("smp_mpic_probe()...\n");
1404
1405 nr_cpus = cpus_weight(cpu_possible_map);
1406
1407 DBG("nr_cpus: %d\n", nr_cpus);
1408
1409 if (nr_cpus > 1)
1410 mpic_request_ipis();
1411
1412 return nr_cpus;
1413}
1414
1415void __devinit smp_mpic_setup_cpu(int cpu)
1416{
1417 mpic_setup_this_cpu();
1418}
1398#endif /* CONFIG_SMP */ 1419#endif /* CONFIG_SMP */