diff options
author | Robert Richter <robert.richter@amd.com> | 2008-07-22 15:08:48 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-26 05:48:01 -0400 |
commit | adf5ec0bca553b763a6b9baed2677a4c7470025b (patch) | |
tree | c3009400fcdd1d0a27ab96e8d9ed6a88535307d4 /arch/x86/oprofile/op_model_athlon.c | |
parent | 12f2b2610e812627acf338aaf043fef20bb726ca (diff) |
x86/oprofile: introduce model specific init/exit functions
This patch implements model specific OProfile init/exit functions for
x86 CPUs. Though there is more rework needed at the initialization
code, this new introduced functions allow it to keep model specific
code in the corresponding op_model_*.c files.
The function interface is the same as for oprofile_arch_init/exit().
Signed-off-by: Robert Richter <robert.richter@amd.com>
Cc: oprofile-list <oprofile-list@lists.sourceforge.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/oprofile/op_model_athlon.c')
-rw-r--r-- | arch/x86/oprofile/op_model_athlon.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/arch/x86/oprofile/op_model_athlon.c b/arch/x86/oprofile/op_model_athlon.c index 3d534879a9dc..dd8b1dcd163b 100644 --- a/arch/x86/oprofile/op_model_athlon.c +++ b/arch/x86/oprofile/op_model_athlon.c | |||
@@ -1,14 +1,15 @@ | |||
1 | /* | 1 | /* |
2 | * @file op_model_athlon.h | 2 | * @file op_model_athlon.c |
3 | * athlon / K7 / K8 / Family 10h model-specific MSR operations | 3 | * athlon / K7 / K8 / Family 10h model-specific MSR operations |
4 | * | 4 | * |
5 | * @remark Copyright 2002 OProfile authors | 5 | * @remark Copyright 2002-2008 OProfile authors |
6 | * @remark Read the file COPYING | 6 | * @remark Read the file COPYING |
7 | * | 7 | * |
8 | * @author John Levon | 8 | * @author John Levon |
9 | * @author Philippe Elie | 9 | * @author Philippe Elie |
10 | * @author Graydon Hoare | 10 | * @author Graydon Hoare |
11 | */ | 11 | * @author Robert Richter <robert.richter@amd.com> |
12 | */ | ||
12 | 13 | ||
13 | #include <linux/oprofile.h> | 14 | #include <linux/oprofile.h> |
14 | #include <asm/ptrace.h> | 15 | #include <asm/ptrace.h> |
@@ -178,7 +179,18 @@ static void athlon_shutdown(struct op_msrs const * const msrs) | |||
178 | } | 179 | } |
179 | } | 180 | } |
180 | 181 | ||
182 | static int op_amd_init(struct oprofile_operations *ops) | ||
183 | { | ||
184 | return 0; | ||
185 | } | ||
186 | |||
187 | static void op_amd_exit(void) | ||
188 | { | ||
189 | } | ||
190 | |||
181 | struct op_x86_model_spec const op_athlon_spec = { | 191 | struct op_x86_model_spec const op_athlon_spec = { |
192 | .init = op_amd_init, | ||
193 | .exit = op_amd_exit, | ||
182 | .num_counters = NUM_COUNTERS, | 194 | .num_counters = NUM_COUNTERS, |
183 | .num_controls = NUM_CONTROLS, | 195 | .num_controls = NUM_CONTROLS, |
184 | .fill_in_addresses = &athlon_fill_in_addresses, | 196 | .fill_in_addresses = &athlon_fill_in_addresses, |