svn commit: r214982 - head/sys/compat/linprocfs
Alexander Best
arundel at freebsd.org
Tue Nov 9 00:01:56 UTC 2010
On Mon Nov 8 10, Dag-Erling Smorgrav wrote:
> Author: des
> Date: Mon Nov 8 12:04:41 2010
> New Revision: 214982
> URL: http://svn.freebsd.org/changeset/base/214982
>
> Log:
> Fix CPU ID in /proc/cpuinfo.
thanks a lot. maybe it would also be a good idea to find out where "class" and
"cpu" are being defined and completely remove chose varaibles. i think the
CPUID_* macros are being used in most places in the src tree (boot messages
e.g.). plus there's no point really to have variables around which are being
set to wrong values.
>
> PR: kern/56451
> Submitted by: arundel@
> MFC after: 3 weeks
>
> Modified:
> head/sys/compat/linprocfs/linprocfs.c
>
> Modified: head/sys/compat/linprocfs/linprocfs.c
> ==============================================================================
> --- head/sys/compat/linprocfs/linprocfs.c Mon Nov 8 11:22:55 2010 (r214981)
> +++ head/sys/compat/linprocfs/linprocfs.c Mon Nov 8 12:04:41 2010 (r214982)
> @@ -276,11 +276,11 @@ linprocfs_docpuinfo(PFS_FILL_ARGS)
> sbuf_printf(sb,
> "processor\t: %d\n"
> "vendor_id\t: %.20s\n"
> - "cpu family\t: %d\n"
> - "model\t\t: %d\n"
> + "cpu family\t: %u\n"
> + "model\t\t: %u\n"
> "model name\t: %s\n"
> - "stepping\t: %d\n\n",
> - i, cpu_vendor, class, cpu, model, cpu_id & 0xf);
> + "stepping\t: %u\n\n",
> + i, cpu_vendor, CPUID_TO_FAMILY(cpu_id), CPUID_TO_MODEL(cpu_id), model, cpu_id & CPUID_STEPPING);
> /* XXX per-cpu vendor / class / model / id? */
> }
>
--
a13x
More information about the svn-src-all
mailing list