Re: nmi_watchdog=2 regression in 2.6.21

Stephane Eranian
2007-08-27T22:56:26Z

[-- Attachment #1: Type: text/plain, Size: 841 bytes --]

Daniel,

On Mon, Aug 27, 2007 at 10:55:31AM -0700, Daniel Walker wrote:

> Here is the cpuinfo for processor 0 .. It's got four cores so this isn't
> the full /proc/cpuinfo output ..
>

> processor : 0
> vendor_id : GenuineIntel
> cpu family : 6
> model : 14

The looks like a Core Duo. If that is really the case,
then commit e82f64e5bb0648a13630d752c35be1e7bd8bab96 from Bjorn
should fix your problem. I have it is my 2.6.23-rc3 tree.

> model name : Intel(R) Dual Pentium(R) M CPU @ 2.00GHz

Yet the model name looks strange. So we need to run one more test,
as the fam/model is not enough. What we need to check is whether or
not this processor implements architectural perfmon or not.

Could you please compile and run the attached program and send me
the output?

Thanks.

>

--

-Stephane

[-- Attachment #2: cpuid-pmu2.c --]
[-- Type: text/plain, Size: 844 bytes --]

#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>

typedef struct {
unsigned int version:8;
unsigned int num_cnt:8;
unsigned int cnt_width:8;
unsigned int ebx_length:8;
} pmu_eax_t;

static inline void cpuid(unsigned int op, unsigned int *eax, unsigned int *ebx, unsigned int *ecx, unsigned int *edx)
{
__asm__("cpuid"
: "=a" (*eax),
"=b" (*ebx),
"=c" (*ecx),
"=d" (*edx)
: "0" (op), "c"(0));
}

int main(void)
{
unsigned int ecx, ebx, edx;
union {
unsigned int val;
pmu_eax_t eax;
} eax;

cpuid(0, &eax.val, &ebx, &ecx, &edx);
if (eax.val < 0xa) {
printf("does not support architected PMU\n");
return 0;
}
cpuid(0xa, &eax.val, &ebx, &ecx, &edx);

printf("eax=0x%lx: version=%d num_cnt=%d\n",
eax.val,
eax.eax.version,
eax.eax.num_cnt);
return 0;
}