/linux-5.19.10/drivers/base/ |
D | cacheinfo.c | 35 static inline bool cache_leaves_are_shared(struct cacheinfo *this_leaf, in cache_leaves_are_shared() argument 38 return sib_leaf->fw_token == this_leaf->fw_token; in cache_leaves_are_shared() 74 static void cache_size(struct cacheinfo *this_leaf, struct device_node *np) in cache_size() argument 79 ct_idx = get_cacheinfo_idx(this_leaf->type); in cache_size() 82 of_property_read_u32(np, propname, &this_leaf->size); in cache_size() 86 static void cache_get_line_size(struct cacheinfo *this_leaf, in cache_get_line_size() argument 91 ct_idx = get_cacheinfo_idx(this_leaf->type); in cache_get_line_size() 102 this_leaf->coherency_line_size = line_size; in cache_get_line_size() 108 static void cache_nr_sets(struct cacheinfo *this_leaf, struct device_node *np) in cache_nr_sets() argument 113 ct_idx = get_cacheinfo_idx(this_leaf->type); in cache_nr_sets() [all …]
|
/linux-5.19.10/arch/riscv/kernel/ |
D | cacheinfo.c | 20 cache_get_priv_group(struct cacheinfo *this_leaf) in cache_get_priv_group() argument 23 return rv_cache_ops->get_priv_group(this_leaf); in cache_get_priv_group() 39 struct cacheinfo *this_leaf; in get_cacheinfo() local 43 this_leaf = this_cpu_ci->info_list + index; in get_cacheinfo() 44 if (this_leaf->level == level && this_leaf->type == type) in get_cacheinfo() 45 return this_leaf; in get_cacheinfo() 53 struct cacheinfo *this_leaf = get_cacheinfo(level, type); in get_cache_size() local 55 return this_leaf ? this_leaf->size : 0; in get_cache_size() 60 struct cacheinfo *this_leaf = get_cacheinfo(level, type); in get_cache_geometry() local 62 return this_leaf ? (this_leaf->ways_of_associativity << 16 | in get_cache_geometry() [all …]
|
/linux-5.19.10/arch/x86/kernel/cpu/ |
D | cacheinfo.c | 349 static ssize_t show_cache_disable(struct cacheinfo *this_leaf, char *buf, in show_cache_disable() argument 353 struct amd_northbridge *nb = this_leaf->priv; in show_cache_disable() 367 struct cacheinfo *this_leaf = dev_get_drvdata(dev); \ 368 return show_cache_disable(this_leaf, buf, slot); \ 435 static ssize_t store_cache_disable(struct cacheinfo *this_leaf, in store_cache_disable() argument 441 struct amd_northbridge *nb = this_leaf->priv; in store_cache_disable() 446 cpu = cpumask_first(&this_leaf->shared_cpu_map); in store_cache_disable() 467 struct cacheinfo *this_leaf = dev_get_drvdata(dev); \ 468 return store_cache_disable(this_leaf, buf, count, slot); \ 476 struct cacheinfo *this_leaf = dev_get_drvdata(dev); in subcaches_show() local [all …]
|
/linux-5.19.10/arch/loongarch/kernel/ |
D | cacheinfo.c | 64 static inline bool cache_leaves_are_shared(struct cacheinfo *this_leaf, in cache_leaves_are_shared() argument 67 return !((this_leaf->level == 1) || (this_leaf->level == 2)); in cache_leaves_are_shared() 73 struct cacheinfo *this_leaf, *sib_leaf; in cache_cpumap_setup() local 79 this_leaf = this_cpu_ci->info_list + index; in cache_cpumap_setup() 81 if (!cpumask_empty(&this_leaf->shared_cpu_map)) in cache_cpumap_setup() 84 cpumask_set_cpu(cpu, &this_leaf->shared_cpu_map); in cache_cpumap_setup() 91 if (cache_leaves_are_shared(this_leaf, sib_leaf)) { in cache_cpumap_setup() 93 cpumask_set_cpu(i, &this_leaf->shared_cpu_map); in cache_cpumap_setup() 104 struct cacheinfo *this_leaf = this_cpu_ci->info_list; in populate_cache_leaves() local 111 populate_cache(dcache, this_leaf, level, CACHE_TYPE_DATA); in populate_cache_leaves() [all …]
|
/linux-5.19.10/arch/ia64/kernel/ |
D | topology.c | 128 struct cache_info * this_leaf) in cache_shared_cpu_map_setup() argument 136 cpumask_set_cpu(cpu, &this_leaf->shared_cpu_map); in cache_shared_cpu_map_setup() 140 if (ia64_pal_cache_shared_info(this_leaf->level, in cache_shared_cpu_map_setup() 141 this_leaf->type, in cache_shared_cpu_map_setup() 152 cpumask_set_cpu(j, &this_leaf->shared_cpu_map); in cache_shared_cpu_map_setup() 156 ia64_pal_cache_shared_info(this_leaf->level, in cache_shared_cpu_map_setup() 157 this_leaf->type, in cache_shared_cpu_map_setup() 163 struct cache_info * this_leaf) in cache_shared_cpu_map_setup() argument 165 cpumask_set_cpu(cpu, &this_leaf->shared_cpu_map); in cache_shared_cpu_map_setup() 170 static ssize_t show_coherency_line_size(struct cache_info *this_leaf, in show_coherency_line_size() argument [all …]
|
/linux-5.19.10/arch/s390/kernel/ |
D | cache.c | 103 static void ci_leaf_init(struct cacheinfo *this_leaf, int private, in ci_leaf_init() argument 112 this_leaf->level = level + 1; in ci_leaf_init() 113 this_leaf->type = type; in ci_leaf_init() 114 this_leaf->coherency_line_size = ecag(EXTRACT_LINE_SIZE, level, ti); in ci_leaf_init() 115 this_leaf->ways_of_associativity = ecag(EXTRACT_ASSOCIATIVITY, level, ti); in ci_leaf_init() 116 this_leaf->size = ecag(EXTRACT_SIZE, level, ti); in ci_leaf_init() 117 num_sets = this_leaf->size / this_leaf->coherency_line_size; in ci_leaf_init() 118 num_sets /= this_leaf->ways_of_associativity; in ci_leaf_init() 119 this_leaf->number_of_sets = num_sets; in ci_leaf_init() 120 cpumask_set_cpu(cpu, &this_leaf->shared_cpu_map); in ci_leaf_init() [all …]
|
/linux-5.19.10/arch/mips/kernel/ |
D | cacheinfo.c | 81 struct cacheinfo *this_leaf = this_cpu_ci->info_list; in populate_cache_leaves() local 86 fill_cpumask_siblings(cpu, &this_leaf->shared_cpu_map); in populate_cache_leaves() 87 populate_cache(dcache, this_leaf, level, CACHE_TYPE_DATA); in populate_cache_leaves() 88 fill_cpumask_siblings(cpu, &this_leaf->shared_cpu_map); in populate_cache_leaves() 89 populate_cache(icache, this_leaf, level, CACHE_TYPE_INST); in populate_cache_leaves() 92 populate_cache(dcache, this_leaf, level, CACHE_TYPE_UNIFIED); in populate_cache_leaves() 98 fill_cpumask_siblings(cpu, &this_leaf->shared_cpu_map); in populate_cache_leaves() 99 populate_cache(vcache, this_leaf, level, CACHE_TYPE_UNIFIED); in populate_cache_leaves() 105 fill_cpumask_cluster(cpu, &this_leaf->shared_cpu_map); in populate_cache_leaves() 106 populate_cache(scache, this_leaf, level, CACHE_TYPE_UNIFIED); in populate_cache_leaves() [all …]
|
/linux-5.19.10/arch/arm64/kernel/ |
D | cacheinfo.c | 39 static void ci_leaf_init(struct cacheinfo *this_leaf, in ci_leaf_init() argument 42 this_leaf->level = level; in ci_leaf_init() 43 this_leaf->type = type; in ci_leaf_init() 90 struct cacheinfo *this_leaf = this_cpu_ci->info_list; in populate_cache_leaves() local 96 ci_leaf_init(this_leaf++, CACHE_TYPE_DATA, level); in populate_cache_leaves() 97 ci_leaf_init(this_leaf++, CACHE_TYPE_INST, level); in populate_cache_leaves() 99 ci_leaf_init(this_leaf++, type, level); in populate_cache_leaves()
|
/linux-5.19.10/drivers/acpi/ |
D | pptt.c | 358 static void update_cache_properties(struct cacheinfo *this_leaf, in update_cache_properties() argument 365 this_leaf->fw_token = cpu_node; in update_cache_properties() 367 this_leaf->size = found_cache->size; in update_cache_properties() 369 this_leaf->coherency_line_size = found_cache->line_size; in update_cache_properties() 371 this_leaf->number_of_sets = found_cache->number_of_sets; in update_cache_properties() 373 this_leaf->ways_of_associativity = found_cache->associativity; in update_cache_properties() 377 this_leaf->attributes = CACHE_WRITE_THROUGH; in update_cache_properties() 380 this_leaf->attributes = CACHE_WRITE_BACK; in update_cache_properties() 387 this_leaf->attributes |= CACHE_READ_ALLOCATE; in update_cache_properties() 390 this_leaf->attributes |= CACHE_WRITE_ALLOCATE; in update_cache_properties() [all …]
|
/linux-5.19.10/arch/riscv/include/asm/ |
D | cacheinfo.h | 13 *this_leaf);
|
/linux-5.19.10/drivers/soc/sifive/ |
D | sifive_l2_cache.c | 142 static const struct attribute_group *l2_get_priv_group(struct cacheinfo *this_leaf) in l2_get_priv_group() argument 145 if (this_leaf->level == 2) in l2_get_priv_group()
|
/linux-5.19.10/include/linux/ |
D | cacheinfo.h | 102 const struct attribute_group *cache_get_priv_group(struct cacheinfo *this_leaf);
|