diff options
author | Raymond Burns <rayburns@comcast.net> | 2006-07-18 00:57:09 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-07-21 17:18:20 -0400 |
commit | 8b3c848cc89e62904e6d9c8f9fed13d5c225572d (patch) | |
tree | 7549671e3e19f5553e75898d430a298979e05b36 /arch/sparc/kernel/smp.c | |
parent | 198c167c5424d30d4f6687aed6e54ef71036f8e9 (diff) |
[SPARC]: Get sun4d SMP building again.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel/smp.c')
-rw-r--r-- | arch/sparc/kernel/smp.c | 96 |
1 files changed, 89 insertions, 7 deletions
diff --git a/arch/sparc/kernel/smp.c b/arch/sparc/kernel/smp.c index 6135d4faeeeb..e311ade1b490 100644 --- a/arch/sparc/kernel/smp.c +++ b/arch/sparc/kernel/smp.c | |||
@@ -87,6 +87,7 @@ void __cpuinit smp_store_cpu_info(int id) | |||
87 | void __init smp_cpus_done(unsigned int max_cpus) | 87 | void __init smp_cpus_done(unsigned int max_cpus) |
88 | { | 88 | { |
89 | extern void smp4m_smp_done(void); | 89 | extern void smp4m_smp_done(void); |
90 | extern void smp4d_smp_done(void); | ||
90 | unsigned long bogosum = 0; | 91 | unsigned long bogosum = 0; |
91 | int cpu, num; | 92 | int cpu, num; |
92 | 93 | ||
@@ -100,8 +101,34 @@ void __init smp_cpus_done(unsigned int max_cpus) | |||
100 | num, bogosum/(500000/HZ), | 101 | num, bogosum/(500000/HZ), |
101 | (bogosum/(5000/HZ))%100); | 102 | (bogosum/(5000/HZ))%100); |
102 | 103 | ||
103 | BUG_ON(sparc_cpu_model != sun4m); | 104 | switch(sparc_cpu_model) { |
104 | smp4m_smp_done(); | 105 | case sun4: |
106 | printk("SUN4\n"); | ||
107 | BUG(); | ||
108 | break; | ||
109 | case sun4c: | ||
110 | printk("SUN4C\n"); | ||
111 | BUG(); | ||
112 | break; | ||
113 | case sun4m: | ||
114 | smp4m_smp_done(); | ||
115 | break; | ||
116 | case sun4d: | ||
117 | smp4d_smp_done(); | ||
118 | break; | ||
119 | case sun4e: | ||
120 | printk("SUN4E\n"); | ||
121 | BUG(); | ||
122 | break; | ||
123 | case sun4u: | ||
124 | printk("SUN4U\n"); | ||
125 | BUG(); | ||
126 | break; | ||
127 | default: | ||
128 | printk("UNKNOWN!\n"); | ||
129 | BUG(); | ||
130 | break; | ||
131 | }; | ||
105 | } | 132 | } |
106 | 133 | ||
107 | void cpu_panic(void) | 134 | void cpu_panic(void) |
@@ -267,9 +294,9 @@ int setup_profiling_timer(unsigned int multiplier) | |||
267 | void __init smp_prepare_cpus(unsigned int max_cpus) | 294 | void __init smp_prepare_cpus(unsigned int max_cpus) |
268 | { | 295 | { |
269 | extern void smp4m_boot_cpus(void); | 296 | extern void smp4m_boot_cpus(void); |
297 | extern void smp4d_boot_cpus(void); | ||
270 | int i, cpuid, extra; | 298 | int i, cpuid, extra; |
271 | 299 | ||
272 | BUG_ON(sparc_cpu_model != sun4m); | ||
273 | printk("Entering SMP Mode...\n"); | 300 | printk("Entering SMP Mode...\n"); |
274 | 301 | ||
275 | extra = 0; | 302 | extra = 0; |
@@ -283,7 +310,34 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
283 | 310 | ||
284 | smp_store_cpu_info(boot_cpu_id); | 311 | smp_store_cpu_info(boot_cpu_id); |
285 | 312 | ||
286 | smp4m_boot_cpus(); | 313 | switch(sparc_cpu_model) { |
314 | case sun4: | ||
315 | printk("SUN4\n"); | ||
316 | BUG(); | ||
317 | break; | ||
318 | case sun4c: | ||
319 | printk("SUN4C\n"); | ||
320 | BUG(); | ||
321 | break; | ||
322 | case sun4m: | ||
323 | smp4m_boot_cpus(); | ||
324 | break; | ||
325 | case sun4d: | ||
326 | smp4d_boot_cpus(); | ||
327 | break; | ||
328 | case sun4e: | ||
329 | printk("SUN4E\n"); | ||
330 | BUG(); | ||
331 | break; | ||
332 | case sun4u: | ||
333 | printk("SUN4U\n"); | ||
334 | BUG(); | ||
335 | break; | ||
336 | default: | ||
337 | printk("UNKNOWN!\n"); | ||
338 | BUG(); | ||
339 | break; | ||
340 | }; | ||
287 | } | 341 | } |
288 | 342 | ||
289 | /* Set this up early so that things like the scheduler can init | 343 | /* Set this up early so that things like the scheduler can init |
@@ -323,9 +377,37 @@ void __init smp_prepare_boot_cpu(void) | |||
323 | int __cpuinit __cpu_up(unsigned int cpu) | 377 | int __cpuinit __cpu_up(unsigned int cpu) |
324 | { | 378 | { |
325 | extern int smp4m_boot_one_cpu(int); | 379 | extern int smp4m_boot_one_cpu(int); |
326 | int ret; | 380 | extern int smp4d_boot_one_cpu(int); |
327 | 381 | int ret=0; | |
328 | ret = smp4m_boot_one_cpu(cpu); | 382 | |
383 | switch(sparc_cpu_model) { | ||
384 | case sun4: | ||
385 | printk("SUN4\n"); | ||
386 | BUG(); | ||
387 | break; | ||
388 | case sun4c: | ||
389 | printk("SUN4C\n"); | ||
390 | BUG(); | ||
391 | break; | ||
392 | case sun4m: | ||
393 | ret = smp4m_boot_one_cpu(cpu); | ||
394 | break; | ||
395 | case sun4d: | ||
396 | ret = smp4d_boot_one_cpu(cpu); | ||
397 | break; | ||
398 | case sun4e: | ||
399 | printk("SUN4E\n"); | ||
400 | BUG(); | ||
401 | break; | ||
402 | case sun4u: | ||
403 | printk("SUN4U\n"); | ||
404 | BUG(); | ||
405 | break; | ||
406 | default: | ||
407 | printk("UNKNOWN!\n"); | ||
408 | BUG(); | ||
409 | break; | ||
410 | }; | ||
329 | 411 | ||
330 | if (!ret) { | 412 | if (!ret) { |
331 | cpu_set(cpu, smp_commenced_mask); | 413 | cpu_set(cpu, smp_commenced_mask); |