1 // SPDX-License-Identifier: GPL-2.0
5 #ifdef _SC_LEVEL1_DCACHE_LINESIZE
6 #define cache_line_size(cacheline_sizep) *cacheline_sizep = sysconf(_SC_LEVEL1_DCACHE_LINESIZE)
10 static void cache_line_size(int *cacheline_sizep)
12 if (sysfs__read_int("devices/system/cpu/cpu0/cache/index0/coherency_line_size", cacheline_sizep))
13 pr_debug("cannot determine cache line size");
17 int cacheline_size(void)
22 cache_line_size(&size);