summaryrefslogtreecommitdiff
path: root/arch/x86/oprofile/op_model_p4.c
diff options
context:
space:
mode:
authorRobert Richter <robert.richter@amd.com>2010-03-23 22:01:54 +0300
committerRobert Richter <robert.richter@amd.com>2010-05-04 13:35:27 +0400
commit83300ce0df6b72e156b386457aa0f0902b8c0a98 (patch)
tree0aa77779550808cd1076945b9a698dcbcca02dbe /arch/x86/oprofile/op_model_p4.c
parentd0e4120fda6f87eead438eed4d49032e12060e58 (diff)
downloadlinux-83300ce0df6b72e156b386457aa0f0902b8c0a98.tar.xz
oprofile/x86: moving shutdown functions
Moving some code in preparation of the next patch. Signed-off-by: Robert Richter <robert.richter@amd.com>
Diffstat (limited to 'arch/x86/oprofile/op_model_p4.c')
-rw-r--r--arch/x86/oprofile/op_model_p4.c38
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 e6a160a4684a..7cc80df330d5 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)
static unsigned long reset_value[NUM_COUNTERS_NON_HT];
+static void p4_shutdown(struct op_msrs const * const msrs)
+{
+ int i;
+
+ for (i = 0; i < num_counters; ++i) {
+ if (msrs->counters[i].addr)
+ release_perfctr_nmi(msrs->counters[i].addr);
+ }
+ /*
+ * some of the control registers are specially reserved in
+ * conjunction with the counter registers (hence the starting offset).
+ * This saves a few bits.
+ */
+ for (i = num_counters; i < num_controls; ++i) {
+ if (msrs->controls[i].addr)
+ release_evntsel_nmi(msrs->controls[i].addr);
+ }
+}
static void p4_fill_in_addresses(struct op_msrs * const msrs)
{
@@ -668,26 +686,6 @@ static void p4_stop(struct op_msrs const * const msrs)
}
}
-static void p4_shutdown(struct op_msrs const * const msrs)
-{
- int i;
-
- for (i = 0; i < num_counters; ++i) {
- if (msrs->counters[i].addr)
- release_perfctr_nmi(msrs->counters[i].addr);
- }
- /*
- * some of the control registers are specially reserved in
- * conjunction with the counter registers (hence the starting offset).
- * This saves a few bits.
- */
- for (i = num_counters; i < num_controls; ++i) {
- if (msrs->controls[i].addr)
- release_evntsel_nmi(msrs->controls[i].addr);
- }
-}
-
-
#ifdef CONFIG_SMP
struct op_x86_model_spec op_p4_ht2_spec = {
.num_counters = NUM_COUNTERS_HT2,