Lines Matching refs:this_leaf

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
477 int cpu = cpumask_first(&this_leaf->shared_cpu_map); in subcaches_show()
486 struct cacheinfo *this_leaf = dev_get_drvdata(dev); in subcaches_store() local
487 int cpu = cpumask_first(&this_leaf->shared_cpu_map); in subcaches_store()
511 struct cacheinfo *this_leaf = dev_get_drvdata(dev); in cache_private_attrs_is_visible() local
514 if (!this_leaf->priv) in cache_private_attrs_is_visible()
562 cache_get_priv_group(struct cacheinfo *this_leaf) in cache_get_priv_group() argument
564 struct amd_northbridge *nb = this_leaf->priv; in cache_get_priv_group()
566 if (this_leaf->level < 3 || !nb) in cache_get_priv_group()
575 static void amd_init_l3_cache(struct _cpuid4_info_regs *this_leaf, int index) in amd_init_l3_cache() argument
584 this_leaf->nb = node_to_amd_nb(node); in amd_init_l3_cache()
585 if (this_leaf->nb && !this_leaf->nb->l3_cache.indices) in amd_init_l3_cache()
586 amd_calc_l3_indices(this_leaf->nb); in amd_init_l3_cache()
593 cpuid4_cache_lookup_regs(int index, struct _cpuid4_info_regs *this_leaf) in cpuid4_cache_lookup_regs() argument
606 amd_init_l3_cache(this_leaf, index); in cpuid4_cache_lookup_regs()
610 amd_init_l3_cache(this_leaf, index); in cpuid4_cache_lookup_regs()
618 this_leaf->eax = eax; in cpuid4_cache_lookup_regs()
619 this_leaf->ebx = ebx; in cpuid4_cache_lookup_regs()
620 this_leaf->ecx = ecx; in cpuid4_cache_lookup_regs()
621 this_leaf->size = (ecx.split.number_of_sets + 1) * in cpuid4_cache_lookup_regs()
746 struct _cpuid4_info_regs this_leaf = {}; in init_intel_cacheinfo() local
749 retval = cpuid4_cache_lookup_regs(i, &this_leaf); in init_intel_cacheinfo()
753 switch (this_leaf.eax.split.level) { in init_intel_cacheinfo()
755 if (this_leaf.eax.split.type == CTYPE_DATA) in init_intel_cacheinfo()
756 new_l1d = this_leaf.size/1024; in init_intel_cacheinfo()
757 else if (this_leaf.eax.split.type == CTYPE_INST) in init_intel_cacheinfo()
758 new_l1i = this_leaf.size/1024; in init_intel_cacheinfo()
761 new_l2 = this_leaf.size/1024; in init_intel_cacheinfo()
762 num_threads_sharing = 1 + this_leaf.eax.split.num_threads_sharing; in init_intel_cacheinfo()
767 new_l3 = this_leaf.size/1024; in init_intel_cacheinfo()
768 num_threads_sharing = 1 + this_leaf.eax.split.num_threads_sharing; in init_intel_cacheinfo()
882 struct cacheinfo *this_leaf; in __cache_amd_cpumap_setup() local
894 this_leaf = this_cpu_ci->info_list + index; in __cache_amd_cpumap_setup()
899 &this_leaf->shared_cpu_map); in __cache_amd_cpumap_setup()
919 this_leaf = this_cpu_ci->info_list + index; in __cache_amd_cpumap_setup()
926 &this_leaf->shared_cpu_map); in __cache_amd_cpumap_setup()
939 struct cacheinfo *this_leaf, *sibling_leaf; in __cache_cpumap_setup() local
950 this_leaf = this_cpu_ci->info_list + index; in __cache_cpumap_setup()
953 cpumask_set_cpu(cpu, &this_leaf->shared_cpu_map); in __cache_cpumap_setup()
966 cpumask_set_cpu(i, &this_leaf->shared_cpu_map); in __cache_cpumap_setup()
971 static void ci_leaf_init(struct cacheinfo *this_leaf, in ci_leaf_init() argument
974 this_leaf->id = base->id; in ci_leaf_init()
975 this_leaf->attributes = CACHE_ID; in ci_leaf_init()
976 this_leaf->level = base->eax.split.level; in ci_leaf_init()
977 this_leaf->type = cache_type_map[base->eax.split.type]; in ci_leaf_init()
978 this_leaf->coherency_line_size = in ci_leaf_init()
980 this_leaf->ways_of_associativity = in ci_leaf_init()
982 this_leaf->size = base->size; in ci_leaf_init()
983 this_leaf->number_of_sets = base->ecx.split.number_of_sets + 1; in ci_leaf_init()
984 this_leaf->physical_line_partition = in ci_leaf_init()
986 this_leaf->priv = base->nb; in ci_leaf_init()
1022 struct cacheinfo *this_leaf = this_cpu_ci->info_list; in populate_cache_leaves() local
1030 ci_leaf_init(this_leaf++, &id4_regs); in populate_cache_leaves()