From: "Santos, Jose Renato G" At initialization Oprofile checks if the cpu model returned by the CPUID instruction is a valid one. For Intel p4 family this is done at p4_init() in arch/i386/oprofile/nmi_int.c. The problem is that Oprofile returns 0 (initialization failure) if the CPU model is greater than 4, i.e it only recognizes CPU models 0,1,2,3 and 4. The CPUID instruction on pentium D family 900 returns 6 for the CPU model . This prevents Oprofile to use HW performance counters (since it does not know that CPU model) and falls back to timer mode. The patch adds the CPU model 6 as a valid CPU model for Intel P4 family. Signed-off-by: Jose Renato Santos Cc: Philippe Elie Cc: John Levon Cc: Andi Kleen Cc: Rohit Seth Signed-off-by: Andrew Morton --- arch/i386/oprofile/nmi_int.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN arch/i386/oprofile/nmi_int.c~enable-oprofile-on-pentium-d arch/i386/oprofile/nmi_int.c --- a/arch/i386/oprofile/nmi_int.c~enable-oprofile-on-pentium-d +++ a/arch/i386/oprofile/nmi_int.c @@ -301,7 +301,7 @@ static int __init p4_init(char ** cpu_ty { __u8 cpu_model = boot_cpu_data.x86_model; - if (cpu_model > 4) + if ((cpu_model > 6) || (cpu_model == 5)) return 0; #ifndef CONFIG_SMP _