This is the mail archive of the
cygwin-cvs@cygwin.com
mailing list for the Cygwin project.
[newlib-cygwin] Cygwin: cpuinfo: report L3 cache on Intel CPUs
- From: Corinna Vinschen <corinna at sourceware dot org>
- To: cygwin-cvs at sourceware dot org
- Date: 11 Apr 2018 09:59:55 -0000
- Subject: [newlib-cygwin] Cygwin: cpuinfo: report L3 cache on Intel CPUs
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=402d68af1a0926bd711a36ceaf3fc07407a2983a
commit 402d68af1a0926bd711a36ceaf3fc07407a2983a
Author: Corinna Vinschen <corinna@vinschen.de>
Date: Wed Apr 11 10:06:25 2018 +0200
Cygwin: cpuinfo: report L3 cache on Intel CPUs
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diff:
---
winsup/cygwin/fhandler_proc.cc | 5 +++--
1 file 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);