Lines Matching refs:cdesc
48 struct cache_desc *cdesc = current_cpu_data.cache_leaves + leaf; in flush_cache_leaf() local
50 nr_nodes = cache_private(cdesc) ? 1 : loongson_sysconf.nr_nodes; in flush_cache_leaf()
53 for (i = 0; i < cdesc->sets; i++) { in flush_cache_leaf()
54 for (j = 0; j < cdesc->ways; j++) { in flush_cache_leaf()
59 addr -= cdesc->ways; in flush_cache_leaf()
60 addr += cdesc->linesz; in flush_cache_leaf()
69 struct cache_desc *cdesc = current_cpu_data.cache_leaves; in __flush_cache_all() local
73 if (cache_inclusive(cdesc + leaf)) { in __flush_cache_all()
94 #define populate_cache_properties(cfg0, cdesc, level, leaf) \ argument
100 cdesc->flags |= CACHE_PRIVATE; \
103 cdesc->flags |= CACHE_PRIVATE; \
105 cdesc->flags |= CACHE_INCLUSIVE; \
107 cdesc->level = level; \
108 cdesc->flags |= CACHE_PRESENT; \
109 cdesc->ways = ((cfg1 & CPUCFG_CACHE_WAYS_M) >> CPUCFG_CACHE_WAYS) + 1; \
110 cdesc->sets = 1 << ((cfg1 & CPUCFG_CACHE_SETS_M) >> CPUCFG_CACHE_SETS); \
111 cdesc->linesz = 1 << ((cfg1 & CPUCFG_CACHE_LSIZE_M) >> CPUCFG_CACHE_LSIZE); \
112 cdesc++; leaf++; \
119 struct cache_desc *cdesc = current_cpu_data.cache_leaves; in cpu_cache_init() local
123 cdesc->type = CACHE_TYPE_UNIFIED; in cpu_cache_init()
125 cdesc->type = CACHE_TYPE_INST; in cpu_cache_init()
126 populate_cache_properties(config, cdesc, level, leaf); in cpu_cache_init()
130 cdesc->type = CACHE_TYPE_DATA; in cpu_cache_init()
131 populate_cache_properties(config, cdesc, level, leaf); in cpu_cache_init()
141 cdesc->type = CACHE_TYPE_UNIFIED; in cpu_cache_init()
143 cdesc->type = CACHE_TYPE_INST; in cpu_cache_init()
144 populate_cache_properties(config, cdesc, level, leaf); in cpu_cache_init()
148 cdesc->type = CACHE_TYPE_DATA; in cpu_cache_init()
149 populate_cache_properties(config, cdesc, level, leaf); in cpu_cache_init()