Lines Matching refs:this_leaf
364 static ssize_t show_cache_disable(struct cacheinfo *this_leaf, char *buf, in show_cache_disable() argument
368 struct amd_northbridge *nb = this_leaf->priv; in show_cache_disable()
382 struct cacheinfo *this_leaf = dev_get_drvdata(dev); \
383 return show_cache_disable(this_leaf, buf, slot); \
450 static ssize_t store_cache_disable(struct cacheinfo *this_leaf, in store_cache_disable() argument
456 struct amd_northbridge *nb = this_leaf->priv; in store_cache_disable()
461 cpu = cpumask_first(&this_leaf->shared_cpu_map); in store_cache_disable()
482 struct cacheinfo *this_leaf = dev_get_drvdata(dev); \
483 return store_cache_disable(this_leaf, buf, count, slot); \
491 struct cacheinfo *this_leaf = dev_get_drvdata(dev); in subcaches_show() local
492 int cpu = cpumask_first(&this_leaf->shared_cpu_map); in subcaches_show()
501 struct cacheinfo *this_leaf = dev_get_drvdata(dev); in subcaches_store() local
502 int cpu = cpumask_first(&this_leaf->shared_cpu_map); in subcaches_store()
526 struct cacheinfo *this_leaf = dev_get_drvdata(dev); in cache_private_attrs_is_visible() local
529 if (!this_leaf->priv) in cache_private_attrs_is_visible()
577 cache_get_priv_group(struct cacheinfo *this_leaf) in cache_get_priv_group() argument
579 struct amd_northbridge *nb = this_leaf->priv; in cache_get_priv_group()
581 if (this_leaf->level < 3 || !nb) in cache_get_priv_group()
590 static void amd_init_l3_cache(struct _cpuid4_info_regs *this_leaf, int index) in amd_init_l3_cache() argument
599 this_leaf->nb = node_to_amd_nb(node); in amd_init_l3_cache()
600 if (this_leaf->nb && !this_leaf->nb->l3_cache.indices) in amd_init_l3_cache()
601 amd_calc_l3_indices(this_leaf->nb); in amd_init_l3_cache()
608 cpuid4_cache_lookup_regs(int index, struct _cpuid4_info_regs *this_leaf) in cpuid4_cache_lookup_regs() argument
621 amd_init_l3_cache(this_leaf, index); in cpuid4_cache_lookup_regs()
625 amd_init_l3_cache(this_leaf, index); in cpuid4_cache_lookup_regs()
633 this_leaf->eax = eax; in cpuid4_cache_lookup_regs()
634 this_leaf->ebx = ebx; in cpuid4_cache_lookup_regs()
635 this_leaf->ecx = ecx; in cpuid4_cache_lookup_regs()
636 this_leaf->size = (ecx.split.number_of_sets + 1) * in cpuid4_cache_lookup_regs()
758 struct _cpuid4_info_regs this_leaf = {}; in init_intel_cacheinfo() local
761 retval = cpuid4_cache_lookup_regs(i, &this_leaf); in init_intel_cacheinfo()
765 switch (this_leaf.eax.split.level) { in init_intel_cacheinfo()
767 if (this_leaf.eax.split.type == CTYPE_DATA) in init_intel_cacheinfo()
768 new_l1d = this_leaf.size/1024; in init_intel_cacheinfo()
769 else if (this_leaf.eax.split.type == CTYPE_INST) in init_intel_cacheinfo()
770 new_l1i = this_leaf.size/1024; in init_intel_cacheinfo()
773 new_l2 = this_leaf.size/1024; in init_intel_cacheinfo()
774 num_threads_sharing = 1 + this_leaf.eax.split.num_threads_sharing; in init_intel_cacheinfo()
779 new_l3 = this_leaf.size/1024; in init_intel_cacheinfo()
780 num_threads_sharing = 1 + this_leaf.eax.split.num_threads_sharing; in init_intel_cacheinfo()
885 struct cacheinfo *this_leaf; in __cache_amd_cpumap_setup() local
897 this_leaf = this_cpu_ci->info_list + index; in __cache_amd_cpumap_setup()
902 &this_leaf->shared_cpu_map); in __cache_amd_cpumap_setup()
922 this_leaf = this_cpu_ci->info_list + index; in __cache_amd_cpumap_setup()
929 &this_leaf->shared_cpu_map); in __cache_amd_cpumap_setup()
942 struct cacheinfo *this_leaf, *sibling_leaf; in __cache_cpumap_setup() local
953 this_leaf = this_cpu_ci->info_list + index; in __cache_cpumap_setup()
956 cpumask_set_cpu(cpu, &this_leaf->shared_cpu_map); in __cache_cpumap_setup()
969 cpumask_set_cpu(i, &this_leaf->shared_cpu_map); in __cache_cpumap_setup()
974 static void ci_leaf_init(struct cacheinfo *this_leaf, in ci_leaf_init() argument
977 this_leaf->id = base->id; in ci_leaf_init()
978 this_leaf->attributes = CACHE_ID; in ci_leaf_init()
979 this_leaf->level = base->eax.split.level; in ci_leaf_init()
980 this_leaf->type = cache_type_map[base->eax.split.type]; in ci_leaf_init()
981 this_leaf->coherency_line_size = in ci_leaf_init()
983 this_leaf->ways_of_associativity = in ci_leaf_init()
985 this_leaf->size = base->size; in ci_leaf_init()
986 this_leaf->number_of_sets = base->ecx.split.number_of_sets + 1; in ci_leaf_init()
987 this_leaf->physical_line_partition = in ci_leaf_init()
989 this_leaf->priv = base->nb; in ci_leaf_init()
1025 struct cacheinfo *this_leaf = this_cpu_ci->info_list; in populate_cache_leaves() local
1033 ci_leaf_init(this_leaf++, &id4_regs); in populate_cache_leaves()