Lines Matching full:level
13 #define MAX_CACHE_LEVEL 7 /* Max 7 level supported */
15 #define CLIDR_CTYPE_SHIFT(level) (3 * (level - 1)) argument
16 #define CLIDR_CTYPE_MASK(level) (7 << CLIDR_CTYPE_SHIFT(level)) argument
17 #define CLIDR_CTYPE(clidr, level) \ argument
18 (((clidr) & CLIDR_CTYPE_MASK(level)) >> CLIDR_CTYPE_SHIFT(level))
29 static inline enum cache_type get_cache_type(int level) in get_cache_type() argument
33 if (level > MAX_CACHE_LEVEL) in get_cache_type()
36 return CLIDR_CTYPE(clidr, level); in get_cache_type()
40 enum cache_type type, unsigned int level) in ci_leaf_init() argument
42 this_leaf->level = level; in ci_leaf_init()
48 unsigned int ctype, level, leaves; in init_cache_level() local
52 for (level = 1, leaves = 0; level <= MAX_CACHE_LEVEL; level++) { in init_cache_level()
53 ctype = get_cache_type(level); in init_cache_level()
55 level--; in init_cache_level()
70 if (level < fw_level) { in init_cache_level()
76 leaves += (fw_level - level); in init_cache_level()
77 level = fw_level; in init_cache_level()
80 this_cpu_ci->num_levels = level; in init_cache_level()
87 unsigned int level, idx; in populate_cache_leaves() local
92 for (idx = 0, level = 1; level <= this_cpu_ci->num_levels && in populate_cache_leaves()
93 idx < this_cpu_ci->num_leaves; idx++, level++) { in populate_cache_leaves()
94 type = get_cache_type(level); in populate_cache_leaves()
96 ci_leaf_init(this_leaf++, CACHE_TYPE_DATA, level); in populate_cache_leaves()
97 ci_leaf_init(this_leaf++, CACHE_TYPE_INST, level); in populate_cache_leaves()
99 ci_leaf_init(this_leaf++, type, level); in populate_cache_leaves()