[libvirt] [PATCH 5/6] util: Tweak s390(x) case for CPU frequency

Andrea Bolognani abologna at redhat.com
Mon Dec 11 16:40:35 UTC 2017


We're going to use this branch for all architectures which don't
have a way to report the CPU frequency, so remove references to
any specific architecture.

Avoid setting the output value again, too, since it is set to
zero at the beginning of the function already.

Signed-off-by: Andrea Bolognani <abologna at redhat.com>
---
 src/util/virhostcpu.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c
index e74125147..3b478fc45 100644
--- a/src/util/virhostcpu.c
+++ b/src/util/virhostcpu.c
@@ -567,9 +567,7 @@ virHostCPUGetInfoParseCPUInfo(FILE *cpuinfo,
             if (virHostCPUGetInfoParseCPUFrequency(line, "BogoMIPS", mhz) < 0)
                 goto cleanup;
         } else if (ARCH_IS_S390(arch)) {
-            /* s390x has no realistic value for CPU speed,
-             * assign a value of zero to signify this */
-            *mhz = 0;
+            /* No reasonable way to obtain CPU frequency */
         } else {
             VIR_WARN("Parser for /proc/cpuinfo needs to be adapted for your architecture");
             break;
-- 
2.14.3




More information about the libvir-list mailing list