]> sourceware.org Git - glibc.git/commitdiff
Correct Intel processor level type mask from CPUID
authorH.J. Lu <hjl.tools@gmail.com>
Thu, 19 May 2016 17:02:36 +0000 (10:02 -0700)
committerH.J. Lu <hjl.tools@gmail.com>
Thu, 19 May 2016 17:02:36 +0000 (10:02 -0700)
Intel CPUID with EAX == 11 returns:

ECX Bits 07 - 00: Level number. Same value in ECX input.
    Bits 15 - 08: Level type.
    ^^^^^^^^^^^^^^^^^^^^^^^^ This is level type.
    Bits 31 - 16: Reserved.

Intel processor level type mask should be 0xff00, not 0xff0.

[BZ #20119]
* sysdeps/x86/cacheinfo.c (init_cacheinfo): Correct Intel
processor level type mask for CPUID with EAX == 11.

ChangeLog
sysdeps/x86/cacheinfo.c

index 8adf828d1b6f5bde9cf21d94127b490d3476e202..7ba904d0be4f8322e09aa582aa987f2c071076f7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-05-19  H.J. Lu  <hongjiu.lu@intel.com>
+
+       [BZ #20119]
+       * sysdeps/x86/cacheinfo.c (init_cacheinfo): Correct Intel
+       processor level type mask for CPUID with EAX == 11.
+
 2016-05-19  H.J. Lu  <hongjiu.lu@intel.com>
 
        * sysdeps/x86/cacheinfo.c (init_cacheinfo): Skip counting
index 1f46d9de2012740387a41f5f4285588400306a85..020d3fd3970c9b1f92dc93c364a539443bfd05e3 100644 (file)
@@ -552,7 +552,7 @@ init_cacheinfo (void)
                      __cpuid_count (11, i++, eax, ebx, ecx, edx);
 
                      int shipped = ebx & 0xff;
-                     int type = ecx & 0xff0;
+                     int type = ecx & 0xff00;
                      if (shipped == 0 || type == 0)
                        break;
                      else if (type == 0x200)
This page took 0.182544 seconds and 5 git commands to generate.