From d38c9e40a0ca1b413997a3d9f13df30a0cb6250b Mon Sep 17 00:00:00 2001 From: Robert Richter Date: Wed, 6 May 2009 12:10:23 +0200 Subject: [PATCH] --- yaml --- r: 145971 b: refs/heads/master c: 7e4e0bd50e80df2fe5501f48f872448376cdd997 h: refs/heads/master i: 145969: 88d0e407e81e656c691dcb199b28b4c0cb26636a 145967: f9c879d7bafa94f97c68549279640fa12f9ab1c9 v: v3 --- [refs] | 2 +- trunk/Documentation/kernel-parameters.txt | 12 +++++++----- trunk/arch/x86/oprofile/nmi_int.c | 13 +++++++++++-- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 58a83bf9d69a..4232e22e809b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6adf406f0a0eaf37251018d15f51e93f5b538ee6 +refs/heads/master: 7e4e0bd50e80df2fe5501f48f872448376cdd997 diff --git a/trunk/Documentation/kernel-parameters.txt b/trunk/Documentation/kernel-parameters.txt index 9b9566bf3301..6ce5f48859cc 100644 --- a/trunk/Documentation/kernel-parameters.txt +++ b/trunk/Documentation/kernel-parameters.txt @@ -1650,11 +1650,13 @@ and is between 256 and 4096 characters. It is defined in the file oprofile.timer= [HW] Use timer interrupt instead of performance counters - oprofile.force_arch_perfmon=1 [X86] - Force use of architectural perfmon instead of - the CPU specific event set. - This might be useful if you have older oprofile - userland or if you want common events over Intel CPUs. + oprofile.cpu_type= Force an oprofile cpu type + This might be useful if you have an older oprofile + userland or if you want common events. + Format: { archperfmon } + archperfmon: [X86] Force use of architectural + perfmon on Intel CPUs instead of the + CPU specific event set. osst= [HW,SCSI] SCSI Tape Driver Format: , diff --git a/trunk/arch/x86/oprofile/nmi_int.c b/trunk/arch/x86/oprofile/nmi_int.c index 3308147182ae..3b285e656e27 100644 --- a/trunk/arch/x86/oprofile/nmi_int.c +++ b/trunk/arch/x86/oprofile/nmi_int.c @@ -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) {