aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Inglis <Brian.Inglis@SystematicSW.ab.ca>2019-10-07 10:23:00 -0600
committerKen Brown <kbrown@cornell.edu>2019-10-07 15:50:32 -0400
commit7a0496f78f60d43cf9545a794cbf8c00d7bb8e02 (patch)
treef0ea71b0b2eb85501dc45833844fdf4ccc3c7c71
parent74aa6e3cdb167bdbfa02d5781e9efb154a15bcdb (diff)
downloadnewlib-7a0496f78f60d43cf9545a794cbf8c00d7bb8e02.zip
newlib-7a0496f78f60d43cf9545a794cbf8c00d7bb8e02.tar.gz
newlib-7a0496f78f60d43cf9545a794cbf8c00d7bb8e02.tar.bz2
fhandler_proc.cc(format_proc_cpuinfo): fix AMD physical cores count
Fix AMD physical cores count documented as core_info low byte + 1.
-rw-r--r--winsup/cygwin/fhandler_proc.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc
index 78518ba..c94cde9 100644
--- a/winsup/cygwin/fhandler_proc.cc
+++ b/winsup/cygwin/fhandler_proc.cc
@@ -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)
{