diff options
author | Olof Johansson <olof@lixom.net> | 2006-08-11 01:07:08 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-08-24 23:27:35 -0400 |
commit | f39b7a55a84e34e3074b168e30dc73b66e85261d (patch) | |
tree | 9be321bfcd5d0404309b1514127987117c2541cc /arch/powerpc/kernel/cputable.c | |
parent | 2e97425197ecf85641a89e5a4868f8e147cc443f (diff) |
[POWERPC] Cleanup CPU inits
Cleanup CPU inits a bit more, Geoff Levand already did some earlier.
* Move CPU state save to cpu_setup, since cpu_setup is only ever done
on cpu 0 on 64-bit and save is never done more than once.
* Rename __restore_cpu_setup to __restore_cpu_ppc970 and add
function pointers to the cputable to use instead. Powermac always
has 970 so no need to check there.
* Rename __970_cpu_preinit to __cpu_preinit_ppc970 and check PVR before
calling it instead of in it, it's too early to use cputable.
* Rename pSeries_secondary_smp_init to generic_secondary_smp_init since
everyone but powermac and iSeries use it.
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/cputable.c')
-rw-r--r-- | arch/powerpc/kernel/cputable.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index 272e43622fd6..306da4cd37a0 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c | |||
@@ -39,7 +39,10 @@ extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec); | |||
39 | extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec); | 39 | extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec); |
40 | extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec); | 40 | extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec); |
41 | #endif /* CONFIG_PPC32 */ | 41 | #endif /* CONFIG_PPC32 */ |
42 | #ifdef CONFIG_PPC64 | ||
42 | extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec); | 43 | extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec); |
44 | extern void __restore_cpu_ppc970(void); | ||
45 | #endif /* CONFIG_PPC64 */ | ||
43 | 46 | ||
44 | /* This table only contains "desktop" CPUs, it need to be filled with embedded | 47 | /* This table only contains "desktop" CPUs, it need to be filled with embedded |
45 | * ones as well... | 48 | * ones as well... |
@@ -184,6 +187,7 @@ struct cpu_spec cpu_specs[] = { | |||
184 | .dcache_bsize = 128, | 187 | .dcache_bsize = 128, |
185 | .num_pmcs = 8, | 188 | .num_pmcs = 8, |
186 | .cpu_setup = __setup_cpu_ppc970, | 189 | .cpu_setup = __setup_cpu_ppc970, |
190 | .cpu_restore = __restore_cpu_ppc970, | ||
187 | .oprofile_cpu_type = "ppc64/970", | 191 | .oprofile_cpu_type = "ppc64/970", |
188 | .oprofile_type = PPC_OPROFILE_POWER4, | 192 | .oprofile_type = PPC_OPROFILE_POWER4, |
189 | .platform = "ppc970", | 193 | .platform = "ppc970", |
@@ -199,6 +203,7 @@ struct cpu_spec cpu_specs[] = { | |||
199 | .dcache_bsize = 128, | 203 | .dcache_bsize = 128, |
200 | .num_pmcs = 8, | 204 | .num_pmcs = 8, |
201 | .cpu_setup = __setup_cpu_ppc970, | 205 | .cpu_setup = __setup_cpu_ppc970, |
206 | .cpu_restore = __restore_cpu_ppc970, | ||
202 | .oprofile_cpu_type = "ppc64/970", | 207 | .oprofile_cpu_type = "ppc64/970", |
203 | .oprofile_type = PPC_OPROFILE_POWER4, | 208 | .oprofile_type = PPC_OPROFILE_POWER4, |
204 | .platform = "ppc970", | 209 | .platform = "ppc970", |
@@ -214,6 +219,7 @@ struct cpu_spec cpu_specs[] = { | |||
214 | .dcache_bsize = 128, | 219 | .dcache_bsize = 128, |
215 | .num_pmcs = 8, | 220 | .num_pmcs = 8, |
216 | .cpu_setup = __setup_cpu_ppc970, | 221 | .cpu_setup = __setup_cpu_ppc970, |
222 | .cpu_restore = __restore_cpu_ppc970, | ||
217 | .oprofile_cpu_type = "ppc64/970", | 223 | .oprofile_cpu_type = "ppc64/970", |
218 | .oprofile_type = PPC_OPROFILE_POWER4, | 224 | .oprofile_type = PPC_OPROFILE_POWER4, |
219 | .platform = "ppc970", | 225 | .platform = "ppc970", |