From patchwork Fri Aug 19 19:38:14 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Turquette X-Patchwork-Id: 3578 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 9E4CB23F26 for ; Fri, 19 Aug 2011 19:39:56 +0000 (UTC) Received: from mail-gw0-f52.google.com (mail-gw0-f52.google.com [74.125.83.52]) by fiordland.canonical.com (Postfix) with ESMTP id 68856A1800B for ; Fri, 19 Aug 2011 19:39:56 +0000 (UTC) Received: by gwj15 with SMTP id 15so2733900gwj.11 for ; Fri, 19 Aug 2011 12:39:55 -0700 (PDT) Received: by 10.150.47.2 with SMTP id u2mr144461ybu.162.1313782795754; Fri, 19 Aug 2011 12:39:55 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.150.157.17 with SMTP id f17cs113587ybe; Fri, 19 Aug 2011 12:39:54 -0700 (PDT) Received: by 10.150.170.10 with SMTP id s10mr141339ybe.171.1313782794539; Fri, 19 Aug 2011 12:39:54 -0700 (PDT) Received: from na3sys009aog101.obsmtp.com ([74.125.149.67]) by mx.google.com with SMTP id lv9si7915113pbb.116.2011.08.19.12.39.53 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 19 Aug 2011 12:39:54 -0700 (PDT) Received-SPF: pass (google.com: domain of mturquette@ti.com designates 74.125.149.67 as permitted sender) client-ip=74.125.149.67; Authentication-Results: mx.google.com; spf=pass (google.com: domain of mturquette@ti.com designates 74.125.149.67 as permitted sender) smtp.mail=mturquette@ti.com Received: from mail-yi0-f51.google.com ([209.85.218.51]) (using TLSv1) by na3sys009aob101.postini.com ([74.125.148.12]) with SMTP ID DSNKTk68CSiNctnZvtoYOAFsIBVFN4+3FRwD@postini.com; Fri, 19 Aug 2011 12:39:54 PDT Received: by yib12 with SMTP id 12so3029111yib.24 for ; Fri, 19 Aug 2011 12:39:52 -0700 (PDT) Received: by 10.147.55.30 with SMTP id h30mr145867yak.22.1313782792048; Fri, 19 Aug 2011 12:39:52 -0700 (PDT) Received: from localhost.localdomain (dragon.ti.com [192.94.94.33]) by mx.google.com with ESMTPS id e21sm1179802yhn.35.2011.08.19.12.39.49 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 19 Aug 2011 12:39:50 -0700 (PDT) From: Mike Turquette To: linaro-dev@lists.linaro.org, patches@linaro.org Cc: Mike Turquette Subject: [PATCH 1/6] ARM: do not mark CPU 0 as hotpluggable Date: Fri, 19 Aug 2011 12:38:14 -0700 Message-Id: <1313782699-29411-2-git-send-email-mturquette@ti.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1313782699-29411-1-git-send-email-mturquette@ti.com> References: <1313782699-29411-1-git-send-email-mturquette@ti.com> 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 70bca64..5f3f4bb 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -949,7 +949,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); }