]> git.hungrycats.org Git - linux/commitdiff
[PATCH] OProfile: don't assume MSRs stay the same across CPU models
authorJohn Levon <levon@movementarian.org>
Thu, 21 Aug 2003 09:57:28 +0000 (02:57 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Thu, 21 Aug 2003 09:57:28 +0000 (02:57 -0700)
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

index 0d34826889dd3c4cab2008ac821f2e139d3022f9..7e404741f7d1f6d8608d1edd926e8f3bd1292861 100644 (file)
@@ -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) {