diff options
Diffstat (limited to 'arch/x86/oprofile/op_model_p4.c')
| -rw-r--r-- | arch/x86/oprofile/op_model_p4.c | 38 |
1 files changed, 18 insertions, 20 deletions
diff --git a/arch/x86/oprofile/op_model_p4.c b/arch/x86/oprofile/op_model_p4.c index e6a160a4684..7cc80df330d 100644 --- a/arch/x86/oprofile/op_model_p4.c +++ b/arch/x86/oprofile/op_model_p4.c | |||
| @@ -385,6 +385,24 @@ static unsigned int get_stagger(void) | |||
| 385 | 385 | ||
| 386 | static unsigned long reset_value[NUM_COUNTERS_NON_HT]; | 386 | static unsigned long reset_value[NUM_COUNTERS_NON_HT]; |
| 387 | 387 | ||
| 388 | static void p4_shutdown(struct op_msrs const * const msrs) | ||
| 389 | { | ||
| 390 | int i; | ||
| 391 | |||
| 392 | for (i = 0; i < num_counters; ++i) { | ||
| 393 | if (msrs->counters[i].addr) | ||
| 394 | release_perfctr_nmi(msrs->counters[i].addr); | ||
| 395 | } | ||
| 396 | /* | ||
| 397 | * some of the control registers are specially reserved in | ||
| 398 | * conjunction with the counter registers (hence the starting offset). | ||
| 399 | * This saves a few bits. | ||
| 400 | */ | ||
| 401 | for (i = num_counters; i < num_controls; ++i) { | ||
| 402 | if (msrs->controls[i].addr) | ||
| 403 | release_evntsel_nmi(msrs->controls[i].addr); | ||
| 404 | } | ||
| 405 | } | ||
| 388 | 406 | ||
| 389 | static void p4_fill_in_addresses(struct op_msrs * const msrs) | 407 | static void p4_fill_in_addresses(struct op_msrs * const msrs) |
| 390 | { | 408 | { |
| @@ -668,26 +686,6 @@ static void p4_stop(struct op_msrs const * const msrs) | |||
| 668 | } | 686 | } |
| 669 | } | 687 | } |
| 670 | 688 | ||
| 671 | static void p4_shutdown(struct op_msrs const * const msrs) | ||
| 672 | { | ||
| 673 | int i; | ||
| 674 | |||
| 675 | for (i = 0; i < num_counters; ++i) { | ||
| 676 | if (msrs->counters[i].addr) | ||
| 677 | release_perfctr_nmi(msrs->counters[i].addr); | ||
| 678 | } | ||
| 679 | /* | ||
| 680 | * some of the control registers are specially reserved in | ||
| 681 | * conjunction with the counter registers (hence the starting offset). | ||
| 682 | * This saves a few bits. | ||
| 683 | */ | ||
| 684 | for (i = num_counters; i < num_controls; ++i) { | ||
| 685 | if (msrs->controls[i].addr) | ||
| 686 | release_evntsel_nmi(msrs->controls[i].addr); | ||
| 687 | } | ||
| 688 | } | ||
| 689 | |||
| 690 | |||
| 691 | #ifdef CONFIG_SMP | 689 | #ifdef CONFIG_SMP |
| 692 | struct op_x86_model_spec op_p4_ht2_spec = { | 690 | struct op_x86_model_spec op_p4_ht2_spec = { |
| 693 | .num_counters = NUM_COUNTERS_HT2, | 691 | .num_counters = NUM_COUNTERS_HT2, |
