diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2021-03-06 10:19:32 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2021-03-15 05:43:26 -0700 |
commit | f53ffc9b90cbd92fa5518686daf4091bdd1d4889 (patch) | |
tree | 35e4c6a7aa32823135a4ceafdcde998e976727e2 /sysdeps/x86/cacheinfo.c | |
parent | 332421312576bd7095e70589154af99b124dd2d1 (diff) | |
download | glibc-f53ffc9b90cbd92fa5518686daf4091bdd1d4889.zip glibc-f53ffc9b90cbd92fa5518686daf4091bdd1d4889.tar.gz glibc-f53ffc9b90cbd92fa5518686daf4091bdd1d4889.tar.bz2 |
x86: Handle _SC_LEVEL1_ICACHE_LINESIZE [BZ #27444]
commit 2d651eb9265d1366d7b9e881bfddd46db9c1ecc4
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Fri Sep 18 07:55:14 2020 -0700
x86: Move x86 processor cache info to cpu_features
missed _SC_LEVEL1_ICACHE_LINESIZE.
1. Add level1_icache_linesize to struct cpu_features.
2. Initialize level1_icache_linesize by calling handle_intel,
handle_zhaoxin and handle_amd with _SC_LEVEL1_ICACHE_LINESIZE.
3. Return level1_icache_linesize for _SC_LEVEL1_ICACHE_LINESIZE.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'sysdeps/x86/cacheinfo.c')
-rw-r--r-- | sysdeps/x86/cacheinfo.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sysdeps/x86/cacheinfo.c b/sysdeps/x86/cacheinfo.c index 7b8df45..5ea4723 100644 --- a/sysdeps/x86/cacheinfo.c +++ b/sysdeps/x86/cacheinfo.c @@ -32,6 +32,9 @@ __cache_sysconf (int name) case _SC_LEVEL1_ICACHE_SIZE: return cpu_features->level1_icache_size; + case _SC_LEVEL1_ICACHE_LINESIZE: + return cpu_features->level1_icache_linesize; + case _SC_LEVEL1_DCACHE_SIZE: return cpu_features->level1_dcache_size; |