Lines Matching refs:level
122 int level; /* level not explicit in device tree */ member
145 static void cache_init(struct cache *cache, int type, int level, in cache_init() argument
149 cache->level = level; in cache_init()
156 static struct cache *new_cache(int type, int level, in new_cache() argument
163 cache_init(cache, type, level, ofnode, group_id); in new_cache()
186 pr_debug("freeing L%d %s cache for %pOFP\n", cache->level, in release_cache()
363 int level) in cache_do_one_devnode_unified() argument
365 pr_debug("creating L%d ucache for %pOFP\n", level, node); in cache_do_one_devnode_unified()
367 return new_cache(cache_is_unified_d(node), level, node, group_id); in cache_do_one_devnode_unified()
371 int level) in cache_do_one_devnode_split() argument
375 pr_debug("creating L%d dcache and icache for %pOFP\n", level, in cache_do_one_devnode_split()
378 dcache = new_cache(CACHE_TYPE_DATA, level, node, group_id); in cache_do_one_devnode_split()
379 icache = new_cache(CACHE_TYPE_INSTRUCTION, level, node, group_id); in cache_do_one_devnode_split()
393 static struct cache *cache_do_one_devnode(struct device_node *node, int group_id, int level) in cache_do_one_devnode() argument
398 cache = cache_do_one_devnode_unified(node, group_id, level); in cache_do_one_devnode()
400 cache = cache_do_one_devnode_split(node, group_id, level); in cache_do_one_devnode()
407 int level) in cache_lookup_or_instantiate() argument
413 WARN_ONCE(cache && cache->level != level, in cache_lookup_or_instantiate()
415 cache->level, level); in cache_lookup_or_instantiate()
418 cache = cache_do_one_devnode(node, group_id, level); in cache_lookup_or_instantiate()
437 WARN_ONCE((smaller->level == 1 && bigger->level > 2) || in link_cache_lists()
438 (smaller->level > 1 && bigger->level != smaller->level + 1), in link_cache_lists()
440 smaller->level, smaller->ofnode, bigger->level, bigger->ofnode); in link_cache_lists()
445 WARN_ONCE(cache->level != 1, in do_subsidiary_caches_debugcheck()
447 "%pOFP instead of an L1\n", cache->level, in do_subsidiary_caches_debugcheck()
464 static int get_group_id(unsigned int cpu_id, int level) in get_group_id() argument
466 if (has_big_cores && level == 1) in get_group_id()
469 else if (thread_group_shares_l2 && level == 2) in get_group_id()
472 else if (thread_group_shares_l3 && level == 3) in get_group_id()
481 int level = cache->level; in do_subsidiary_caches() local
489 level++; in do_subsidiary_caches()
490 group_id = get_group_id(cpu_id, level); in do_subsidiary_caches()
491 subcache = cache_lookup_or_instantiate(subcache_node, group_id, level); in do_subsidiary_caches()
567 index->cache->level, cache_type_string(index->cache)); in cache_index_release()
675 return sprintf(buf, "%d\n", cache->level); in level_show()
679 __ATTR(level, 0444, level_show, NULL);