Commit 4fd4f1c7 authored by Heiko Carstens's avatar Heiko Carstens Committed by Martin Schwidefsky

s390/cacheinfo: fix shared cpu masks

When testing Sudeep Holla's cache info rework I didn't realize that the
shared cpu masks are broken (all have the same cpu set).
Let's fix this.
Signed-off-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 2f859d0d
...@@ -111,10 +111,9 @@ static inline unsigned long ecag(int ai, int li, int ti) ...@@ -111,10 +111,9 @@ static inline unsigned long ecag(int ai, int li, int ti)
} }
static void ci_leaf_init(struct cacheinfo *this_leaf, int private, static void ci_leaf_init(struct cacheinfo *this_leaf, int private,
enum cache_type type, unsigned int level) enum cache_type type, unsigned int level, int cpu)
{ {
int ti, num_sets; int ti, num_sets;
int cpu = smp_processor_id();
if (type == CACHE_TYPE_INST) if (type == CACHE_TYPE_INST)
ti = CACHE_TI_INSTRUCTION; ti = CACHE_TI_INSTRUCTION;
...@@ -178,10 +177,10 @@ int populate_cache_leaves(unsigned int cpu) ...@@ -178,10 +177,10 @@ int populate_cache_leaves(unsigned int cpu)
pvt = (ct.ci[level].scope == CACHE_SCOPE_PRIVATE) ? 1 : 0; pvt = (ct.ci[level].scope == CACHE_SCOPE_PRIVATE) ? 1 : 0;
ctype = get_cache_type(&ct.ci[0], level); ctype = get_cache_type(&ct.ci[0], level);
if (ctype == CACHE_TYPE_SEPARATE) { if (ctype == CACHE_TYPE_SEPARATE) {
ci_leaf_init(this_leaf++, pvt, CACHE_TYPE_DATA, level); ci_leaf_init(this_leaf++, pvt, CACHE_TYPE_DATA, level, cpu);
ci_leaf_init(this_leaf++, pvt, CACHE_TYPE_INST, level); ci_leaf_init(this_leaf++, pvt, CACHE_TYPE_INST, level, cpu);
} else { } else {
ci_leaf_init(this_leaf++, pvt, ctype, level); ci_leaf_init(this_leaf++, pvt, ctype, level, cpu);
} }
} }
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment