aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/cache.c
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2016-04-14 06:35:22 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2016-06-13 09:58:17 -0400
commit097a116c7e9023267b61fb96b37fdcb2864a1ae3 (patch)
tree5460a080c9cdde15058cc426205f34d9d31f4ea7 /arch/s390/kernel/cache.c
parent219a21b3b08f5a801e45fada915c4b719076558d (diff)
s390/cpuinfo: show dynamic and static cpu mhz
Show the dynamic and static cpu mhz of each cpu. Since these values are per cpu this requires a fundamental extension of the format of /proc/cpuinfo. Historically we had only a single line per cpu and a summary at the top of the file. This format is hardly extendible if we want to add more per cpu information. Therefore this patch adds per cpu blocks at the end of /proc/cpuinfo: cpu : 0 cpu Mhz dynamic : 5504 cpu Mhz static : 5504 cpu : 1 cpu Mhz dynamic : 5504 cpu Mhz static : 5504 cpu : 2 cpu Mhz dynamic : 5504 cpu Mhz static : 5504 cpu : 3 cpu Mhz dynamic : 5504 cpu Mhz static : 5504 Right now each block contains only the dynamic and static cpu mhz, but it can be easily extended like on every other architecture. This extension is supposed to be compatible with the old format. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Acked-by: Sascha Silbe <silbe@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/cache.c')
-rw-r--r--arch/s390/kernel/cache.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/arch/s390/kernel/cache.c b/arch/s390/kernel/cache.c
index 77a84bd78be2..c8a83276a4dc 100644
--- a/arch/s390/kernel/cache.c
+++ b/arch/s390/kernel/cache.c
@@ -99,12 +99,7 @@ static inline enum cache_type get_cache_type(struct cache_info *ci, int level)
99 99
100static inline unsigned long ecag(int ai, int li, int ti) 100static inline unsigned long ecag(int ai, int li, int ti)
101{ 101{
102 unsigned long cmd, val; 102 return __ecag(ECAG_CACHE_ATTRIBUTE, ai << 4 | li << 1 | ti);
103
104 cmd = ai << 4 | li << 1 | ti;
105 asm volatile(".insn rsy,0xeb000000004c,%0,0,0(%1)" /* ecag */
106 : "=d" (val) : "a" (cmd));
107 return val;
108} 103}
109 104
110static void ci_leaf_init(struct cacheinfo *this_leaf, int private, 105static void ci_leaf_init(struct cacheinfo *this_leaf, int private,