fhandler_proc.cc(format_proc_cpuinfo): fix AMD physical cores count

Fix AMD physical cores count documented as core_info low byte + 1.
This commit is contained in:
Brian Inglis 2019-10-07 10:23:00 -06:00 committed by Ken Brown
parent 74aa6e3cdb
commit 7a0496f78f
1 changed files with 1 additions and 2 deletions

View File

@ -885,11 +885,10 @@ format_proc_cpuinfo (void *, char *&destbuf)
cpuid (&unused, &unused, &core_info, &unused, 0x80000008);
cpuid (&unused, &cus, &unused, &unused, 0x8000001e);
siblings = (core_info & 0xff) + 1;
siblings = cpu_cores = (core_info & 0xff) + 1;
logical_bits = (core_info >> 12) & 0xf;
cus = ((cus >> 8) & 0x3) + 1;
ht_bits = mask_bits (cus);
cpu_cores = siblings >> ht_bits;
}
else if (maxe >= 0x80000008)
{