diff options
author | Kumar Gala <galak@freescale.com> | 2005-09-27 16:13:12 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2005-09-28 01:42:54 -0400 |
commit | 400d221274426958f1e1c7081a247bea9cede696 (patch) | |
tree | db0907bc14504d827b06b45004152b6610387b40 /arch/ppc/kernel/cputable.c | |
parent | 10b35d9978ac35556aec0d2642055742d8941488 (diff) |
[PATCH] ppc32: make cur_cpu_spec a single pointer instead of an array
Changed ppc32 so that cur_cpu_spec is just a single pointer for all CPUs.
Additionally, made call_setup_cpu check to see if the cpu_setup pointer
is NULL or not before calling the function. This lets remove the dummy
cpu_setup calls that just return.
Signed-off-by: Kumar Gala <kumar.gala@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/ppc/kernel/cputable.c')
-rw-r--r-- | arch/ppc/kernel/cputable.c | 33 |
1 files changed, 13 insertions, 20 deletions
diff --git a/arch/ppc/kernel/cputable.c b/arch/ppc/kernel/cputable.c index 97663d5d96ca..207d4dd059d9 100644 --- a/arch/ppc/kernel/cputable.c +++ b/arch/ppc/kernel/cputable.c | |||
@@ -14,23 +14,22 @@ | |||
14 | #include <linux/sched.h> | 14 | #include <linux/sched.h> |
15 | #include <linux/threads.h> | 15 | #include <linux/threads.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/module.h> | ||
18 | |||
19 | #include <asm/oprofile_impl.h> | ||
17 | #include <asm/cputable.h> | 20 | #include <asm/cputable.h> |
18 | 21 | ||
19 | struct cpu_spec* cur_cpu_spec[NR_CPUS]; | 22 | struct cpu_spec* cur_cpu_spec = NULL; |
20 | 23 | ||
21 | extern void __setup_cpu_601(unsigned long offset, int cpu_nr, struct cpu_spec* spec); | 24 | extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec); |
22 | extern void __setup_cpu_603(unsigned long offset, int cpu_nr, struct cpu_spec* spec); | 25 | extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec); |
23 | extern void __setup_cpu_604(unsigned long offset, int cpu_nr, struct cpu_spec* spec); | 26 | extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec); |
24 | extern void __setup_cpu_750(unsigned long offset, int cpu_nr, struct cpu_spec* spec); | 27 | extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec); |
25 | extern void __setup_cpu_750cx(unsigned long offset, int cpu_nr, struct cpu_spec* spec); | 28 | extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec); |
26 | extern void __setup_cpu_750fx(unsigned long offset, int cpu_nr, struct cpu_spec* spec); | 29 | extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec); |
27 | extern void __setup_cpu_7400(unsigned long offset, int cpu_nr, struct cpu_spec* spec); | 30 | extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec); |
28 | extern void __setup_cpu_7410(unsigned long offset, int cpu_nr, struct cpu_spec* spec); | 31 | extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec); |
29 | extern void __setup_cpu_745x(unsigned long offset, int cpu_nr, struct cpu_spec* spec); | 32 | extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec); |
30 | extern void __setup_cpu_power3(unsigned long offset, int cpu_nr, struct cpu_spec* spec); | ||
31 | extern void __setup_cpu_power4(unsigned long offset, int cpu_nr, struct cpu_spec* spec); | ||
32 | extern void __setup_cpu_ppc970(unsigned long offset, int cpu_nr, struct cpu_spec* spec); | ||
33 | extern void __setup_cpu_generic(unsigned long offset, int cpu_nr, struct cpu_spec* spec); | ||
34 | 33 | ||
35 | #define CLASSIC_PPC (!defined(CONFIG_8xx) && !defined(CONFIG_4xx) && \ | 34 | #define CLASSIC_PPC (!defined(CONFIG_8xx) && !defined(CONFIG_4xx) && \ |
36 | !defined(CONFIG_POWER3) && !defined(CONFIG_POWER4) && \ | 35 | !defined(CONFIG_POWER3) && !defined(CONFIG_POWER4) && \ |
@@ -62,7 +61,6 @@ struct cpu_spec cpu_specs[] = { | |||
62 | PPC_FEATURE_UNIFIED_CACHE, | 61 | PPC_FEATURE_UNIFIED_CACHE, |
63 | .icache_bsize = 32, | 62 | .icache_bsize = 32, |
64 | .dcache_bsize = 32, | 63 | .dcache_bsize = 32, |
65 | .cpu_setup = __setup_cpu_601 | ||
66 | }, | 64 | }, |
67 | { /* 603 */ | 65 | { /* 603 */ |
68 | .pvr_mask = 0xffff0000, | 66 | .pvr_mask = 0xffff0000, |
@@ -451,7 +449,6 @@ struct cpu_spec cpu_specs[] = { | |||
451 | .cpu_user_features = COMMON_PPC, | 449 | .cpu_user_features = COMMON_PPC, |
452 | .icache_bsize = 32, | 450 | .icache_bsize = 32, |
453 | .dcache_bsize = 32, | 451 | .dcache_bsize = 32, |
454 | .cpu_setup = __setup_cpu_generic | ||
455 | }, | 452 | }, |
456 | #endif /* CLASSIC_PPC */ | 453 | #endif /* CLASSIC_PPC */ |
457 | #ifdef CONFIG_PPC64BRIDGE | 454 | #ifdef CONFIG_PPC64BRIDGE |
@@ -464,7 +461,6 @@ struct cpu_spec cpu_specs[] = { | |||
464 | .icache_bsize = 128, | 461 | .icache_bsize = 128, |
465 | .dcache_bsize = 128, | 462 | .dcache_bsize = 128, |
466 | .num_pmcs = 8, | 463 | .num_pmcs = 8, |
467 | .cpu_setup = __setup_cpu_power3 | ||
468 | }, | 464 | }, |
469 | { /* Power3+ */ | 465 | { /* Power3+ */ |
470 | .pvr_mask = 0xffff0000, | 466 | .pvr_mask = 0xffff0000, |
@@ -475,7 +471,6 @@ struct cpu_spec cpu_specs[] = { | |||
475 | .icache_bsize = 128, | 471 | .icache_bsize = 128, |
476 | .dcache_bsize = 128, | 472 | .dcache_bsize = 128, |
477 | .num_pmcs = 8, | 473 | .num_pmcs = 8, |
478 | .cpu_setup = __setup_cpu_power3 | ||
479 | }, | 474 | }, |
480 | { /* I-star */ | 475 | { /* I-star */ |
481 | .pvr_mask = 0xffff0000, | 476 | .pvr_mask = 0xffff0000, |
@@ -486,7 +481,6 @@ struct cpu_spec cpu_specs[] = { | |||
486 | .icache_bsize = 128, | 481 | .icache_bsize = 128, |
487 | .dcache_bsize = 128, | 482 | .dcache_bsize = 128, |
488 | .num_pmcs = 8, | 483 | .num_pmcs = 8, |
489 | .cpu_setup = __setup_cpu_power3 | ||
490 | }, | 484 | }, |
491 | { /* S-star */ | 485 | { /* S-star */ |
492 | .pvr_mask = 0xffff0000, | 486 | .pvr_mask = 0xffff0000, |
@@ -497,7 +491,6 @@ struct cpu_spec cpu_specs[] = { | |||
497 | .icache_bsize = 128, | 491 | .icache_bsize = 128, |
498 | .dcache_bsize = 128, | 492 | .dcache_bsize = 128, |
499 | .num_pmcs = 8, | 493 | .num_pmcs = 8, |
500 | .cpu_setup = __setup_cpu_power3 | ||
501 | }, | 494 | }, |
502 | #endif /* CONFIG_PPC64BRIDGE */ | 495 | #endif /* CONFIG_PPC64BRIDGE */ |
503 | #ifdef CONFIG_POWER4 | 496 | #ifdef CONFIG_POWER4 |