Lines Matching +full:per +full:- +full:cpu +full:- +full:cluster
1 // SPDX-License-Identifier: GPL-2.0-only
10 leaf->type = c_type; \
11 leaf->level = c_level; \
12 leaf->coherency_line_size = c->cache.linesz; \
13 leaf->number_of_sets = c->cache.sets; \
14 leaf->ways_of_associativity = c->cache.ways; \
15 leaf->size = c->cache.linesz * c->cache.sets * \
16 c->cache.ways; \
20 int init_cache_level(unsigned int cpu) in init_cache_level() argument
23 struct cpu_cacheinfo *this_cpu_ci = get_cpu_cacheinfo(cpu); in init_cache_level()
30 if (c->dcache.waysize) in init_cache_level()
33 return -ENOENT; in init_cache_level()
36 leaves += (c->icache.waysize) ? 2 : 1; in init_cache_level()
38 if (c->vcache.waysize) { in init_cache_level()
43 if (c->scache.waysize) { in init_cache_level()
48 if (c->tcache.waysize) { in init_cache_level()
53 this_cpu_ci->num_levels = levels; in init_cache_level()
54 this_cpu_ci->num_leaves = leaves; in init_cache_level()
58 static void fill_cpumask_siblings(int cpu, cpumask_t *cpu_map) in fill_cpumask_siblings() argument
63 if (cpus_are_siblings(cpu, cpu1)) in fill_cpumask_siblings()
67 static void fill_cpumask_cluster(int cpu, cpumask_t *cpu_map) in fill_cpumask_cluster() argument
70 int cluster = cpu_cluster(&cpu_data[cpu]); in fill_cpumask_cluster() local
73 if (cpu_cluster(&cpu_data[cpu1]) == cluster) in fill_cpumask_cluster()
77 int populate_cache_leaves(unsigned int cpu) in populate_cache_leaves() argument
80 struct cpu_cacheinfo *this_cpu_ci = get_cpu_cacheinfo(cpu); in populate_cache_leaves()
81 struct cacheinfo *this_leaf = this_cpu_ci->info_list; in populate_cache_leaves()
84 if (c->icache.waysize) { in populate_cache_leaves()
85 /* I/D caches are per core */ in populate_cache_leaves()
86 fill_cpumask_siblings(cpu, &this_leaf->shared_cpu_map); in populate_cache_leaves()
88 fill_cpumask_siblings(cpu, &this_leaf->shared_cpu_map); in populate_cache_leaves()
96 if (c->vcache.waysize) { in populate_cache_leaves()
97 /* Vcache is per core as well */ in populate_cache_leaves()
98 fill_cpumask_siblings(cpu, &this_leaf->shared_cpu_map); in populate_cache_leaves()
103 if (c->scache.waysize) { in populate_cache_leaves()
104 /* Scache is per cluster */ in populate_cache_leaves()
105 fill_cpumask_cluster(cpu, &this_leaf->shared_cpu_map); in populate_cache_leaves()
110 if (c->tcache.waysize) in populate_cache_leaves()
113 this_cpu_ci->cpu_map_populated = true; in populate_cache_leaves()