Re: [PATCH] perf/x86: check ucode before disabling PEBS on SandyBridge

Andi Kleen
2012-06-07T13:27:13Z

> + /*
> + * check ucode version for SNB, SNB-EP
> + */
> + if ((model == 42 || model == 45) && uversion < 0x28) {

You need to check for x86 == 6 here.

-Andi
> + pr_warn("SandyBridge PEBS unavailable due to CPU erratum, "
> + " update microcode (was 0x%x, needs at least 0x28).\n",
> + uversion);
> + return -ENOTSUPP;