From: Florian Weimer Date: Wed, 28 Oct 2020 14:53:26 +0000 (+0100) Subject: x86: Restore processing of cache size tunables in init_cacheinfo X-Git-Tag: glibc-2.33~345 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb3a749a22a55645dc6a52659eea765300623f98;p=thirdparty%2Fglibc.git x86: Restore processing of cache size tunables in init_cacheinfo Fixes and partially reverts commit 59803e81f96b479c17f583b31eac44b5 ("x86: Optimizing memcpy for AMD Zen architecture."). --- diff --git a/sysdeps/x86/cacheinfo.h b/sysdeps/x86/cacheinfo.h index 1296c93b2b9..0aec0e28753 100644 --- a/sysdeps/x86/cacheinfo.h +++ b/sysdeps/x86/cacheinfo.h @@ -354,11 +354,9 @@ init_cacheinfo (void) } } + /* Prefer cache size configure via tuning. */ if (cpu_features->data_cache_size != 0) - { - if (data == 0 || cpu_features->basic.kind != arch_kind_amd) - data = cpu_features->data_cache_size; - } + data = cpu_features->data_cache_size; if (data > 0) { @@ -370,11 +368,9 @@ init_cacheinfo (void) __x86_data_cache_size = data; } + /* Prefer cache size configure via tuning. */ if (cpu_features->shared_cache_size != 0) - { - if (shared == 0 || cpu_features->basic.kind != arch_kind_amd) - shared = cpu_features->shared_cache_size; - } + shared = cpu_features->shared_cache_size; if (shared > 0) {