Lines Matching refs:cache

220 static int kfd_parse_subtype_cache(struct crat_subtype_cache *cache)  in kfd_parse_subtype_cache()  argument
226 BUG_ON(!cache); in kfd_parse_subtype_cache()
228 id = cache->processor_id_low; in kfd_parse_subtype_cache()
239 props->cache_level = cache->cache_level; in kfd_parse_subtype_cache()
240 props->cache_size = cache->cache_size; in kfd_parse_subtype_cache()
241 props->cacheline_size = cache->cache_line_size; in kfd_parse_subtype_cache()
242 props->cachelines_per_tag = cache->lines_per_tag; in kfd_parse_subtype_cache()
243 props->cache_assoc = cache->associativity; in kfd_parse_subtype_cache()
244 props->cache_latency = cache->cache_latency; in kfd_parse_subtype_cache()
246 if (cache->flags & CRAT_CACHE_FLAGS_DATA_CACHE) in kfd_parse_subtype_cache()
248 if (cache->flags & CRAT_CACHE_FLAGS_INST_CACHE) in kfd_parse_subtype_cache()
250 if (cache->flags & CRAT_CACHE_FLAGS_CPU_CACHE) in kfd_parse_subtype_cache()
252 if (cache->flags & CRAT_CACHE_FLAGS_SIMD_CACHE) in kfd_parse_subtype_cache()
322 struct crat_subtype_cache *cache; in kfd_parse_subtype() local
338 cache = (struct crat_subtype_cache *)sub_type_hdr; in kfd_parse_subtype()
339 ret = kfd_parse_subtype_cache(cache); in kfd_parse_subtype()
368 struct kfd_cache_properties *cache; in kfd_release_topology_device() local
383 cache = container_of(dev->cache_props.next, in kfd_release_topology_device()
385 list_del(&cache->list); in kfd_release_topology_device()
386 kfree(cache); in kfd_release_topology_device()
597 struct kfd_cache_properties *cache; in kfd_cache_show() local
602 cache = container_of(attr, struct kfd_cache_properties, attr); in kfd_cache_show()
604 cache->processor_id_low); in kfd_cache_show()
605 sysfs_show_32bit_prop(buffer, "level", cache->cache_level); in kfd_cache_show()
606 sysfs_show_32bit_prop(buffer, "size", cache->cache_size); in kfd_cache_show()
607 sysfs_show_32bit_prop(buffer, "cache_line_size", cache->cacheline_size); in kfd_cache_show()
609 cache->cachelines_per_tag); in kfd_cache_show()
610 sysfs_show_32bit_prop(buffer, "association", cache->cache_assoc); in kfd_cache_show()
611 sysfs_show_32bit_prop(buffer, "latency", cache->cache_latency); in kfd_cache_show()
612 sysfs_show_32bit_prop(buffer, "type", cache->cache_type); in kfd_cache_show()
616 buffer, cache->sibling_map[i], in kfd_cache_show()
763 struct kfd_cache_properties *cache; in kfd_remove_sysfs_node_entry() local
781 list_for_each_entry(cache, &dev->cache_props, list) in kfd_remove_sysfs_node_entry()
782 if (cache->kobj) { in kfd_remove_sysfs_node_entry()
783 kfd_remove_sysfs_file(cache->kobj, in kfd_remove_sysfs_node_entry()
784 &cache->attr); in kfd_remove_sysfs_node_entry()
785 cache->kobj = NULL; in kfd_remove_sysfs_node_entry()
817 struct kfd_cache_properties *cache; in kfd_build_sysfs_node_entry() local
891 list_for_each_entry(cache, &dev->cache_props, list) { in kfd_build_sysfs_node_entry()
892 cache->kobj = kzalloc(sizeof(struct kobject), GFP_KERNEL); in kfd_build_sysfs_node_entry()
893 if (!cache->kobj) in kfd_build_sysfs_node_entry()
895 ret = kobject_init_and_add(cache->kobj, &cache_type, in kfd_build_sysfs_node_entry()
900 cache->attr.name = "properties"; in kfd_build_sysfs_node_entry()
901 cache->attr.mode = KFD_SYSFS_FILE_MODE; in kfd_build_sysfs_node_entry()
902 sysfs_attr_init(&cache->attr); in kfd_build_sysfs_node_entry()
903 ret = sysfs_create_file(cache->kobj, &cache->attr); in kfd_build_sysfs_node_entry()