Lines Matching refs:props

202 	struct kfd_mem_properties *props;  in find_subtype_mem()  local
204 list_for_each_entry(props, &dev->mem_props, list) { in find_subtype_mem()
205 if (props->heap_type == heap_type in find_subtype_mem()
206 && props->flags == flags in find_subtype_mem()
207 && props->width == width) in find_subtype_mem()
208 return props; in find_subtype_mem()
219 struct kfd_mem_properties *props; in kfd_parse_subtype_mem() local
257 props = find_subtype_mem(heap_type, flags, width, dev); in kfd_parse_subtype_mem()
258 if (props) { in kfd_parse_subtype_mem()
259 props->size_in_bytes += size_in_bytes; in kfd_parse_subtype_mem()
263 props = kfd_alloc_struct(props); in kfd_parse_subtype_mem()
264 if (!props) in kfd_parse_subtype_mem()
267 props->heap_type = heap_type; in kfd_parse_subtype_mem()
268 props->flags = flags; in kfd_parse_subtype_mem()
269 props->size_in_bytes = size_in_bytes; in kfd_parse_subtype_mem()
270 props->width = width; in kfd_parse_subtype_mem()
273 list_add_tail(&props->list, &dev->mem_props); in kfd_parse_subtype_mem()
288 struct kfd_cache_properties *props; in kfd_parse_subtype_cache() local
314 props = kfd_alloc_struct(props); in kfd_parse_subtype_cache()
315 if (!props) in kfd_parse_subtype_cache()
318 props->processor_id_low = id; in kfd_parse_subtype_cache()
319 props->cache_level = cache->cache_level; in kfd_parse_subtype_cache()
320 props->cache_size = cache->cache_size; in kfd_parse_subtype_cache()
321 props->cacheline_size = cache->cache_line_size; in kfd_parse_subtype_cache()
322 props->cachelines_per_tag = cache->lines_per_tag; in kfd_parse_subtype_cache()
323 props->cache_assoc = cache->associativity; in kfd_parse_subtype_cache()
324 props->cache_latency = cache->cache_latency; in kfd_parse_subtype_cache()
325 memcpy(props->sibling_map, cache->sibling_map, in kfd_parse_subtype_cache()
326 sizeof(props->sibling_map)); in kfd_parse_subtype_cache()
329 props->cache_type |= HSA_CACHE_TYPE_DATA; in kfd_parse_subtype_cache()
331 props->cache_type |= HSA_CACHE_TYPE_INSTRUCTION; in kfd_parse_subtype_cache()
333 props->cache_type |= HSA_CACHE_TYPE_CPU; in kfd_parse_subtype_cache()
335 props->cache_type |= HSA_CACHE_TYPE_HSACU; in kfd_parse_subtype_cache()
339 list_add_tail(&props->list, &dev->cache_props); in kfd_parse_subtype_cache()
354 struct kfd_iolink_properties *props = NULL, *props2; in kfd_parse_subtype_iolink() local
366 props = kfd_alloc_struct(props); in kfd_parse_subtype_iolink()
367 if (!props) in kfd_parse_subtype_iolink()
370 props->node_from = id_from; in kfd_parse_subtype_iolink()
371 props->node_to = id_to; in kfd_parse_subtype_iolink()
372 props->ver_maj = iolink->version_major; in kfd_parse_subtype_iolink()
373 props->ver_min = iolink->version_minor; in kfd_parse_subtype_iolink()
374 props->iolink_type = iolink->io_interface_type; in kfd_parse_subtype_iolink()
376 if (props->iolink_type == CRAT_IOLINK_TYPE_PCIEXPRESS) in kfd_parse_subtype_iolink()
377 props->weight = 20; in kfd_parse_subtype_iolink()
378 else if (props->iolink_type == CRAT_IOLINK_TYPE_XGMI) in kfd_parse_subtype_iolink()
379 props->weight = 15 * iolink->num_hops_xgmi; in kfd_parse_subtype_iolink()
381 props->weight = node_distance(id_from, id_to); in kfd_parse_subtype_iolink()
383 props->min_latency = iolink->minimum_latency; in kfd_parse_subtype_iolink()
384 props->max_latency = iolink->maximum_latency; in kfd_parse_subtype_iolink()
385 props->min_bandwidth = iolink->minimum_bandwidth_mbs; in kfd_parse_subtype_iolink()
386 props->max_bandwidth = iolink->maximum_bandwidth_mbs; in kfd_parse_subtype_iolink()
387 props->rec_transfer_size = in kfd_parse_subtype_iolink()
392 list_add_tail(&props->list, &dev->io_link_props); in kfd_parse_subtype_iolink()
405 if (props && (iolink->flags & CRAT_IOLINK_FLAGS_BI_DIRECTIONAL)) { in kfd_parse_subtype_iolink()
410 props2 = kmemdup(props, sizeof(*props2), GFP_KERNEL); in kfd_parse_subtype_iolink()