diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2015-02-11 08:50:10 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2015-02-12 03:37:24 -0500 |
commit | 4fd4f1c79935a002b20e6e1b65fa37f46ac61dbe (patch) | |
tree | 90997ed930042178773700329e1f270cfc3436a5 /arch/s390 | |
parent | 2f859d0dad818765117c1cecb24b3bc7f4592074 (diff) |
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: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/kernel/cache.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/arch/s390/kernel/cache.c b/arch/s390/kernel/cache.c index 632fa06ea162..f06a2a509ad2 100644 --- a/arch/s390/kernel/cache.c +++ b/arch/s390/kernel/cache.c | |||
@@ -111,10 +111,9 @@ static inline unsigned long ecag(int ai, int li, int ti) | |||
111 | } | 111 | } |
112 | 112 | ||
113 | static void ci_leaf_init(struct cacheinfo *this_leaf, int private, | 113 | static void ci_leaf_init(struct cacheinfo *this_leaf, int private, |
114 | enum cache_type type, unsigned int level) | 114 | enum cache_type type, unsigned int level, int cpu) |
115 | { | 115 | { |
116 | int ti, num_sets; | 116 | int ti, num_sets; |
117 | int cpu = smp_processor_id(); | ||
118 | 117 | ||
119 | if (type == CACHE_TYPE_INST) | 118 | if (type == CACHE_TYPE_INST) |
120 | ti = CACHE_TI_INSTRUCTION; | 119 | ti = CACHE_TI_INSTRUCTION; |
@@ -178,10 +177,10 @@ int populate_cache_leaves(unsigned int cpu) | |||
178 | pvt = (ct.ci[level].scope == CACHE_SCOPE_PRIVATE) ? 1 : 0; | 177 | pvt = (ct.ci[level].scope == CACHE_SCOPE_PRIVATE) ? 1 : 0; |
179 | ctype = get_cache_type(&ct.ci[0], level); | 178 | ctype = get_cache_type(&ct.ci[0], level); |
180 | if (ctype == CACHE_TYPE_SEPARATE) { | 179 | if (ctype == CACHE_TYPE_SEPARATE) { |
181 | ci_leaf_init(this_leaf++, pvt, CACHE_TYPE_DATA, level); | 180 | ci_leaf_init(this_leaf++, pvt, CACHE_TYPE_DATA, level, cpu); |
182 | ci_leaf_init(this_leaf++, pvt, CACHE_TYPE_INST, level); | 181 | ci_leaf_init(this_leaf++, pvt, CACHE_TYPE_INST, level, cpu); |
183 | } else { | 182 | } else { |
184 | ci_leaf_init(this_leaf++, pvt, ctype, level); | 183 | ci_leaf_init(this_leaf++, pvt, ctype, level, cpu); |
185 | } | 184 | } |
186 | } | 185 | } |
187 | return 0; | 186 | return 0; |