Lines Matching refs:cache
906 static int cpu_cache_level__read(struct cpu_cache_level *cache, u32 cpu, u16 level) in cpu_cache_level__read() argument
919 if (sysfs__read_int(file, (int *) &cache->level)) in cpu_cache_level__read()
923 if (sysfs__read_int(file, (int *) &cache->line_size)) in cpu_cache_level__read()
927 if (sysfs__read_int(file, (int *) &cache->sets)) in cpu_cache_level__read()
931 if (sysfs__read_int(file, (int *) &cache->ways)) in cpu_cache_level__read()
935 if (sysfs__read_str(file, &cache->type, &len)) in cpu_cache_level__read()
938 cache->type[len] = 0; in cpu_cache_level__read()
939 cache->type = rtrim(cache->type); in cpu_cache_level__read()
942 if (sysfs__read_str(file, &cache->size, &len)) { in cpu_cache_level__read()
943 free(cache->type); in cpu_cache_level__read()
947 cache->size[len] = 0; in cpu_cache_level__read()
948 cache->size = rtrim(cache->size); in cpu_cache_level__read()
951 if (sysfs__read_str(file, &cache->map, &len)) { in cpu_cache_level__read()
952 free(cache->map); in cpu_cache_level__read()
953 free(cache->type); in cpu_cache_level__read()
957 cache->map[len] = 0; in cpu_cache_level__read()
958 cache->map = rtrim(cache->map); in cpu_cache_level__read()
2221 FEAT_OPF(HEADER_CACHE, cache),