diff options
author | Robert Richter <robert.richter@amd.com> | 2009-05-06 06:10:23 -0400 |
---|---|---|
committer | Robert Richter <robert.richter@amd.com> | 2009-05-08 05:06:34 -0400 |
commit | 7e4e0bd50e80df2fe5501f48f872448376cdd997 (patch) | |
tree | dec55d33e695354d4fa34205d5524b0bca91c4a9 /arch/x86/oprofile/nmi_int.c | |
parent | 6adf406f0a0eaf37251018d15f51e93f5b538ee6 (diff) |
oprofile: introduce module_param oprofile.cpu_type
This patch removes module_param oprofile.force_arch_perfmon and
introduces oprofile.cpu_type=archperfmon instead. This new parameter
can be reused for other models and architectures.
Currently only archperfmon is supported.
Cc: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>
Diffstat (limited to 'arch/x86/oprofile/nmi_int.c')
-rw-r--r-- | arch/x86/oprofile/nmi_int.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/arch/x86/oprofile/nmi_int.c b/arch/x86/oprofile/nmi_int.c index 3308147182ae..3b285e656e27 100644 --- a/arch/x86/oprofile/nmi_int.c +++ b/arch/x86/oprofile/nmi_int.c | |||
@@ -386,8 +386,17 @@ static int __init p4_init(char **cpu_type) | |||
386 | return 0; | 386 | return 0; |
387 | } | 387 | } |
388 | 388 | ||
389 | int force_arch_perfmon; | 389 | static int force_arch_perfmon; |
390 | module_param(force_arch_perfmon, int, 0); | 390 | static int force_cpu_type(const char *str, struct kernel_param *kp) |
391 | { | ||
392 | if (!strcmp(str, "archperfmon")) { | ||
393 | force_arch_perfmon = 1; | ||
394 | printk(KERN_INFO "oprofile: forcing architectural perfmon\n"); | ||
395 | } | ||
396 | |||
397 | return 0; | ||
398 | } | ||
399 | module_param_call(cpu_type, force_cpu_type, NULL, NULL, 0); | ||
391 | 400 | ||
392 | static int __init ppro_init(char **cpu_type) | 401 | static int __init ppro_init(char **cpu_type) |
393 | { | 402 | { |