From patchwork Tue Oct 8 13:49:08 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: PranavkumarSawargaonkar X-Patchwork-Id: 20897 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f197.google.com (mail-vc0-f197.google.com [209.85.220.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2C6FA24697 for ; Tue, 8 Oct 2013 13:49:43 +0000 (UTC) Received: by mail-vc0-f197.google.com with SMTP id gd11sf15460109vcb.4 for ; Tue, 08 Oct 2013 06:49:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=G3bmN1qV6h+Fr7rZU3vgFn/gdjLhAR+CNSX0BNAz9ps=; b=N4d9gN8B2fIwXRlAOTDotYcr3txmtrLIGMok+rAIZ34HYnZThr8X90n05mtU4YbdZv YGzNP5pJTRoV47VXEt7cu7A5vgYafCiK/nEgcxyKlgeMxik37Cw0XNKgMaYGyS7IPdKw p3OPsSXQbQsrHi2nIT7Me25ElS3wBaONg/rwcZfmjQ/jMH6rEjS/xwe72fIZ5bxwFg8P cISZiOfk0aHMj87D3BGD1KNmqyiU4VT6CKRDZvFfTdfLTGxB1TfaDw6tIIBDaF5viph3 Rl3L9jdeEh/O8SpC6+FyoHot5wEgP/ldshKdVbq1I1PKwHFMCb4eDlul/fgHUkSFw50H D8Dg== X-Received: by 10.236.54.68 with SMTP id h44mr1651738yhc.21.1381240183000; Tue, 08 Oct 2013 06:49:43 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.0.41 with SMTP id 9ls211698qeb.15.gmail; Tue, 08 Oct 2013 06:49:42 -0700 (PDT) X-Received: by 10.220.209.202 with SMTP id gh10mr58381vcb.50.1381240182919; Tue, 08 Oct 2013 06:49:42 -0700 (PDT) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id zw10si9531766vdb.122.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 08 Oct 2013 06:49:42 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.178; Received: by mail-vc0-f178.google.com with SMTP id lh4so3836173vcb.9 for ; Tue, 08 Oct 2013 06:49:42 -0700 (PDT) X-Gm-Message-State: ALoCoQl+YgaudFRjkzqEEbOBEGIjcsB/cDmFktSpAoBrcVBkv62dg/lPJhhckZt9tZGvxmO4n7Qz X-Received: by 10.52.52.137 with SMTP id t9mr961592vdo.22.1381240182816; Tue, 08 Oct 2013 06:49:42 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp206669vcz; Tue, 8 Oct 2013 06:49:42 -0700 (PDT) X-Received: by 10.68.239.225 with SMTP id vv1mr2174407pbc.126.1381240181802; Tue, 08 Oct 2013 06:49:41 -0700 (PDT) Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) by mx.google.com with ESMTPS id z1si26580282pbw.219.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 08 Oct 2013 06:49:41 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of pranavkumar@linaro.org) client-ip=209.85.160.50; Received: by mail-pb0-f50.google.com with SMTP id uo5so8699464pbc.9 for ; Tue, 08 Oct 2013 06:49:41 -0700 (PDT) X-Received: by 10.68.40.169 with SMTP id y9mr1968735pbk.193.1381240181369; Tue, 08 Oct 2013 06:49:41 -0700 (PDT) Received: from pnqlab006.amcc.com ([182.73.239.130]) by mx.google.com with ESMTPSA id ha10sm40234559pbc.23.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 08 Oct 2013 06:49:40 -0700 (PDT) From: Pranavkumar Sawargaonkar To: libvirt-list@redhat.com Cc: patches@linaro.org, crobinso@redhat.com, berrange@redhat.com, anup.patel@linaro.com, Pranavkumar Sawargaonkar , Anup Patel Subject: [PATCH 3/6] AArch64: Parse cputopology from /proc/cpuinfo. Date: Tue, 8 Oct 2013 19:19:08 +0530 Message-Id: <1381240151-15060-4-git-send-email-pranavkumar@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1381240151-15060-1-git-send-email-pranavkumar@linaro.org> References: <1381240151-15060-1-git-send-email-pranavkumar@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: pranavkumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , CPU "parser" for AArch64. Showing cputopology in arm64 linux is work-in-progress so for now all AArch64 cpus belong to same socket (like PPC). Also we parse BogoMIPS same like arm 32bit. Signed-off-by: Anup Patel Signed-off-by: Pranavkumar Sawargaonkar --- src/nodeinfo.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/nodeinfo.c b/src/nodeinfo.c index 320d8f8..309066c 100644 --- a/src/nodeinfo.c +++ b/src/nodeinfo.c @@ -205,7 +205,8 @@ virNodeParseSocket(const char *dir, unsigned int cpu) # if defined(__powerpc__) || \ defined(__powerpc64__) || \ defined(__s390__) || \ - defined(__s390x__) + defined(__s390x__) || \ + defined(__aarch64__) /* ppc and s390(x) has -1 */ if (ret < 0) ret = 0; @@ -441,7 +442,7 @@ int linuxNodeInfoCPUPopulate(FILE *cpuinfo, * and parsed in next iteration, because it is not in expected * format and thus lead to error. */ } -# elif defined(__arm__) +# elif defined(__arm__) || defined(__aarch64__) char *buf = line; if (STRPREFIX(buf, "BogoMIPS")) { char *p;