Lines Matching refs:props
196 struct kfd_mem_properties *props; in find_subtype_mem() local
198 list_for_each_entry(props, &dev->mem_props, list) { in find_subtype_mem()
199 if (props->heap_type == heap_type in find_subtype_mem()
200 && props->flags == flags in find_subtype_mem()
201 && props->width == width) in find_subtype_mem()
202 return props; in find_subtype_mem()
213 struct kfd_mem_properties *props; in kfd_parse_subtype_mem() local
251 props = find_subtype_mem(heap_type, flags, width, dev); in kfd_parse_subtype_mem()
252 if (props) { in kfd_parse_subtype_mem()
253 props->size_in_bytes += size_in_bytes; in kfd_parse_subtype_mem()
257 props = kfd_alloc_struct(props); in kfd_parse_subtype_mem()
258 if (!props) in kfd_parse_subtype_mem()
261 props->heap_type = heap_type; in kfd_parse_subtype_mem()
262 props->flags = flags; in kfd_parse_subtype_mem()
263 props->size_in_bytes = size_in_bytes; in kfd_parse_subtype_mem()
264 props->width = width; in kfd_parse_subtype_mem()
267 list_add_tail(&props->list, &dev->mem_props); in kfd_parse_subtype_mem()
282 struct kfd_cache_properties *props; in kfd_parse_subtype_cache() local
308 props = kfd_alloc_struct(props); in kfd_parse_subtype_cache()
309 if (!props) in kfd_parse_subtype_cache()
312 props->processor_id_low = id; in kfd_parse_subtype_cache()
313 props->cache_level = cache->cache_level; in kfd_parse_subtype_cache()
314 props->cache_size = cache->cache_size; in kfd_parse_subtype_cache()
315 props->cacheline_size = cache->cache_line_size; in kfd_parse_subtype_cache()
316 props->cachelines_per_tag = cache->lines_per_tag; in kfd_parse_subtype_cache()
317 props->cache_assoc = cache->associativity; in kfd_parse_subtype_cache()
318 props->cache_latency = cache->cache_latency; in kfd_parse_subtype_cache()
319 memcpy(props->sibling_map, cache->sibling_map, in kfd_parse_subtype_cache()
320 sizeof(props->sibling_map)); in kfd_parse_subtype_cache()
323 props->cache_type |= HSA_CACHE_TYPE_DATA; in kfd_parse_subtype_cache()
325 props->cache_type |= HSA_CACHE_TYPE_INSTRUCTION; in kfd_parse_subtype_cache()
327 props->cache_type |= HSA_CACHE_TYPE_CPU; in kfd_parse_subtype_cache()
329 props->cache_type |= HSA_CACHE_TYPE_HSACU; in kfd_parse_subtype_cache()
333 list_add_tail(&props->list, &dev->cache_props); in kfd_parse_subtype_cache()
348 struct kfd_iolink_properties *props = NULL, *props2; in kfd_parse_subtype_iolink() local
360 props = kfd_alloc_struct(props); in kfd_parse_subtype_iolink()
361 if (!props) in kfd_parse_subtype_iolink()
364 props->node_from = id_from; in kfd_parse_subtype_iolink()
365 props->node_to = id_to; in kfd_parse_subtype_iolink()
366 props->ver_maj = iolink->version_major; in kfd_parse_subtype_iolink()
367 props->ver_min = iolink->version_minor; in kfd_parse_subtype_iolink()
368 props->iolink_type = iolink->io_interface_type; in kfd_parse_subtype_iolink()
370 if (props->iolink_type == CRAT_IOLINK_TYPE_PCIEXPRESS) in kfd_parse_subtype_iolink()
371 props->weight = 20; in kfd_parse_subtype_iolink()
373 props->weight = node_distance(id_from, id_to); in kfd_parse_subtype_iolink()
375 props->min_latency = iolink->minimum_latency; in kfd_parse_subtype_iolink()
376 props->max_latency = iolink->maximum_latency; in kfd_parse_subtype_iolink()
377 props->min_bandwidth = iolink->minimum_bandwidth_mbs; in kfd_parse_subtype_iolink()
378 props->max_bandwidth = iolink->maximum_bandwidth_mbs; in kfd_parse_subtype_iolink()
379 props->rec_transfer_size = in kfd_parse_subtype_iolink()
384 list_add_tail(&props->list, &dev->io_link_props); in kfd_parse_subtype_iolink()
394 if (props && props->iolink_type == CRAT_IOLINK_TYPE_PCIEXPRESS) { in kfd_parse_subtype_iolink()
399 props2 = kmemdup(props, sizeof(*props2), GFP_KERNEL); in kfd_parse_subtype_iolink()