/Linux-v4.19/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 if (of_property_read_u32(np, propname, &this_leaf->size)) in cache_size() 83 this_leaf->size = 0; in cache_size() 87 static void cache_get_line_size(struct cacheinfo *this_leaf, in cache_get_line_size() argument 92 ct_idx = get_cacheinfo_idx(this_leaf->type); in cache_get_line_size() 103 this_leaf->coherency_line_size = line_size; in cache_get_line_size() 109 static void cache_nr_sets(struct cacheinfo *this_leaf, struct device_node *np) in cache_nr_sets() argument [all …]
|
/Linux-v4.19/arch/nds32/kernel/ |
D | cacheinfo.c | 8 static void ci_leaf_init(struct cacheinfo *this_leaf, in ci_leaf_init() argument 13 this_leaf->level = level; in ci_leaf_init() 14 this_leaf->type = type; in ci_leaf_init() 15 this_leaf->coherency_line_size = CACHE_LINE_SIZE(cache_type); in ci_leaf_init() 16 this_leaf->number_of_sets = CACHE_SET(cache_type);; in ci_leaf_init() 17 this_leaf->ways_of_associativity = CACHE_WAY(cache_type); in ci_leaf_init() 18 this_leaf->size = this_leaf->number_of_sets * in ci_leaf_init() 19 this_leaf->coherency_line_size * this_leaf->ways_of_associativity; in ci_leaf_init() 21 this_leaf->attributes = CACHE_WRITE_THROUGH; in ci_leaf_init() 23 this_leaf->attributes = CACHE_WRITE_BACK; in ci_leaf_init() [all …]
|
/Linux-v4.19/arch/x86/kernel/cpu/ |
D | cacheinfo.c | 347 static ssize_t show_cache_disable(struct cacheinfo *this_leaf, char *buf, in show_cache_disable() argument 351 struct amd_northbridge *nb = this_leaf->priv; in show_cache_disable() 365 struct cacheinfo *this_leaf = dev_get_drvdata(dev); \ 366 return show_cache_disable(this_leaf, buf, slot); \ 433 static ssize_t store_cache_disable(struct cacheinfo *this_leaf, in store_cache_disable() argument 439 struct amd_northbridge *nb = this_leaf->priv; in store_cache_disable() 444 cpu = cpumask_first(&this_leaf->shared_cpu_map); in store_cache_disable() 465 struct cacheinfo *this_leaf = dev_get_drvdata(dev); \ 466 return store_cache_disable(this_leaf, buf, count, slot); \ 474 struct cacheinfo *this_leaf = dev_get_drvdata(dev); in subcaches_show() local [all …]
|
/Linux-v4.19/arch/ia64/kernel/ |
D | topology.c | 143 struct cache_info * this_leaf) in cache_shared_cpu_map_setup() argument 151 cpumask_set_cpu(cpu, &this_leaf->shared_cpu_map); in cache_shared_cpu_map_setup() 155 if (ia64_pal_cache_shared_info(this_leaf->level, in cache_shared_cpu_map_setup() 156 this_leaf->type, in cache_shared_cpu_map_setup() 167 cpumask_set_cpu(j, &this_leaf->shared_cpu_map); in cache_shared_cpu_map_setup() 171 ia64_pal_cache_shared_info(this_leaf->level, in cache_shared_cpu_map_setup() 172 this_leaf->type, in cache_shared_cpu_map_setup() 178 struct cache_info * this_leaf) in cache_shared_cpu_map_setup() argument 180 cpumask_set_cpu(cpu, &this_leaf->shared_cpu_map); in cache_shared_cpu_map_setup() 185 static ssize_t show_coherency_line_size(struct cache_info *this_leaf, in show_coherency_line_size() argument [all …]
|
/Linux-v4.19/arch/s390/kernel/ |
D | cache.c | 106 static void ci_leaf_init(struct cacheinfo *this_leaf, int private, in ci_leaf_init() argument 115 this_leaf->level = level + 1; in ci_leaf_init() 116 this_leaf->type = type; in ci_leaf_init() 117 this_leaf->coherency_line_size = ecag(EXTRACT_LINE_SIZE, level, ti); in ci_leaf_init() 118 this_leaf->ways_of_associativity = ecag(EXTRACT_ASSOCIATIVITY, level, ti); in ci_leaf_init() 119 this_leaf->size = ecag(EXTRACT_SIZE, level, ti); in ci_leaf_init() 120 num_sets = this_leaf->size / this_leaf->coherency_line_size; in ci_leaf_init() 121 num_sets /= this_leaf->ways_of_associativity; in ci_leaf_init() 122 this_leaf->number_of_sets = num_sets; in ci_leaf_init() 123 cpumask_set_cpu(cpu, &this_leaf->shared_cpu_map); in ci_leaf_init() [all …]
|
/Linux-v4.19/arch/riscv/kernel/ |
D | cacheinfo.c | 19 static void ci_leaf_init(struct cacheinfo *this_leaf, in ci_leaf_init() argument 23 this_leaf->level = level; in ci_leaf_init() 24 this_leaf->type = type; in ci_leaf_init() 26 this_leaf->physical_line_partition = 1; in ci_leaf_init() 28 this_leaf->attributes = in ci_leaf_init() 73 struct cacheinfo *this_leaf = this_cpu_ci->info_list; in __populate_cache_leaves() local 78 ci_leaf_init(this_leaf++, np, CACHE_TYPE_UNIFIED, level); in __populate_cache_leaves() 80 ci_leaf_init(this_leaf++, np, CACHE_TYPE_INST, level); in __populate_cache_leaves() 82 ci_leaf_init(this_leaf++, np, CACHE_TYPE_DATA, level); in __populate_cache_leaves() 92 ci_leaf_init(this_leaf++, np, CACHE_TYPE_UNIFIED, level); in __populate_cache_leaves() [all …]
|
/Linux-v4.19/arch/arm64/kernel/ |
D | cacheinfo.c | 41 static void ci_leaf_init(struct cacheinfo *this_leaf, in ci_leaf_init() argument 44 this_leaf->level = level; in ci_leaf_init() 45 this_leaf->type = type; in ci_leaf_init() 88 struct cacheinfo *this_leaf = this_cpu_ci->info_list; in __populate_cache_leaves() local 94 ci_leaf_init(this_leaf++, CACHE_TYPE_DATA, level); in __populate_cache_leaves() 95 ci_leaf_init(this_leaf++, CACHE_TYPE_INST, level); in __populate_cache_leaves() 97 ci_leaf_init(this_leaf++, type, level); in __populate_cache_leaves()
|
/Linux-v4.19/drivers/acpi/ |
D | pptt.c | 356 static void update_cache_properties(struct cacheinfo *this_leaf, in update_cache_properties() argument 362 this_leaf->fw_token = cpu_node; in update_cache_properties() 364 this_leaf->size = found_cache->size; in update_cache_properties() 368 this_leaf->coherency_line_size = found_cache->line_size; in update_cache_properties() 372 this_leaf->number_of_sets = found_cache->number_of_sets; in update_cache_properties() 376 this_leaf->ways_of_associativity = found_cache->associativity; in update_cache_properties() 382 this_leaf->attributes = CACHE_WRITE_THROUGH; in update_cache_properties() 385 this_leaf->attributes = CACHE_WRITE_BACK; in update_cache_properties() 392 this_leaf->attributes |= CACHE_READ_ALLOCATE; in update_cache_properties() 395 this_leaf->attributes |= CACHE_WRITE_ALLOCATE; in update_cache_properties() [all …]
|
/Linux-v4.19/arch/mips/kernel/ |
D | cacheinfo.c | 68 struct cacheinfo *this_leaf = this_cpu_ci->info_list; in __populate_cache_leaves() local 71 populate_cache(dcache, this_leaf, 1, CACHE_TYPE_DATA); in __populate_cache_leaves() 72 populate_cache(icache, this_leaf, 1, CACHE_TYPE_INST); in __populate_cache_leaves() 74 populate_cache(dcache, this_leaf, 1, CACHE_TYPE_UNIFIED); in __populate_cache_leaves() 78 populate_cache(scache, this_leaf, 2, CACHE_TYPE_UNIFIED); in __populate_cache_leaves() 81 populate_cache(tcache, this_leaf, 3, CACHE_TYPE_UNIFIED); in __populate_cache_leaves()
|
/Linux-v4.19/include/linux/ |
D | cacheinfo.h | 118 const struct attribute_group *cache_get_priv_group(struct cacheinfo *this_leaf);
|