Re: [lm-sensors] Intel Core Duo/Solo Temperature Monitoring WorkingOn Intel DG965 Motherboard

From: Jean Delvare
Date: Thu Mar 15 2007 - 16:23:46 EST


Hi Nicolas,

On Thu, 15 Mar 2007 19:27:21 +0800, Nicolas Boichat wrote:
> I ported this patch to the latest git, I hope this can help to get it
> merged.
>
> I'm just wondering if it is right to export the functions msr_read and
> msr_write from arch/i386/kernel/msr.c, or if it would be better to put
> these functions in arch/i386/lib/msr-on-cpu.c with rdmsr_on_cpu and
> wrmsr_on_cpu.
>
> Note the difference between msr_read/msr_write and
> rdmsr_on_cpu/wrmsr_on_cpu is that msr_read/msr_write use "safe" rdmsr
> /wrmsr functions (i.e. test return value), while
> rdmsr_on_cpu/wrmsr_on_cpu does not. Coretemp needs the return value to
> work properly.

I reviewed Rudolf Marek's patches a few days ago and my first comment
was along these lines:
http://lists.lm-sensors.org/pipermail/lm-sensors/2007-March/019169.html

I do indeed believe that the functions in lib/msr-on-cpu.c should be
improved to be suitable for our needs. Others are likely to need the
same feature. Library functions should really return the errors, and
leave it up to the caller to decide whether to ignore them or not,
rather than hiding them.

Could you possibly propose a separate patch fixing lib/msr-on-cpu.c (on
both i386 and x86_64) to reliably report the errors? I guess it's a
simple matter of changing the prototypes of the functions? If we can
get this upstream, this would make the integration of the coretemp
driver easier and faster.

Thanks,
--
Jean Delvare
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/