render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
c401cc
From a5699adc79fcb10b45993a3208f90e1ddb10c352 Mon Sep 17 00:00:00 2001
c401cc
Message-Id: <a5699adc79fcb10b45993a3208f90e1ddb10c352.1390394207.git.jdenemar@redhat.com>
c401cc
From: Pranavkumar Sawargaonkar <pranavkumar@linaro.org>
c401cc
Date: Mon, 20 Jan 2014 09:03:27 -0700
c401cc
Subject: [PATCH] AArch64: Parse cputopology from /proc/cpuinfo.
c401cc
c401cc
https://bugzilla.redhat.com/show_bug.cgi?id=1042937
c401cc
c401cc
CPU "parser" for AArch64.
c401cc
Showing cputopology in arm64 linux is work-in-progress so for now
c401cc
all AArch64 cpus belong to same socket (like PPC).
c401cc
c401cc
Also we parse BogoMIPS same like arm 32bit.
c401cc
c401cc
Signed-off-by: Anup Patel <anup.patel@linaro.org>
c401cc
Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar@linaro.org>
c401cc
(cherry picked from commit 950127620dc503d94d4fa56b81fa75378f5bbf4e)
c401cc
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
c401cc
---
c401cc
 src/nodeinfo.c | 5 +++--
c401cc
 1 file changed, 3 insertions(+), 2 deletions(-)
c401cc
c401cc
diff --git a/src/nodeinfo.c b/src/nodeinfo.c
c401cc
index 33a79b7..3bea9b8 100644
c401cc
--- a/src/nodeinfo.c
c401cc
+++ b/src/nodeinfo.c
c401cc
@@ -205,7 +205,8 @@ virNodeParseSocket(const char *dir, unsigned int cpu)
c401cc
 # if defined(__powerpc__) || \
c401cc
     defined(__powerpc64__) || \
c401cc
     defined(__s390__) || \
c401cc
-    defined(__s390x__)
c401cc
+    defined(__s390x__) || \
c401cc
+    defined(__aarch64__)
c401cc
     /* ppc and s390(x) has -1 */
c401cc
     if (ret < 0)
c401cc
         ret = 0;
c401cc
@@ -441,7 +442,7 @@ int linuxNodeInfoCPUPopulate(FILE *cpuinfo,
c401cc
              * and parsed in next iteration, because it is not in expected
c401cc
              * format and thus lead to error. */
c401cc
         }
c401cc
-# elif defined(__arm__)
c401cc
+# elif defined(__arm__) || defined(__aarch64__)
c401cc
         char *buf = line;
c401cc
         if (STRPREFIX(buf, "BogoMIPS")) {
c401cc
             char *p;
c401cc
-- 
c401cc
1.8.5.3
c401cc