From patchwork Tue Jun 21 22:56:24 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jon Mayo X-Patchwork-Id: 902952 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p5LMqBCU031223 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 21 Jun 2011 22:52:32 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QZ9na-0006EY-J9; Tue, 21 Jun 2011 22:51:58 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QZ9na-00057r-7V; Tue, 21 Jun 2011 22:51:58 +0000 Received: from hqemgate04.nvidia.com ([216.228.121.35]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QZ9nW-00057Y-O8 for linux-arm-kernel@lists.infradead.org; Tue, 21 Jun 2011 22:51:55 +0000 Received: from hqnvupgp07.nvidia.com (Not Verified[216.228.121.13]) by hqemgate04.nvidia.com id ; Tue, 21 Jun 2011 15:50:09 -0700 Received: from hqemhub03.nvidia.com ([172.17.108.22]) by hqnvupgp07.nvidia.com (PGP Universal service); Tue, 21 Jun 2011 15:51:50 -0700 X-PGP-Universal: processed; by hqnvupgp07.nvidia.com on Tue, 21 Jun 2011 15:51:50 -0700 Received: from [172.17.144.204] (172.20.144.16) by hqemhub03.nvidia.com (172.20.150.15) with Microsoft SMTP Server id 8.2.254.0; Tue, 21 Jun 2011 15:51:50 -0700 Message-ID: <4E012198.6010405@nvidia.com> Date: Tue, 21 Jun 2011 15:56:24 -0700 From: Jon Mayo Organization: NVIDIA Corporation User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Lightning/1.0b2 Thunderbird/3.1.8 MIME-Version: 1.0 To: "linux-arm-kernel@lists.infradead.org" Subject: [PATCH] ARM: report present cpus in /proc/cpuinfo X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110621_185154_996999_8ECE9093 X-CRM114-Status: GOOD ( 12.73 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [216.228.121.35 listed in list.dnswl.org] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Tue, 21 Jun 2011 22:52:32 +0000 (UTC) Because arm linux likes to dynamically hotplug cpus, the meaning of online has changed slightly. Previously online meant a cpus is schedulable, and conversely offline means they it is not schedulable. But with the current power management infrastructure there are cpus that can be scheduled (after they are woken up automatically), yet are not considered "online" because the masks and flags for them are not set. --- arch/arm/kernel/setup.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index d5231ae..2c52b4e 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -905,7 +905,7 @@ static int c_show(struct seq_file *m, void *v) cpu_name, read_cpuid_id() & 15, elf_platform); #if defined(CONFIG_SMP) - for_each_online_cpu(i) { + for_each_present_cpu(i) { /* * glibc reads /proc/cpuinfo to determine the number of * online processors, looking for lines beginning with