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/powerpc | |
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/powerpc')
-rw-r--r-- | arch/powerpc/kernel/head.S | 6 | ||||
-rw-r--r-- | arch/powerpc/oprofile/common.c | 6 | ||||
-rw-r--r-- | arch/powerpc/platforms/powermac/pmac_setup.c | 2 |
3 files changed, 3 insertions, 11 deletions
diff --git a/arch/powerpc/kernel/head.S b/arch/powerpc/kernel/head.S index d05509f197d0..8cdac7385e7f 100644 --- a/arch/powerpc/kernel/head.S +++ b/arch/powerpc/kernel/head.S | |||
@@ -1059,7 +1059,6 @@ __secondary_start: | |||
1059 | 1059 | ||
1060 | lis r3,-KERNELBASE@h | 1060 | lis r3,-KERNELBASE@h |
1061 | mr r4,r24 | 1061 | mr r4,r24 |
1062 | bl identify_cpu | ||
1063 | bl call_setup_cpu /* Call setup_cpu for this CPU */ | 1062 | bl call_setup_cpu /* Call setup_cpu for this CPU */ |
1064 | #ifdef CONFIG_6xx | 1063 | #ifdef CONFIG_6xx |
1065 | lis r3,-KERNELBASE@h | 1064 | lis r3,-KERNELBASE@h |
@@ -1109,11 +1108,6 @@ __secondary_start: | |||
1109 | * Those generic dummy functions are kept for CPUs not | 1108 | * Those generic dummy functions are kept for CPUs not |
1110 | * included in CONFIG_6xx | 1109 | * included in CONFIG_6xx |
1111 | */ | 1110 | */ |
1112 | _GLOBAL(__setup_cpu_power3) | ||
1113 | blr | ||
1114 | _GLOBAL(__setup_cpu_generic) | ||
1115 | blr | ||
1116 | |||
1117 | #if !defined(CONFIG_6xx) && !defined(CONFIG_POWER4) | 1111 | #if !defined(CONFIG_6xx) && !defined(CONFIG_POWER4) |
1118 | _GLOBAL(__save_cpu_setup) | 1112 | _GLOBAL(__save_cpu_setup) |
1119 | blr | 1113 | blr |
diff --git a/arch/powerpc/oprofile/common.c b/arch/powerpc/oprofile/common.c index 88b4118fd0c5..0ec12c8f2c01 100644 --- a/arch/powerpc/oprofile/common.c +++ b/arch/powerpc/oprofile/common.c | |||
@@ -155,8 +155,6 @@ static int op_powerpc_create_files(struct super_block *sb, struct dentry *root) | |||
155 | int __init oprofile_arch_init(struct oprofile_operations *ops) | 155 | int __init oprofile_arch_init(struct oprofile_operations *ops) |
156 | { | 156 | { |
157 | #ifndef __powerpc64__ | 157 | #ifndef __powerpc64__ |
158 | int cpu_id = smp_processor_id(); | ||
159 | |||
160 | #ifdef CONFIG_FSL_BOOKE | 158 | #ifdef CONFIG_FSL_BOOKE |
161 | model = &op_model_fsl_booke; | 159 | model = &op_model_fsl_booke; |
162 | #else | 160 | #else |
@@ -167,9 +165,9 @@ int __init oprofile_arch_init(struct oprofile_operations *ops) | |||
167 | if (NULL == cpu_type) | 165 | if (NULL == cpu_type) |
168 | return -ENOMEM; | 166 | return -ENOMEM; |
169 | 167 | ||
170 | sprintf(cpu_type, "ppc/%s", cur_cpu_spec[cpu_id]->cpu_name); | 168 | sprintf(cpu_type, "ppc/%s", cur_cpu_spec->cpu_name); |
171 | 169 | ||
172 | model->num_counters = cur_cpu_spec[cpu_id]->num_pmcs; | 170 | model->num_counters = cur_cpu_spec->num_pmcs; |
173 | 171 | ||
174 | ops->cpu_type = cpu_type; | 172 | ops->cpu_type = cpu_type; |
175 | #else /* __powerpc64__ */ | 173 | #else /* __powerpc64__ */ |
diff --git a/arch/powerpc/platforms/powermac/pmac_setup.c b/arch/powerpc/platforms/powermac/pmac_setup.c index dbc921a084cd..3667e0b2b8e3 100644 --- a/arch/powerpc/platforms/powermac/pmac_setup.c +++ b/arch/powerpc/platforms/powermac/pmac_setup.c | |||
@@ -445,7 +445,7 @@ static int pmac_pm_enter(suspend_state_t state) | |||
445 | enable_kernel_fp(); | 445 | enable_kernel_fp(); |
446 | 446 | ||
447 | #ifdef CONFIG_ALTIVEC | 447 | #ifdef CONFIG_ALTIVEC |
448 | if (cur_cpu_spec[0]->cpu_features & CPU_FTR_ALTIVEC) | 448 | if (cur_cpu_spec->cpu_features & CPU_FTR_ALTIVEC) |
449 | enable_kernel_altivec(); | 449 | enable_kernel_altivec(); |
450 | #endif /* CONFIG_ALTIVEC */ | 450 | #endif /* CONFIG_ALTIVEC */ |
451 | 451 | ||