aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/kernel/head.S6
-rw-r--r--arch/powerpc/oprofile/common.c6
-rw-r--r--arch/powerpc/platforms/powermac/pmac_setup.c2
-rw-r--r--arch/ppc/kernel/cpu_setup_6xx.S2
-rw-r--r--arch/ppc/kernel/cpu_setup_power4.S2
-rw-r--r--arch/ppc/kernel/cputable.c33
-rw-r--r--arch/ppc/kernel/head.S6
-rw-r--r--arch/ppc/kernel/misc.S22
-rw-r--r--arch/ppc/kernel/setup.c14
-rw-r--r--arch/ppc/platforms/4xx/ebony.c2
-rw-r--r--arch/ppc/platforms/pmac_setup.c2
-rw-r--r--arch/ppc/platforms/radstone_ppc7d.c8
-rw-r--r--arch/ppc/syslib/ibm440gx_common.c6
-rw-r--r--include/asm-powerpc/cputable.h16
-rw-r--r--include/asm-powerpc/elf.h4
15 files changed, 43 insertions, 88 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)
155int __init oprofile_arch_init(struct oprofile_operations *ops) 155int __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
diff --git a/arch/ppc/kernel/cpu_setup_6xx.S b/arch/ppc/kernel/cpu_setup_6xx.S
index ba396438ede3..a5333c07fc3c 100644
--- a/arch/ppc/kernel/cpu_setup_6xx.S
+++ b/arch/ppc/kernel/cpu_setup_6xx.S
@@ -17,8 +17,6 @@
17#include <asm/asm-offsets.h> 17#include <asm/asm-offsets.h>
18#include <asm/cache.h> 18#include <asm/cache.h>
19 19
20_GLOBAL(__setup_cpu_601)
21 blr
22_GLOBAL(__setup_cpu_603) 20_GLOBAL(__setup_cpu_603)
23 b setup_common_caches 21 b setup_common_caches
24_GLOBAL(__setup_cpu_604) 22_GLOBAL(__setup_cpu_604)
diff --git a/arch/ppc/kernel/cpu_setup_power4.S b/arch/ppc/kernel/cpu_setup_power4.S
index 7e4fbb653724..0abb5f25b2ca 100644
--- a/arch/ppc/kernel/cpu_setup_power4.S
+++ b/arch/ppc/kernel/cpu_setup_power4.S
@@ -63,8 +63,6 @@ _GLOBAL(__970_cpu_preinit)
63 isync 63 isync
64 blr 64 blr
65 65
66_GLOBAL(__setup_cpu_power4)
67 blr
68_GLOBAL(__setup_cpu_ppc970) 66_GLOBAL(__setup_cpu_ppc970)
69 mfspr r0,SPRN_HID0 67 mfspr r0,SPRN_HID0
70 li r11,5 /* clear DOZE and SLEEP */ 68 li r11,5 /* clear DOZE and SLEEP */
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
19struct cpu_spec* cur_cpu_spec[NR_CPUS]; 22struct cpu_spec* cur_cpu_spec = NULL;
20 23
21extern void __setup_cpu_601(unsigned long offset, int cpu_nr, struct cpu_spec* spec); 24extern void __setup_cpu_603(unsigned long offset, struct cpu_spec* spec);
22extern void __setup_cpu_603(unsigned long offset, int cpu_nr, struct cpu_spec* spec); 25extern void __setup_cpu_604(unsigned long offset, struct cpu_spec* spec);
23extern void __setup_cpu_604(unsigned long offset, int cpu_nr, struct cpu_spec* spec); 26extern void __setup_cpu_750(unsigned long offset, struct cpu_spec* spec);
24extern void __setup_cpu_750(unsigned long offset, int cpu_nr, struct cpu_spec* spec); 27extern void __setup_cpu_750cx(unsigned long offset, struct cpu_spec* spec);
25extern void __setup_cpu_750cx(unsigned long offset, int cpu_nr, struct cpu_spec* spec); 28extern void __setup_cpu_750fx(unsigned long offset, struct cpu_spec* spec);
26extern void __setup_cpu_750fx(unsigned long offset, int cpu_nr, struct cpu_spec* spec); 29extern void __setup_cpu_7400(unsigned long offset, struct cpu_spec* spec);
27extern void __setup_cpu_7400(unsigned long offset, int cpu_nr, struct cpu_spec* spec); 30extern void __setup_cpu_7410(unsigned long offset, struct cpu_spec* spec);
28extern void __setup_cpu_7410(unsigned long offset, int cpu_nr, struct cpu_spec* spec); 31extern void __setup_cpu_745x(unsigned long offset, struct cpu_spec* spec);
29extern void __setup_cpu_745x(unsigned long offset, int cpu_nr, struct cpu_spec* spec); 32extern void __setup_cpu_ppc970(unsigned long offset, struct cpu_spec* spec);
30extern void __setup_cpu_power3(unsigned long offset, int cpu_nr, struct cpu_spec* spec);
31extern void __setup_cpu_power4(unsigned long offset, int cpu_nr, struct cpu_spec* spec);
32extern void __setup_cpu_ppc970(unsigned long offset, int cpu_nr, struct cpu_spec* spec);
33extern 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
diff --git a/arch/ppc/kernel/head.S b/arch/ppc/kernel/head.S
index d05509f197d0..8cdac7385e7f 100644
--- a/arch/ppc/kernel/head.S
+++ b/arch/ppc/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/ppc/kernel/misc.S b/arch/ppc/kernel/misc.S
index 9d2cb79475c6..2b9a16274b0b 100644
--- a/arch/ppc/kernel/misc.S
+++ b/arch/ppc/kernel/misc.S
@@ -125,9 +125,8 @@ _GLOBAL(identify_cpu)
1251: 1251:
126 addis r6,r3,cur_cpu_spec@ha 126 addis r6,r3,cur_cpu_spec@ha
127 addi r6,r6,cur_cpu_spec@l 127 addi r6,r6,cur_cpu_spec@l
128 slwi r4,r4,2
129 sub r8,r8,r3 128 sub r8,r8,r3
130 stwx r8,r4,r6 129 stw r8,0(r6)
131 blr 130 blr
132 131
133/* 132/*
@@ -186,19 +185,18 @@ _GLOBAL(do_cpu_ftr_fixups)
186 * 185 *
187 * Setup function is called with: 186 * Setup function is called with:
188 * r3 = data offset 187 * r3 = data offset
189 * r4 = CPU number 188 * r4 = ptr to CPU spec (relocated)
190 * r5 = ptr to CPU spec (relocated)
191 */ 189 */
192_GLOBAL(call_setup_cpu) 190_GLOBAL(call_setup_cpu)
193 addis r5,r3,cur_cpu_spec@ha 191 addis r4,r3,cur_cpu_spec@ha
194 addi r5,r5,cur_cpu_spec@l 192 addi r4,r4,cur_cpu_spec@l
195 slwi r4,r24,2 193 lwz r4,0(r4)
196 lwzx r5,r4,r5 194 add r4,r4,r3
195 lwz r5,CPU_SPEC_SETUP(r4)
196 cmpi 0,r5,0
197 add r5,r5,r3 197 add r5,r5,r3
198 lwz r6,CPU_SPEC_SETUP(r5) 198 beqlr
199 add r6,r6,r3 199 mtctr r5
200 mtctr r6
201 mr r4,r24
202 bctr 200 bctr
203 201
204#if defined(CONFIG_CPU_FREQ_PMAC) && defined(CONFIG_6xx) 202#if defined(CONFIG_CPU_FREQ_PMAC) && defined(CONFIG_6xx)
diff --git a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c
index 1b891b806f3d..62022eacf63e 100644
--- a/arch/ppc/kernel/setup.c
+++ b/arch/ppc/kernel/setup.c
@@ -188,18 +188,18 @@ int show_cpuinfo(struct seq_file *m, void *v)
188 seq_printf(m, "processor\t: %d\n", i); 188 seq_printf(m, "processor\t: %d\n", i);
189 seq_printf(m, "cpu\t\t: "); 189 seq_printf(m, "cpu\t\t: ");
190 190
191 if (cur_cpu_spec[i]->pvr_mask) 191 if (cur_cpu_spec->pvr_mask)
192 seq_printf(m, "%s", cur_cpu_spec[i]->cpu_name); 192 seq_printf(m, "%s", cur_cpu_spec->cpu_name);
193 else 193 else
194 seq_printf(m, "unknown (%08x)", pvr); 194 seq_printf(m, "unknown (%08x)", pvr);
195#ifdef CONFIG_ALTIVEC 195#ifdef CONFIG_ALTIVEC
196 if (cur_cpu_spec[i]->cpu_features & CPU_FTR_ALTIVEC) 196 if (cur_cpu_spec->cpu_features & CPU_FTR_ALTIVEC)
197 seq_printf(m, ", altivec supported"); 197 seq_printf(m, ", altivec supported");
198#endif 198#endif
199 seq_printf(m, "\n"); 199 seq_printf(m, "\n");
200 200
201#ifdef CONFIG_TAU 201#ifdef CONFIG_TAU
202 if (cur_cpu_spec[i]->cpu_features & CPU_FTR_TAU) { 202 if (cur_cpu_spec->cpu_features & CPU_FTR_TAU) {
203#ifdef CONFIG_TAU_AVERAGE 203#ifdef CONFIG_TAU_AVERAGE
204 /* more straightforward, but potentially misleading */ 204 /* more straightforward, but potentially misleading */
205 seq_printf(m, "temperature \t: %u C (uncalibrated)\n", 205 seq_printf(m, "temperature \t: %u C (uncalibrated)\n",
@@ -754,12 +754,12 @@ void __init setup_arch(char **cmdline_p)
754 * for a possibly more accurate value. 754 * for a possibly more accurate value.
755 */ 755 */
756 if (cpu_has_feature(CPU_FTR_SPLIT_ID_CACHE)) { 756 if (cpu_has_feature(CPU_FTR_SPLIT_ID_CACHE)) {
757 dcache_bsize = cur_cpu_spec[0]->dcache_bsize; 757 dcache_bsize = cur_cpu_spec->dcache_bsize;
758 icache_bsize = cur_cpu_spec[0]->icache_bsize; 758 icache_bsize = cur_cpu_spec->icache_bsize;
759 ucache_bsize = 0; 759 ucache_bsize = 0;
760 } else 760 } else
761 ucache_bsize = dcache_bsize = icache_bsize 761 ucache_bsize = dcache_bsize = icache_bsize
762 = cur_cpu_spec[0]->dcache_bsize; 762 = cur_cpu_spec->dcache_bsize;
763 763
764 /* reboot on panic */ 764 /* reboot on panic */
765 panic_timeout = 180; 765 panic_timeout = 180;
diff --git a/arch/ppc/platforms/4xx/ebony.c b/arch/ppc/platforms/4xx/ebony.c
index d6b2b1965dcb..9decb72e7aaf 100644
--- a/arch/ppc/platforms/4xx/ebony.c
+++ b/arch/ppc/platforms/4xx/ebony.c
@@ -91,7 +91,7 @@ ebony_calibrate_decr(void)
91 * on Rev. C silicon then errata forces us to 91 * on Rev. C silicon then errata forces us to
92 * use the internal clock. 92 * use the internal clock.
93 */ 93 */
94 if (strcmp(cur_cpu_spec[0]->cpu_name, "440GP Rev. B") == 0) 94 if (strcmp(cur_cpu_spec->cpu_name, "440GP Rev. B") == 0)
95 freq = EBONY_440GP_RB_SYSCLK; 95 freq = EBONY_440GP_RB_SYSCLK;
96 else 96 else
97 freq = EBONY_440GP_RC_SYSCLK; 97 freq = EBONY_440GP_RC_SYSCLK;
diff --git a/arch/ppc/platforms/pmac_setup.c b/arch/ppc/platforms/pmac_setup.c
index 1ad779ecc8fc..e6a12182bfbb 100644
--- a/arch/ppc/platforms/pmac_setup.c
+++ b/arch/ppc/platforms/pmac_setup.c
@@ -448,7 +448,7 @@ static int pmac_pm_enter(suspend_state_t state)
448 enable_kernel_fp(); 448 enable_kernel_fp();
449 449
450#ifdef CONFIG_ALTIVEC 450#ifdef CONFIG_ALTIVEC
451 if (cur_cpu_spec[0]->cpu_features & CPU_FTR_ALTIVEC) 451 if (cur_cpu_spec->cpu_features & CPU_FTR_ALTIVEC)
452 enable_kernel_altivec(); 452 enable_kernel_altivec();
453#endif /* CONFIG_ALTIVEC */ 453#endif /* CONFIG_ALTIVEC */
454 454
diff --git a/arch/ppc/platforms/radstone_ppc7d.c b/arch/ppc/platforms/radstone_ppc7d.c
index c30607a972d8..06ec30f7e2f4 100644
--- a/arch/ppc/platforms/radstone_ppc7d.c
+++ b/arch/ppc/platforms/radstone_ppc7d.c
@@ -1185,18 +1185,18 @@ static void __init ppc7d_setup_arch(void)
1185 ROOT_DEV = Root_HDA1; 1185 ROOT_DEV = Root_HDA1;
1186#endif 1186#endif
1187 1187
1188 if ((cur_cpu_spec[0]->cpu_features & CPU_FTR_SPEC7450) || 1188 if ((cur_cpu_spec->cpu_features & CPU_FTR_SPEC7450) ||
1189 (cur_cpu_spec[0]->cpu_features & CPU_FTR_L3CR)) 1189 (cur_cpu_spec->cpu_features & CPU_FTR_L3CR))
1190 /* 745x is different. We only want to pass along enable. */ 1190 /* 745x is different. We only want to pass along enable. */
1191 _set_L2CR(L2CR_L2E); 1191 _set_L2CR(L2CR_L2E);
1192 else if (cur_cpu_spec[0]->cpu_features & CPU_FTR_L2CR) 1192 else if (cur_cpu_spec->cpu_features & CPU_FTR_L2CR)
1193 /* All modules have 1MB of L2. We also assume that an 1193 /* All modules have 1MB of L2. We also assume that an
1194 * L2 divisor of 3 will work. 1194 * L2 divisor of 3 will work.
1195 */ 1195 */
1196 _set_L2CR(L2CR_L2E | L2CR_L2SIZ_1MB | L2CR_L2CLK_DIV3 1196 _set_L2CR(L2CR_L2E | L2CR_L2SIZ_1MB | L2CR_L2CLK_DIV3
1197 | L2CR_L2RAM_PIPE | L2CR_L2OH_1_0 | L2CR_L2DF); 1197 | L2CR_L2RAM_PIPE | L2CR_L2OH_1_0 | L2CR_L2DF);
1198 1198
1199 if (cur_cpu_spec[0]->cpu_features & CPU_FTR_L3CR) 1199 if (cur_cpu_spec->cpu_features & CPU_FTR_L3CR)
1200 /* No L3 cache */ 1200 /* No L3 cache */
1201 _set_L3CR(0); 1201 _set_L3CR(0);
1202 1202
diff --git a/arch/ppc/syslib/ibm440gx_common.c b/arch/ppc/syslib/ibm440gx_common.c
index 0bb919859b8b..c36db279b43d 100644
--- a/arch/ppc/syslib/ibm440gx_common.c
+++ b/arch/ppc/syslib/ibm440gx_common.c
@@ -236,9 +236,9 @@ void __init ibm440gx_l2c_setup(struct ibm44x_clocks* p)
236 /* Disable L2C on rev.A, rev.B and 800MHz version of rev.C, 236 /* Disable L2C on rev.A, rev.B and 800MHz version of rev.C,
237 enable it on all other revisions 237 enable it on all other revisions
238 */ 238 */
239 if (strcmp(cur_cpu_spec[0]->cpu_name, "440GX Rev. A") == 0 || 239 if (strcmp(cur_cpu_spec->cpu_name, "440GX Rev. A") == 0 ||
240 strcmp(cur_cpu_spec[0]->cpu_name, "440GX Rev. B") == 0 240 strcmp(cur_cpu_spec->cpu_name, "440GX Rev. B") == 0
241 || (strcmp(cur_cpu_spec[0]->cpu_name, "440GX Rev. C") 241 || (strcmp(cur_cpu_spec->cpu_name, "440GX Rev. C")
242 == 0 && p->cpu > 667000000)) 242 == 0 && p->cpu > 667000000))
243 ibm440gx_l2c_disable(); 243 ibm440gx_l2c_disable();
244 else 244 else
diff --git a/include/asm-powerpc/cputable.h b/include/asm-powerpc/cputable.h
index 5f81d44963f1..1e50efab091d 100644
--- a/include/asm-powerpc/cputable.h
+++ b/include/asm-powerpc/cputable.h
@@ -25,11 +25,7 @@
25struct cpu_spec; 25struct cpu_spec;
26struct op_powerpc_model; 26struct op_powerpc_model;
27 27
28#ifdef __powerpc64__
29typedef void (*cpu_setup_t)(unsigned long offset, struct cpu_spec* spec); 28typedef void (*cpu_setup_t)(unsigned long offset, struct cpu_spec* spec);
30#else /* __powerpc64__ */
31typedef void (*cpu_setup_t)(unsigned long offset, int cpu_nr, struct cpu_spec* spec);
32#endif /* __powerpc64__ */
33 29
34struct cpu_spec { 30struct cpu_spec {
35 /* CPU is matched via (PVR & pvr_mask) == pvr_value */ 31 /* CPU is matched via (PVR & pvr_mask) == pvr_value */
@@ -51,23 +47,15 @@ struct cpu_spec {
51 * BHT, SPD, etc... from head.S before branching to identify_machine 47 * BHT, SPD, etc... from head.S before branching to identify_machine
52 */ 48 */
53 cpu_setup_t cpu_setup; 49 cpu_setup_t cpu_setup;
54#ifdef __powerpc64__
55 50
56 /* Used by oprofile userspace to select the right counters */ 51 /* Used by oprofile userspace to select the right counters */
57 char *oprofile_cpu_type; 52 char *oprofile_cpu_type;
58 53
59 /* Processor specific oprofile operations */ 54 /* Processor specific oprofile operations */
60 struct op_powerpc_model *oprofile_model; 55 struct op_powerpc_model *oprofile_model;
61#endif /* __powerpc64__ */
62}; 56};
63 57
64extern struct cpu_spec cpu_specs[];
65
66#ifdef __powerpc64__
67extern struct cpu_spec *cur_cpu_spec; 58extern struct cpu_spec *cur_cpu_spec;
68#else /* __powerpc64__ */
69extern struct cpu_spec *cur_cpu_spec[];
70#endif /* __powerpc64__ */
71 59
72#endif /* __ASSEMBLY__ */ 60#endif /* __ASSEMBLY__ */
73 61
@@ -398,11 +386,7 @@ static inline int cpu_has_feature(unsigned long feature)
398{ 386{
399 return (CPU_FTRS_ALWAYS & feature) || 387 return (CPU_FTRS_ALWAYS & feature) ||
400 (CPU_FTRS_POSSIBLE 388 (CPU_FTRS_POSSIBLE
401#ifndef __powerpc64__
402 & cur_cpu_spec[0]->cpu_features
403#else
404 & cur_cpu_spec->cpu_features 389 & cur_cpu_spec->cpu_features
405#endif
406 & feature); 390 & feature);
407} 391}
408 392
diff --git a/include/asm-powerpc/elf.h b/include/asm-powerpc/elf.h
index 36b9d5cec50c..f0a6779fbe52 100644
--- a/include/asm-powerpc/elf.h
+++ b/include/asm-powerpc/elf.h
@@ -212,15 +212,13 @@ extern int dump_task_fpu(struct task_struct *, elf_fpregset_t *);
212/* ELF_HWCAP yields a mask that user programs can use to figure out what 212/* ELF_HWCAP yields a mask that user programs can use to figure out what
213 instruction set this cpu supports. This could be done in userspace, 213 instruction set this cpu supports. This could be done in userspace,
214 but it's not easy, and we've already done it here. */ 214 but it's not easy, and we've already done it here. */
215#ifdef __powerpc64__
216# define ELF_HWCAP (cur_cpu_spec->cpu_user_features) 215# define ELF_HWCAP (cur_cpu_spec->cpu_user_features)
216#ifdef __powerpc64__
217# define ELF_PLAT_INIT(_r, load_addr) do { \ 217# define ELF_PLAT_INIT(_r, load_addr) do { \
218 memset(_r->gpr, 0, sizeof(_r->gpr)); \ 218 memset(_r->gpr, 0, sizeof(_r->gpr)); \
219 _r->ctr = _r->link = _r->xer = _r->ccr = 0; \ 219 _r->ctr = _r->link = _r->xer = _r->ccr = 0; \
220 _r->gpr[2] = load_addr; \ 220 _r->gpr[2] = load_addr; \
221} while (0) 221} while (0)
222#else
223# define ELF_HWCAP (cur_cpu_spec[0]->cpu_user_features)
224#endif /* __powerpc64__ */ 222#endif /* __powerpc64__ */
225 223
226/* This yields a string that ld.so will use to load implementation 224/* This yields a string that ld.so will use to load implementation