From patchwork Wed Jun 4 05:57:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sanjay Singh Rawat X-Patchwork-Id: 31344 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f200.google.com (mail-ie0-f200.google.com [209.85.223.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 36A90203AC for ; Wed, 4 Jun 2014 05:57:40 +0000 (UTC) Received: by mail-ie0-f200.google.com with SMTP id y20sf40708085ier.3 for ; Tue, 03 Jun 2014 22:57:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=Kye6MxfMGg5o9s9Bn1F7R1CLG4Syu0cSPUp06Wqc+2Y=; b=khDVDlVRlCecUGeube8eX6uI/8HYtoAxr7kb1Aw92rVlLvX86BBIn6mbALM4DOSqmV ixQp2SnxVPT8nNgqvkRvexizHTIefeN4d4QLOGqIX30mwyyoYOnHgq1CrVyJ/vQCw/AD aAnJgUwySii3lHiURcivGCX5ODUhBymdD8g8A07mi545BYxmmSSMMSaAxszVywUqRdbh keCFrHwEXCozTCg/ux78qeudx78JVTRwKeFu0kIw0lsHxwbnVeQcfVYh5aViKe4qW9o5 5NtCfAcaHAAN0UV00899+4i/O1EX6B+XHbNxZR9azxtuuhk/ZW5HxvZWmessaQduh/EH +PcQ== X-Gm-Message-State: ALoCoQnHhwfKTL+XIt5sFrVgZxxSM6huRMHQzkEames88WMQH2mAi1z44qpYtIfRt91OZyI2l9Xt X-Received: by 10.51.17.10 with SMTP id ga10mr944783igd.4.1401861459699; Tue, 03 Jun 2014 22:57:39 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.51.132 with SMTP id u4ls2796792qga.36.gmail; Tue, 03 Jun 2014 22:57:39 -0700 (PDT) X-Received: by 10.220.253.132 with SMTP id na4mr1780583vcb.39.1401861459602; Tue, 03 Jun 2014 22:57:39 -0700 (PDT) Received: from mail-ve0-f179.google.com (mail-ve0-f179.google.com [209.85.128.179]) by mx.google.com with ESMTPS id q13si956261vci.29.2014.06.03.22.57.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Jun 2014 22:57:39 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.179 as permitted sender) client-ip=209.85.128.179; Received: by mail-ve0-f179.google.com with SMTP id oy12so8174123veb.38 for ; Tue, 03 Jun 2014 22:57:39 -0700 (PDT) X-Received: by 10.58.207.74 with SMTP id lu10mr40746689vec.15.1401861459532; Tue, 03 Jun 2014 22:57:39 -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.221.54.6 with SMTP id vs6csp20406vcb; Tue, 3 Jun 2014 22:57:39 -0700 (PDT) X-Received: by 10.68.197.8 with SMTP id iq8mr59756195pbc.124.1401861458791; Tue, 03 Jun 2014 22:57:38 -0700 (PDT) Received: from mail-pd0-f174.google.com (mail-pd0-f174.google.com [209.85.192.174]) by mx.google.com with ESMTPS id qt3si3152152pbb.223.2014.06.03.22.57.38 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Jun 2014 22:57:38 -0700 (PDT) Received-SPF: pass (google.com: domain of sanjay.rawat@linaro.org designates 209.85.192.174 as permitted sender) client-ip=209.85.192.174; Received: by mail-pd0-f174.google.com with SMTP id r10so5635056pdi.33 for ; Tue, 03 Jun 2014 22:57:38 -0700 (PDT) X-Received: by 10.68.213.198 with SMTP id nu6mr58676288pbc.21.1401861457256; Tue, 03 Jun 2014 22:57:37 -0700 (PDT) Received: from srawat-Latitude-E6420.LGE.NET ([203.247.149.152]) by mx.google.com with ESMTPSA id qw8sm5363967pbb.27.2014.06.03.22.57.33 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Jun 2014 22:57:36 -0700 (PDT) From: Sanjay Singh Rawat To: powertop@lists.01.org Cc: linaro-dev@lists.linaro.org, Sanjay Singh Rawat Subject: [PATCH] enumerate cpu based on different string on ARM Date: Wed, 4 Jun 2014 11:27:18 +0530 Message-Id: <1401861438-13612-1-git-send-email-sanjay.rawat@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: sanjay.rawat@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.179 as permitted sender) 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: , bogomips is removed by timer-backed delay loop (commit 9fc2105a) in ARM kernel. Using other suitable string to decide to enumerate each cpu. Signed-off-by: Sanjay Singh Rawat --- src/cpu/cpu.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/cpu/cpu.cpp b/src/cpu/cpu.cpp index b3b6166..105c066 100644 --- a/src/cpu/cpu.cpp +++ b/src/cpu/cpu.cpp @@ -296,6 +296,18 @@ void enumerate_cpus(void) number = -2; } } + /* bogomips is removed in ARM, using CPU revision to enumerate */ + if (strncasecmp(line, "CPU revision\t", 13) == 0) { + if (number == -1) { + /* Not all /proc/cpuinfo include "processor\t". */ + number = 0; + } + if (number >= 0) { + handle_one_cpu(number, vendor, family, model); + set_max_cpu(number); + number = -2; + } + } }