diff options
author | Alexander Gordeev <agordeev@linux.ibm.com> | 2020-03-16 10:25:44 +0100 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2020-03-23 13:41:55 +0100 |
commit | 1b648dfd544bd9d486926e221743b9bd143d7eca (patch) | |
tree | 61d6bbc54d8494f49355557f7f4c4b8efa44d542 | |
parent | 872f27103874a73783aeff2aac2b41a489f67d7c (diff) | |
download | linux-1b648dfd544bd9d486926e221743b9bd143d7eca.tar.bz2 |
s390/cpuinfo: do not skip info for CPUs without MHz feature
In the past there were no per-CPU information in /proc/cpuinfo
other than CPU frequency. Hence, for machines without CPU MHz
feature there were nothing to show. Now CPU topology and IDs
still could be shown, so do not skip this information from the
output.
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
[heiko.carstens@de.ibm.com: moved comparison]
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
-rw-r--r-- | arch/s390/kernel/processor.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/s390/kernel/processor.c b/arch/s390/kernel/processor.c index f36acc8d2631..c92d04f876cb 100644 --- a/arch/s390/kernel/processor.c +++ b/arch/s390/kernel/processor.c @@ -178,6 +178,8 @@ static void show_cpu_mhz(struct seq_file *m, unsigned long n) { struct cpu_info *c = per_cpu_ptr(&cpu_info, n); + if (!machine_has_cpu_mhz) + return; seq_printf(m, "cpu MHz dynamic : %d\n", c->cpu_mhz_dynamic); seq_printf(m, "cpu MHz static : %d\n", c->cpu_mhz_static); } @@ -192,8 +194,6 @@ static int show_cpuinfo(struct seq_file *m, void *v) if (n == first) show_cpu_summary(m, v); - if (!machine_has_cpu_mhz) - return 0; seq_printf(m, "\ncpu number : %ld\n", n); show_cpu_topology(m, n); show_cpu_ids(m, n); |