• S
    [PATCH] Mobil Pentium 4 HT and the NMI · cd3716ab
    Steven Rostedt 提交于
    I'm trying to get the nmi working with my laptop (IBM ThinkPad G41) and after
    debugging it a while, I found that the nmi code doesn't want to set it up for
    this particular CPU.
    
    Here I have:
    
    $ cat /proc/cpuinfo
    processor       : 0
    vendor_id       : GenuineIntel
    cpu family      : 15
    model           : 4
    model name      : Mobile Intel(R) Pentium(R) 4 CPU 3.33GHz
    stepping        : 1
    cpu MHz         : 3320.084
    cache size      : 1024 KB
    physical id     : 0
    siblings        : 2
    core id         : 0
    cpu cores       : 1
    fdiv_bug        : no
    hlt_bug         : no
    f00f_bug        : no
    coma_bug        : no
    fpu             : yes
    fpu_exception   : yes
    cpuid level     : 3
    wp              : yes
    flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
    mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pni
    monitor ds_cpl est tm2 cid xtpr
    bogomips        : 6642.39
    
    processor       : 1
    vendor_id       : GenuineIntel
    cpu family      : 15
    model           : 4
    model name      : Mobile Intel(R) Pentium(R) 4 CPU 3.33GHz
    stepping        : 1
    cpu MHz         : 3320.084
    cache size      : 1024 KB
    physical id     : 0
    siblings        : 2
    core id         : 0
    cpu cores       : 1
    fdiv_bug        : no
    hlt_bug         : no
    f00f_bug        : no
    coma_bug        : no
    fpu             : yes
    fpu_exception   : yes
    cpuid level     : 3
    wp              : yes
    flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
    mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pni
    monitor ds_cpl est tm2 cid xtpr
    bogomips        : 6637.46
    
    And the following code shows:
    
    $ cat linux-2.6.13-rc6/arch/i386/kernel/nmi.c
    
    [...]
    
    void setup_apic_nmi_watchdog (void)
    {
            switch (boot_cpu_data.x86_vendor) {
            case X86_VENDOR_AMD:
                    if (boot_cpu_data.x86 != 6 && boot_cpu_data.x86 != 15)
                            return;
                    setup_k7_watchdog();
                    break;
            case X86_VENDOR_INTEL:
                     switch (boot_cpu_data.x86) {
                    case 6:
                            if (boot_cpu_data.x86_model > 0xd)
                                    return;
    
                            setup_p6_watchdog();
                            break;
                    case 15:
                            if (boot_cpu_data.x86_model > 0x3)
                                    return;
    
    Here I get boot_cpu_data.x86_model == 0x4.  So I decided to change it and
    reboot.  I now seem to have a working NMI.  So, unless there's something know
    to be bad about this processor and the NMI.  I'm submitting the following
    patch.
    Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
    Acked-by: NZwane Mwaikambo <zwane@arm.linux.org.uk>
    Acked-by: NMikael Pettersson <mikpe@csd.uu.se>
    Signed-off-by: NAndrew Morton <akpm@osdl.org>
    Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
    cd3716ab
nmi.c 13.9 KB