// SPDX-License-Identifier: GPL-2.0 // Copyright (C) 2005-2017 Andes Technology Corporation #include <linux/bitops.h> #include <linux/cacheinfo.h> #include <linux/cpu.h>
static void ci_leaf_init(struct cacheinfo *this_leaf, enum cache_type type, unsigned int level) { char cache_type = (type & CACHE_TYPE_INST ? ICACHE : DCACHE); this_leaf->level = level; this_leaf->type = type; this_leaf->coherency_line_size = CACHE_LINE_SIZE(cache_type); this_leaf->number_of_sets = CACHE_SET(cache_type);; this_leaf->ways_of_associativity = CACHE_WAY(cache_type); this_leaf->size = this_leaf->number_of_sets * this_leaf->coherency_line_size * this_leaf->ways_of_associativity; #if defined(CONFIG_CPU_DCACHE_WRITETHROUGH) this_leaf->attributes = CACHE_WRITE_THROUGH; #else this_leaf->attributes = CACHE_WRITE_BACK; #endif }Contributors
Person | Tokens | Prop | Commits | CommitProp |
Greentime Hu | 110 | 100.00% | 1 | 100.00% |
Total | 110 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Greentime Hu | 35 | 100.00% | 1 | 100.00% |
Total | 35 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Greentime Hu | 87 | 100.00% | 1 | 100.00% |
Total | 87 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Greentime Hu | 243 | 100.00% | 1 | 100.00% |
Total | 243 | 100.00% | 1 | 100.00% |