H.J. Lu a546baa9cd Properly count number of logical processors on Intel CPUs.
The meaning of the 25-14 bits in EAX returned from cpuid with EAX = 4
has been changed from "the maximum number of threads sharing the cache"
to "the maximum number of addressable IDs for logical processors sharing
the cache" if cpuid takes EAX = 11.  We need to use results from both
EAX = 4 and EAX = 11 to get the number of threads sharing the cache.

The 25-14 bits in EAX on Core i7 is 15 although the number of logical
processors is 8.  Here is a white paper on this:

http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/

This patch correctly counts number of logical processors on Intel CPUs
with EAX = 11 support on cpuid.  Tested on Dinnington, Core i7 and
Nehalem EX/EP.

It also fixed Pentium Ds workaround since EBX may not have the right
value returned from cpuid with EAX = 1.
2009-08-07 09:39:36 -07:00
..
2009-04-14 22:24:59 +00:00
2009-04-14 22:26:05 +00:00
2007-10-16 05:59:15 +00:00
2007-06-08 02:50:59 +00:00
2009-04-14 22:26:05 +00:00
2009-06-16 10:23:31 -07:00
2009-04-14 22:26:05 +00:00
2009-04-14 22:26:05 +00:00
2009-01-29 00:17:57 +00:00
2009-04-06 03:29:26 +00:00
2009-04-14 22:26:05 +00:00
2009-04-14 22:26:05 +00:00