diff options
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/x86/cacheinfo.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sysdeps/x86/cacheinfo.c b/sysdeps/x86/cacheinfo.c index ac98741ac6..62986a7327 100644 --- a/sysdeps/x86/cacheinfo.c +++ b/sysdeps/x86/cacheinfo.c @@ -696,8 +696,8 @@ init_cacheinfo (void) /* Account for non-inclusive L2 and L3 caches. */ if (!inclusive_cache) { - if (threads_l2 > 0) - shared_per_thread += core / threads_l2; + long int core_per_thread = threads_l2 > 0 ? (core / threads_l2) : core; + shared_per_thread += core_per_thread; shared += core; } } |