[lm-sensors] [PATCH] coretemp: fix reading of microcode revision
Jean Delvare
khali at linux-fr.org
Fri Oct 8 10:22:03 CEST 2010
Hi Jan,
On Fri, 08 Oct 2010 08:05:21 +0100, Jan Beulich wrote:
> >>> On 07.10.10 at 20:46, Fenghua Yu <fenghua.yu at intel.com> wrote:
> > On Thu, Oct 07, 2010 at 02:36:01AM -0700, Jan Beulich wrote:
> >> @@ -327,8 +336,13 @@ static int __devinit coretemp_probe(stru
> >>
> >> if ((c->x86_model == 0xe) && (c->x86_mask < 0xc)) {
> >> /* check for microcode update */
> >> - rdmsr_on_cpu(data->id, MSR_IA32_UCODE_REV, &eax, &edx);
> >> - if (edx < 0x39) {
> >> + err = smp_call_function_single(data->id, get_ucode_rev_on_cpu,
> >> + &edx, 1);
> >> + if (err)
> >> + dev_warn(&pdev->dev,
> >> + "Cannot determine microcode revision "
> >> + "of the CPU!\n");
> >
> > When err, need to call dev_err and go to exit_free. This error handling
> > should
> > be same as edx < 0x39 case.
>
> Hmm, not sure - I'd prefer to consider the machine usable in this
> (theoretical only anyway) case.
I tend to prefer Fenghua's approach, sorry. If a bad microcode revision
is so wrong that we fail the probe when we see it, then a failure to
determine the microcode revision should lead to the same result. As
always, missing monitoring information is preferable to unreliable
monitoring information.
--
Jean Delvare
More information about the lm-sensors
mailing list