diff options
author | Paul Mackerras <paulus@samba.org> | 2006-03-27 18:22:10 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-03-27 18:22:10 -0500 |
commit | 0a26b1364f14852bc9a51db0ca63c5250c775627 (patch) | |
tree | 83422473cb4bf4c450012cded06288a0dc6abedf /arch/ppc/platforms/chrp_smp.c | |
parent | ff2e6d7e27cf1f757ab0d97e1a9e46de47152a0e (diff) |
ppc: Remove CHRP, POWER3 and POWER4 support from arch/ppc
32-bit CHRP machines are now supported only in arch/powerpc, as are
all 64-bit PowerPC processors. This means that we don't use
Open Firmware on any platform in arch/ppc any more.
This makes PReP support a single-platform option like every other
platform support option in arch/ppc now, thus CONFIG_PPC_MULTIPLATFORM
is gone from arch/ppc. CONFIG_PPC_PREP is the option that selects
PReP support and is generally what has replaced
CONFIG_PPC_MULTIPLATFORM within arch/ppc.
_machine is all but dead now, being #defined to 0.
Updated Makefiles, comments and Kconfig options generally to reflect
these changes.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/ppc/platforms/chrp_smp.c')
-rw-r--r-- | arch/ppc/platforms/chrp_smp.c | 99 |
1 files changed, 0 insertions, 99 deletions
diff --git a/arch/ppc/platforms/chrp_smp.c b/arch/ppc/platforms/chrp_smp.c deleted file mode 100644 index 97e539557ecb..000000000000 --- a/arch/ppc/platforms/chrp_smp.c +++ /dev/null | |||
@@ -1,99 +0,0 @@ | |||
1 | /* | ||
2 | * Smp support for CHRP machines. | ||
3 | * | ||
4 | * Written by Cort Dougan (cort@cs.nmt.edu) borrowing a great | ||
5 | * deal of code from the sparc and intel versions. | ||
6 | * | ||
7 | * Copyright (C) 1999 Cort Dougan <cort@cs.nmt.edu> | ||
8 | * | ||
9 | */ | ||
10 | |||
11 | #include <linux/config.h> | ||
12 | #include <linux/kernel.h> | ||
13 | #include <linux/sched.h> | ||
14 | #include <linux/smp.h> | ||
15 | #include <linux/smp_lock.h> | ||
16 | #include <linux/interrupt.h> | ||
17 | #include <linux/kernel_stat.h> | ||
18 | #include <linux/delay.h> | ||
19 | #include <linux/init.h> | ||
20 | #include <linux/spinlock.h> | ||
21 | |||
22 | #include <asm/ptrace.h> | ||
23 | #include <asm/atomic.h> | ||
24 | #include <asm/irq.h> | ||
25 | #include <asm/page.h> | ||
26 | #include <asm/pgtable.h> | ||
27 | #include <asm/sections.h> | ||
28 | #include <asm/io.h> | ||
29 | #include <asm/prom.h> | ||
30 | #include <asm/smp.h> | ||
31 | #include <asm/residual.h> | ||
32 | #include <asm/time.h> | ||
33 | #include <asm/open_pic.h> | ||
34 | #include <asm/machdep.h> | ||
35 | |||
36 | extern unsigned long smp_chrp_cpu_nr; | ||
37 | |||
38 | static int __init | ||
39 | smp_chrp_probe(void) | ||
40 | { | ||
41 | if (smp_chrp_cpu_nr > 1) | ||
42 | openpic_request_IPIs(); | ||
43 | |||
44 | return smp_chrp_cpu_nr; | ||
45 | } | ||
46 | |||
47 | static void __devinit | ||
48 | smp_chrp_kick_cpu(int nr) | ||
49 | { | ||
50 | *(unsigned long *)KERNELBASE = nr; | ||
51 | asm volatile("dcbf 0,%0"::"r"(KERNELBASE):"memory"); | ||
52 | } | ||
53 | |||
54 | static void __devinit | ||
55 | smp_chrp_setup_cpu(int cpu_nr) | ||
56 | { | ||
57 | if (OpenPIC_Addr) | ||
58 | do_openpic_setup_cpu(); | ||
59 | } | ||
60 | |||
61 | static DEFINE_SPINLOCK(timebase_lock); | ||
62 | static unsigned int timebase_upper = 0, timebase_lower = 0; | ||
63 | |||
64 | void __devinit | ||
65 | smp_chrp_give_timebase(void) | ||
66 | { | ||
67 | spin_lock(&timebase_lock); | ||
68 | call_rtas("freeze-time-base", 0, 1, NULL); | ||
69 | timebase_upper = get_tbu(); | ||
70 | timebase_lower = get_tbl(); | ||
71 | spin_unlock(&timebase_lock); | ||
72 | |||
73 | while (timebase_upper || timebase_lower) | ||
74 | barrier(); | ||
75 | call_rtas("thaw-time-base", 0, 1, NULL); | ||
76 | } | ||
77 | |||
78 | void __devinit | ||
79 | smp_chrp_take_timebase(void) | ||
80 | { | ||
81 | while (!(timebase_upper || timebase_lower)) | ||
82 | barrier(); | ||
83 | spin_lock(&timebase_lock); | ||
84 | set_tb(timebase_upper, timebase_lower); | ||
85 | timebase_upper = 0; | ||
86 | timebase_lower = 0; | ||
87 | spin_unlock(&timebase_lock); | ||
88 | printk("CPU %i taken timebase\n", smp_processor_id()); | ||
89 | } | ||
90 | |||
91 | /* CHRP with openpic */ | ||
92 | struct smp_ops_t chrp_smp_ops = { | ||
93 | .message_pass = smp_openpic_message_pass, | ||
94 | .probe = smp_chrp_probe, | ||
95 | .kick_cpu = smp_chrp_kick_cpu, | ||
96 | .setup_cpu = smp_chrp_setup_cpu, | ||
97 | .give_timebase = smp_chrp_give_timebase, | ||
98 | .take_timebase = smp_chrp_take_timebase, | ||
99 | }; | ||