diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2018-04-11 10:06:25 +0200 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2018-04-11 10:06:25 +0200 |
commit | 402d68af1a0926bd711a36ceaf3fc07407a2983a (patch) | |
tree | ba221e1b0e46d84235378709f3903ca3c6552c7f /winsup/cygwin | |
parent | 8a91646183b3b436d620e9b4b5bec67133101c3a (diff) | |
download | newlib-402d68af1a0926bd711a36ceaf3fc07407a2983a.zip newlib-402d68af1a0926bd711a36ceaf3fc07407a2983a.tar.gz newlib-402d68af1a0926bd711a36ceaf3fc07407a2983a.tar.bz2 |
Cygwin: cpuinfo: report L3 cache on Intel CPUs
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/cygwin')
-rw-r--r-- | winsup/cygwin/fhandler_proc.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/winsup/cygwin/fhandler_proc.cc b/winsup/cygwin/fhandler_proc.cc index 942cc96..b118a14 100644 --- a/winsup/cygwin/fhandler_proc.cc +++ b/winsup/cygwin/fhandler_proc.cc @@ -768,8 +768,9 @@ format_proc_cpuinfo (void *, char *&destbuf) extern long get_cpu_cache_intel (int sysc, uint32_t maxf); long cs; - /* As on Linux, don't check for L3 cache. */ - cs = get_cpu_cache_intel (_SC_LEVEL2_CACHE_SIZE, maxf); + cs = get_cpu_cache_intel (_SC_LEVEL3_CACHE_SIZE, maxf); + if (cs == -1) + cs = get_cpu_cache_intel (_SC_LEVEL2_CACHE_SIZE, maxf); if (cs == -1) { cs = get_cpu_cache_intel (_SC_LEVEL1_ICACHE_SIZE, maxf); |