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>
This commit is contained in:
Robert Richter
2009-05-06 12:10:23 +02:00
parent 6adf406f0a
commit 7e4e0bd50e
2 changed files with 18 additions and 7 deletions

View File

@@ -386,8 +386,17 @@ static int __init p4_init(char **cpu_type)
return 0;
}
int force_arch_perfmon;
module_param(force_arch_perfmon, int, 0);
static int force_arch_perfmon;
static int force_cpu_type(const char *str, struct kernel_param *kp)
{
if (!strcmp(str, "archperfmon")) {
force_arch_perfmon = 1;
printk(KERN_INFO "oprofile: forcing architectural perfmon\n");
}
return 0;
}
module_param_call(cpu_type, force_cpu_type, NULL, NULL, 0);
static int __init ppro_init(char **cpu_type)
{