diff options
author | Robert Richter <robert.richter@amd.com> | 2008-10-15 16:19:41 -0400 |
---|---|---|
committer | Robert Richter <robert.richter@amd.com> | 2008-10-15 16:19:41 -0400 |
commit | 5a289395bf753f8a318d3a5fa335a757c16c0183 (patch) | |
tree | 3573b8bc4bbd135616bb395d998ef1526fff596f /arch/x86/oprofile/nmi_int.c | |
parent | 5f87dfb79f829339508a5d989b8252eb30842587 (diff) | |
parent | 59512900baab03c5629f2ff5efad1d5d4e682ece (diff) |
Merge branch 'oprofile/x86-oprofile-for-tip' into oprofile/oprofile-for-tip
Conflicts:
arch/x86/oprofile/op_model_ppro.c
Diffstat (limited to 'arch/x86/oprofile/nmi_int.c')
-rw-r--r-- | arch/x86/oprofile/nmi_int.c | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c index 370d832f398..022cd41ea9b 100644 --- a/arch/x86/oprofile/nmi_int.c +++ b/arch/x86/oprofile/nmi_int.c | |||
@@ -415,9 +415,6 @@ static int __init ppro_init(char **cpu_type) | |||
415 | case 15: case 23: | 415 | case 15: case 23: |
416 | *cpu_type = "i386/core_2"; | 416 | *cpu_type = "i386/core_2"; |
417 | break; | 417 | break; |
418 | case 26: | ||
419 | *cpu_type = "i386/core_2"; | ||
420 | break; | ||
421 | default: | 418 | default: |
422 | /* Unknown */ | 419 | /* Unknown */ |
423 | return 0; | 420 | return 0; |
@@ -427,6 +424,16 @@ static int __init ppro_init(char **cpu_type) | |||
427 | return 1; | 424 | return 1; |
428 | } | 425 | } |
429 | 426 | ||
427 | static int __init arch_perfmon_init(char **cpu_type) | ||
428 | { | ||
429 | if (!cpu_has_arch_perfmon) | ||
430 | return 0; | ||
431 | *cpu_type = "i386/arch_perfmon"; | ||
432 | model = &op_arch_perfmon_spec; | ||
433 | arch_perfmon_setup_counters(); | ||
434 | return 1; | ||
435 | } | ||
436 | |||
430 | /* in order to get sysfs right */ | 437 | /* in order to get sysfs right */ |
431 | static int using_nmi; | 438 | static int using_nmi; |
432 | 439 | ||
@@ -434,7 +441,7 @@ int __init op_nmi_init(struct oprofile_operations *ops) | |||
434 | { | 441 | { |
435 | __u8 vendor = boot_cpu_data.x86_vendor; | 442 | __u8 vendor = boot_cpu_data.x86_vendor; |
436 | __u8 family = boot_cpu_data.x86; | 443 | __u8 family = boot_cpu_data.x86; |
437 | char *cpu_type; | 444 | char *cpu_type = NULL; |
438 | int ret = 0; | 445 | int ret = 0; |
439 | 446 | ||
440 | if (!cpu_has_apic) | 447 | if (!cpu_has_apic) |
@@ -472,19 +479,20 @@ int __init op_nmi_init(struct oprofile_operations *ops) | |||
472 | switch (family) { | 479 | switch (family) { |
473 | /* Pentium IV */ | 480 | /* Pentium IV */ |
474 | case 0xf: | 481 | case 0xf: |
475 | if (!p4_init(&cpu_type)) | 482 | p4_init(&cpu_type); |
476 | return -ENODEV; | ||
477 | break; | 483 | break; |
478 | 484 | ||
479 | /* A P6-class processor */ | 485 | /* A P6-class processor */ |
480 | case 6: | 486 | case 6: |
481 | if (!ppro_init(&cpu_type)) | 487 | ppro_init(&cpu_type); |
482 | return -ENODEV; | ||
483 | break; | 488 | break; |
484 | 489 | ||
485 | default: | 490 | default: |
486 | return -ENODEV; | 491 | break; |
487 | } | 492 | } |
493 | |||
494 | if (!cpu_type && !arch_perfmon_init(&cpu_type)) | ||
495 | return -ENODEV; | ||
488 | break; | 496 | break; |
489 | 497 | ||
490 | default: | 498 | default: |