From fe0936809b3505e4dcbc03bf521d3925823d8f10 Mon Sep 17 00:00:00 2001 From: John Levon Date: Thu, 21 Aug 2003 02:57:28 -0700 Subject: [PATCH] [PATCH] OProfile: don't assume MSRs stay the same across CPU models The MSRs might change between CPU models, error out if we haven't met the CPU before. From Venkatesh Pallipadi --- arch/i386/oprofile/nmi_int.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/i386/oprofile/nmi_int.c b/arch/i386/oprofile/nmi_int.c index 0d34826889dd3..7e404741f7d1f 100644 --- a/arch/i386/oprofile/nmi_int.c +++ b/arch/i386/oprofile/nmi_int.c @@ -332,6 +332,9 @@ static int __init ppro_init(void) { __u8 cpu_model = current_cpu_data.x86_model; + if (cpu_model > 0xd) + return 0; + if (cpu_model > 5) { nmi_ops.cpu_type = "i386/piii"; } else if (cpu_model > 2) { -- 2.53.0