Lines Matching refs:this_leaf
342 static ssize_t show_cache_disable(struct cacheinfo *this_leaf, char *buf, in show_cache_disable() argument
346 struct amd_northbridge *nb = this_leaf->priv; in show_cache_disable()
360 struct cacheinfo *this_leaf = dev_get_drvdata(dev); \
361 return show_cache_disable(this_leaf, buf, slot); \
428 static ssize_t store_cache_disable(struct cacheinfo *this_leaf, in store_cache_disable() argument
434 struct amd_northbridge *nb = this_leaf->priv; in store_cache_disable()
439 cpu = cpumask_first(&this_leaf->shared_cpu_map); in store_cache_disable()
460 struct cacheinfo *this_leaf = dev_get_drvdata(dev); \
461 return store_cache_disable(this_leaf, buf, count, slot); \
469 struct cacheinfo *this_leaf = dev_get_drvdata(dev); in subcaches_show() local
470 int cpu = cpumask_first(&this_leaf->shared_cpu_map); in subcaches_show()
479 struct cacheinfo *this_leaf = dev_get_drvdata(dev); in subcaches_store() local
480 int cpu = cpumask_first(&this_leaf->shared_cpu_map); in subcaches_store()
504 struct cacheinfo *this_leaf = dev_get_drvdata(dev); in cache_private_attrs_is_visible() local
507 if (!this_leaf->priv) in cache_private_attrs_is_visible()
555 cache_get_priv_group(struct cacheinfo *this_leaf) in cache_get_priv_group() argument
557 struct amd_northbridge *nb = this_leaf->priv; in cache_get_priv_group()
559 if (this_leaf->level < 3 || !nb) in cache_get_priv_group()
568 static void amd_init_l3_cache(struct _cpuid4_info_regs *this_leaf, int index) in amd_init_l3_cache() argument
577 this_leaf->nb = node_to_amd_nb(node); in amd_init_l3_cache()
578 if (this_leaf->nb && !this_leaf->nb->l3_cache.indices) in amd_init_l3_cache()
579 amd_calc_l3_indices(this_leaf->nb); in amd_init_l3_cache()
586 cpuid4_cache_lookup_regs(int index, struct _cpuid4_info_regs *this_leaf) in cpuid4_cache_lookup_regs() argument
599 amd_init_l3_cache(this_leaf, index); in cpuid4_cache_lookup_regs()
607 this_leaf->eax = eax; in cpuid4_cache_lookup_regs()
608 this_leaf->ebx = ebx; in cpuid4_cache_lookup_regs()
609 this_leaf->ecx = ecx; in cpuid4_cache_lookup_regs()
610 this_leaf->size = (ecx.split.number_of_sets + 1) * in cpuid4_cache_lookup_regs()
675 struct _cpuid4_info_regs this_leaf = {}; in init_intel_cacheinfo() local
678 retval = cpuid4_cache_lookup_regs(i, &this_leaf); in init_intel_cacheinfo()
682 switch (this_leaf.eax.split.level) { in init_intel_cacheinfo()
684 if (this_leaf.eax.split.type == CTYPE_DATA) in init_intel_cacheinfo()
685 new_l1d = this_leaf.size/1024; in init_intel_cacheinfo()
686 else if (this_leaf.eax.split.type == CTYPE_INST) in init_intel_cacheinfo()
687 new_l1i = this_leaf.size/1024; in init_intel_cacheinfo()
690 new_l2 = this_leaf.size/1024; in init_intel_cacheinfo()
691 num_threads_sharing = 1 + this_leaf.eax.split.num_threads_sharing; in init_intel_cacheinfo()
696 new_l3 = this_leaf.size/1024; in init_intel_cacheinfo()
697 num_threads_sharing = 1 + this_leaf.eax.split.num_threads_sharing; in init_intel_cacheinfo()
809 struct cacheinfo *this_leaf; in __cache_amd_cpumap_setup() local
815 this_leaf = this_cpu_ci->info_list + index; in __cache_amd_cpumap_setup()
830 this_leaf = this_cpu_ci->info_list + index; in __cache_amd_cpumap_setup()
837 &this_leaf->shared_cpu_map); in __cache_amd_cpumap_setup()
845 this_leaf = this_cpu_ci->info_list + index; in __cache_amd_cpumap_setup()
850 &this_leaf->shared_cpu_map); in __cache_amd_cpumap_setup()
863 struct cacheinfo *this_leaf, *sibling_leaf; in __cache_cpumap_setup() local
873 this_leaf = this_cpu_ci->info_list + index; in __cache_cpumap_setup()
876 cpumask_set_cpu(cpu, &this_leaf->shared_cpu_map); in __cache_cpumap_setup()
889 cpumask_set_cpu(i, &this_leaf->shared_cpu_map); in __cache_cpumap_setup()
894 static void ci_leaf_init(struct cacheinfo *this_leaf, in ci_leaf_init() argument
897 this_leaf->level = base->eax.split.level; in ci_leaf_init()
898 this_leaf->type = cache_type_map[base->eax.split.type]; in ci_leaf_init()
899 this_leaf->coherency_line_size = in ci_leaf_init()
901 this_leaf->ways_of_associativity = in ci_leaf_init()
903 this_leaf->size = base->size; in ci_leaf_init()
904 this_leaf->number_of_sets = base->ecx.split.number_of_sets + 1; in ci_leaf_init()
905 this_leaf->physical_line_partition = in ci_leaf_init()
907 this_leaf->priv = base->nb; in ci_leaf_init()
927 struct cacheinfo *this_leaf = this_cpu_ci->info_list; in __populate_cache_leaves() local
934 ci_leaf_init(this_leaf++, &id4_regs); in __populate_cache_leaves()