diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/oprofile/nmi_int.c | 36 |
1 files changed, 25 insertions, 11 deletions
diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c index 7f3329b55d2e..3f90289410e6 100644 --- a/arch/x86/oprofile/nmi_int.c +++ b/arch/x86/oprofile/nmi_int.c | |||
@@ -369,20 +369,34 @@ static int __init ppro_init(char **cpu_type) | |||
369 | { | 369 | { |
370 | __u8 cpu_model = boot_cpu_data.x86_model; | 370 | __u8 cpu_model = boot_cpu_data.x86_model; |
371 | 371 | ||
372 | if (cpu_model == 14) | 372 | switch (cpu_model) { |
373 | case 0 ... 2: | ||
374 | *cpu_type = "i386/ppro"; | ||
375 | break; | ||
376 | case 3 ... 5: | ||
377 | *cpu_type = "i386/pii"; | ||
378 | break; | ||
379 | case 6 ... 8: | ||
380 | *cpu_type = "i386/piii"; | ||
381 | break; | ||
382 | case 9: | ||
383 | *cpu_type = "i386/p6_mobile"; | ||
384 | break; | ||
385 | case 10 ... 13: | ||
386 | *cpu_type = "i386/p6"; | ||
387 | break; | ||
388 | case 14: | ||
373 | *cpu_type = "i386/core"; | 389 | *cpu_type = "i386/core"; |
374 | else if (cpu_model == 15 || cpu_model == 23) | 390 | break; |
391 | case 15: case 23: | ||
392 | *cpu_type = "i386/core_2"; | ||
393 | break; | ||
394 | case 26: | ||
375 | *cpu_type = "i386/core_2"; | 395 | *cpu_type = "i386/core_2"; |
376 | else if (cpu_model > 0xd) | 396 | break; |
397 | default: | ||
398 | /* Unknown */ | ||
377 | return 0; | 399 | return 0; |
378 | else if (cpu_model == 9) { | ||
379 | *cpu_type = "i386/p6_mobile"; | ||
380 | } else if (cpu_model > 5) { | ||
381 | *cpu_type = "i386/piii"; | ||
382 | } else if (cpu_model > 2) { | ||
383 | *cpu_type = "i386/pii"; | ||
384 | } else { | ||
385 | *cpu_type = "i386/ppro"; | ||
386 | } | 400 | } |
387 | 401 | ||
388 | model = &op_ppro_spec; | 402 | model = &op_ppro_spec; |