+2010-11-03 H.J. Lu <hongjiu.lu@intel.com>
+
+ [BZ #12191]
+ * sysdeps/x86_64/cacheinfo.c (init_cacheinfo): Round
+ __x86_64_data_cache_size_half, __x86_64_data_cache_size
+ __x86_64_shared_cache_size_half and __x86_64_shared_cache_size,
+ to multiple of 256 bytes.
+
2010-11-03 Ulrich Drepper <drepper@gmail.com>
[BZ #12167]
/* Half the data cache size for use in memory and string routines, typically
- L1 size. */
+ L1 size, rounded to multiple of 256 bytes. */
long int __x86_64_data_cache_size_half attribute_hidden = 32 * 1024 / 2;
/* Shared cache size for use in memory and string routines, typically
- L2 or L3 size. */
+ L2 or L3 size, rounded to multiple of 256 bytes. */
long int __x86_64_shared_cache_size_half attribute_hidden = 1024 * 1024 / 2;
long int __x86_64_shared_cache_size attribute_hidden = 1024 * 1024;
}
if (data > 0)
- __x86_64_data_cache_size_half = data / 2;
+ {
+ /* Round data cache size to multiple of 256 bytes. */
+ data = data & ~255L;
+ __x86_64_data_cache_size_half = data / 2;
+ }
if (shared > 0)
{
+ /* Round shared cache size to multiple of 256 bytes. */
+ shared = shared & ~255L;
__x86_64_shared_cache_size_half = shared / 2;
__x86_64_shared_cache_size = shared;
}