From patchwork Wed Jul 20 23:32:25 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Turquette X-Patchwork-Id: 993412 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 p6KNXrfr018873 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 20 Jul 2011 23:34:21 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QjgGu-0007V9-PL; Wed, 20 Jul 2011 23:33:44 +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 1QjgGu-0003QY-DT; Wed, 20 Jul 2011 23:33:44 +0000 Received: from na3sys009aog113.obsmtp.com ([74.125.149.209]) by canuck.infradead.org with smtps (Exim 4.76 #1 (Red Hat Linux)) id 1QjgGr-0003QF-2F for linux-arm-kernel@lists.infradead.org; Wed, 20 Jul 2011 23:33:41 +0000 Received: from mail-gx0-f174.google.com ([209.85.161.174]) (using TLSv1) by na3sys009aob113.postini.com ([74.125.148.12]) with SMTP ID DSNKTidl0KrTCU48HPItXilqYH1Z4+/QYTnr@postini.com; Wed, 20 Jul 2011 16:33:40 PDT Received: by mail-gx0-f174.google.com with SMTP id 21so404032gxk.5 for ; Wed, 20 Jul 2011 16:33:36 -0700 (PDT) Received: by 10.236.161.197 with SMTP id w45mr12208866yhk.389.1311204815965; Wed, 20 Jul 2011 16:33:35 -0700 (PDT) Received: from localhost.localdomain (dragon.ti.com [192.94.94.33]) by mx.google.com with ESMTPS id z28sm674016yhn.35.2011.07.20.16.33.33 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 20 Jul 2011 16:33:34 -0700 (PDT) From: Mike Turquette To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] ARM: do not mark CPU 0 as hotpluggable Date: Wed, 20 Jul 2011 16:32:25 -0700 Message-Id: <1311204745-6276-1-git-send-email-mturquette@ti.com> X-Mailer: git-send-email 1.7.4.1 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110720_193341_395849_44F644AB X-CRM114-Status: GOOD ( 14.03 ) 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 ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [74.125.149.209 listed in list.dnswl.org] Cc: santosh.shilimkar@ti.com, linaro-dev@lists.linaro.org, Mike Turquette 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: , MIME-Version: 1.0 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]); Wed, 20 Jul 2011 23:34:21 +0000 (UTC) A quick poll of the ARM platforms that implement CPU Hotplug support shows that every platform treats CPU 0 as a special case that cannot be hotplugged. In fact every platform has identical code for platform_cpu_die which returns -EPERM in the case of CPU 0. The user-facing sysfs interfaces should reflect this by not populating an 'online' entry for CPU 0 at all. This better reflects reality by making it clear to users that CPU 0 cannot be hotplugged. This patch prevents CPU 0 from being marked as hotpluggable on all ARM platforms during CPU registration. This in turn prevents the creation of an 'online' sysfs interface for that CPU. Signed-off-by: Mike Turquette --- arch/arm/kernel/setup.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index ed11fb0..a5fc969 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -940,7 +940,8 @@ static int __init topology_init(void) for_each_possible_cpu(cpu) { struct cpuinfo_arm *cpuinfo = &per_cpu(cpu_data, cpu); - cpuinfo->cpu.hotpluggable = 1; + if (cpu) + cpuinfo->cpu.hotpluggable = 1; register_cpu(&cpuinfo->cpu, cpu); }