diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-01-27 06:01:51 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-27 06:01:51 -0500 |
commit | 3ddeb51d9c83931c1ca6abf76a38934c5a1ed918 (patch) | |
tree | fc2efb59d627135ea2199a8a68415b162646b121 /arch/sparc/kernel/cpu.c | |
parent | 5a611268b69f05262936dd177205acbce4471358 (diff) | |
parent | 5ee810072175042775e39bdd3eaaa68884c27805 (diff) |
Merge branch 'linus' into core/percpu
Conflicts:
arch/x86/kernel/setup_percpu.c
Diffstat (limited to 'arch/sparc/kernel/cpu.c')
-rw-r--r-- | arch/sparc/kernel/cpu.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/arch/sparc/kernel/cpu.c b/arch/sparc/kernel/cpu.c index f0b825505da5..32d32b4824f5 100644 --- a/arch/sparc/kernel/cpu.c +++ b/arch/sparc/kernel/cpu.c | |||
@@ -239,14 +239,26 @@ unsigned int fsr_storage; | |||
239 | 239 | ||
240 | static void set_cpu_and_fpu(int psr_impl, int psr_vers, int fpu_vers) | 240 | static void set_cpu_and_fpu(int psr_impl, int psr_vers, int fpu_vers) |
241 | { | 241 | { |
242 | const struct manufacturer_info *manuf; | ||
243 | int i; | ||
244 | |||
242 | sparc_cpu_type = NULL; | 245 | sparc_cpu_type = NULL; |
243 | sparc_fpu_type = NULL; | 246 | sparc_fpu_type = NULL; |
244 | if (psr_impl < ARRAY_SIZE(manufacturer_info)) | 247 | manuf = NULL; |
248 | |||
249 | for (i = 0; i < ARRAY_SIZE(manufacturer_info); i++) | ||
250 | { | ||
251 | if (psr_impl == manufacturer_info[i].psr_impl) { | ||
252 | manuf = &manufacturer_info[i]; | ||
253 | break; | ||
254 | } | ||
255 | } | ||
256 | if (manuf != NULL) | ||
245 | { | 257 | { |
246 | const struct cpu_info *cpu; | 258 | const struct cpu_info *cpu; |
247 | const struct fpu_info *fpu; | 259 | const struct fpu_info *fpu; |
248 | 260 | ||
249 | cpu = &manufacturer_info[psr_impl].cpu_info[0]; | 261 | cpu = &manuf->cpu_info[0]; |
250 | while (cpu->psr_vers != -1) | 262 | while (cpu->psr_vers != -1) |
251 | { | 263 | { |
252 | if (cpu->psr_vers == psr_vers) { | 264 | if (cpu->psr_vers == psr_vers) { |
@@ -256,7 +268,7 @@ static void set_cpu_and_fpu(int psr_impl, int psr_vers, int fpu_vers) | |||
256 | } | 268 | } |
257 | cpu++; | 269 | cpu++; |
258 | } | 270 | } |
259 | fpu = &manufacturer_info[psr_impl].fpu_info[0]; | 271 | fpu = &manuf->fpu_info[0]; |
260 | while (fpu->fp_vers != -1) | 272 | while (fpu->fp_vers != -1) |
261 | { | 273 | { |
262 | if (fpu->fp_vers == fpu_vers) { | 274 | if (fpu->fp_vers == fpu_vers) { |