svn commit: r242565 - head/sys/dev/cpuctl

Andriy Gapon avg at FreeBSD.org
Sun Nov 4 13:46:28 UTC 2012


Author: avg
Date: Sun Nov  4 13:46:28 2012
New Revision: 242565
URL: http://svn.freebsd.org/changeset/base/242565

Log:
  cpuctl_do_cpuid: explicitly use ecx=0 for cpuid call
  
  ... instead of whatever random value may happen to be in the register.
  ecx is important to some cpuid leaves.
  
  To do: extend cpuctl interface to provide for ecx value parameter.
  
  MFC after:	5 days

Modified:
  head/sys/dev/cpuctl/cpuctl.c

Modified: head/sys/dev/cpuctl/cpuctl.c
==============================================================================
--- head/sys/dev/cpuctl/cpuctl.c	Sun Nov  4 13:42:34 2012	(r242564)
+++ head/sys/dev/cpuctl/cpuctl.c	Sun Nov  4 13:46:28 2012	(r242565)
@@ -204,7 +204,7 @@ cpuctl_do_cpuid(int cpu, cpuctl_cpuid_ar
 	oldcpu = td->td_oncpu;
 	is_bound = cpu_sched_is_bound(td);
 	set_cpu(cpu, td);
-	do_cpuid(data->level, data->data);
+	cpuid_count(data->level, 0, data->data);
 	restore_cpu(oldcpu, is_bound, td);
 	return (0);
 }


More information about the svn-src-head mailing list