OpenCloudOS-Kernel/arch/x86/oprofile
William Cohen 3d337c653c x86/oprofile: fix Intel cpu family 6 detection
Alan Jenkins wrote:
> This is on an EeePC 701, /proc/cpuinfo as attached.
>
> Is this expected?  Will the next release work?
>
> Thanks, Alan
>
> # opcontrol --setup --no-vmlinux
> cpu_type 'unset' is not valid
> you should upgrade oprofile or force the use of timer mode
>
> # opcontrol -v
> opcontrol: oprofile 0.9.4 compiled on Nov 29 2008 22:44:10
>
> # cat /dev/oprofile/cpu_type
> i386/p6
> # uname -r
> 2.6.28-rc6eeepc

Hi Alan,

Looking at the kernel driver code for oprofile it can return the "i386/p6" for
the cpu_type. However, looking at the user-space oprofile code there isn't the
matching entry in libop/op_cpu_type.c or the events/unit_mask files in
events/i386 directory.

The Intel AP-485 says this is a "Intel Pentium M processor model D". Seems like
the oprofile kernel driver should be identifying the processor as "i386/p6_mobile"

The driver identification code doesn't look quite right in nmi_init.c

http://git.kernel.org/?p=linux/kernel/git/sfr/linux-next.git;a=blob;f=arch/x86/oprofile/nmi_int.c;h=022cd41ea9b4106e5884277096e80e9088a7c7a9;hb=HEAD

has:

409         case 10 ... 13:
410                 *cpu_type = "i386/p6";
411                 break;

Referring to the Intel AP-485:
case 10 and 11 should produce "i386/piii"
case 13 should produce "i386/p6_mobile"

I didn't see anything for case 12.

Something like the attached patch. I don't have a celeron machine to verify that
changes in this area of the kernel fix thing.

-Will

Signed-off-by: William Cohen <wcohen@redhat.com>
Tested-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Acked-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>
2008-12-03 17:17:17 +01:00
..
Makefile x86/oprofile: reanaming op_model_athlon.c to op_model_amd.c 2008-07-26 11:48:14 +02:00
backtrace.c oprofile: fixing whitespaces in arch/x86/oprofile/* 2008-10-16 17:17:46 +02:00
init.c x86: coding style fixes to arch/x86/oprofile/init.c 2008-04-17 17:40:49 +02:00
nmi_int.c x86/oprofile: fix Intel cpu family 6 detection 2008-12-03 17:17:17 +01:00
nmi_timer_int.c x86: coding style fixes to arch/x86/oprofile/nmi_timer_int.c 2008-04-17 17:40:50 +02:00
op_counter.h oprofile: fixing whitespaces in arch/x86/oprofile/* 2008-10-16 17:17:46 +02:00
op_model_amd.c x86/oprofile: add the logic for enabling additional IBS bits 2008-10-15 20:56:56 +02:00
op_model_p4.c oprofile: whitespace fixes 2008-10-15 20:47:41 +02:00
op_model_ppro.c oprofile: fix CPU unplug panic in ppro_stop() 2008-12-03 15:58:51 +01:00
op_x86_model.h Merge branch 'oprofile/x86-oprofile-for-tip' into oprofile/oprofile-for-tip 2008-10-15 22:19:41 +02:00