aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2018-04-11 10:06:25 +0200
committerCorinna Vinschen <corinna@vinschen.de>2018-04-11 10:06:25 +0200
commit402d68af1a0926bd711a36ceaf3fc07407a2983a (patch)
treeba221e1b0e46d84235378709f3903ca3c6552c7f /winsup/cygwin
parent8a91646183b3b436d620e9b4b5bec67133101c3a (diff)
downloadnewlib-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.cc5
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);