From patchwork Wed Aug 10 20:03:34 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Turquette X-Patchwork-Id: 1054822 Received: from smtp1.linux-foundation.org (smtp1.linux-foundation.org [140.211.169.13]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p7AKE74B019465 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Wed, 10 Aug 2011 20:14:28 GMT Received: from daredevil.linux-foundation.org (localhost [127.0.0.1]) by smtp1.linux-foundation.org (8.14.2/8.13.5/Debian-3ubuntu1.1) with ESMTP id p7AKBoDf019377; Wed, 10 Aug 2011 13:12:20 -0700 Received: from na3sys009aog106.obsmtp.com (na3sys009aob106.obsmtp.com [74.125.149.76]) by smtp1.linux-foundation.org (8.14.2/8.13.5/Debian-3ubuntu1.1) with SMTP id p7AK5vvX018890 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 10 Aug 2011 13:05:59 -0700 Received: from mail-gy0-f169.google.com ([209.85.160.169]) (using TLSv1) by na3sys009aob106.postini.com ([74.125.148.12]) with SMTP ID DSNKTkLkpd4jPYqE9UYMkvxFz9bBWnJaDKQs@postini.com; Wed, 10 Aug 2011 13:05:59 PDT Received: by mail-gy0-f169.google.com with SMTP id 10so1165775gyg.14 for ; Wed, 10 Aug 2011 13:05:57 -0700 (PDT) Received: by 10.236.179.5 with SMTP id g5mr9313142yhm.157.1313006757041; Wed, 10 Aug 2011 13:05:57 -0700 (PDT) Received: from localhost.localdomain (dragon.ti.com [192.94.94.33]) by mx.google.com with ESMTPS id q25sm1405412yhm.34.2011.08.10.13.05.55 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 10 Aug 2011 13:05:56 -0700 (PDT) From: Mike Turquette To: linux-kernel@vger.kernel.org Date: Wed, 10 Aug 2011 13:03:34 -0700 Message-Id: <1313006614-28702-3-git-send-email-mturquette@ti.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1313006614-28702-1-git-send-email-mturquette@ti.com> References: <1313006614-28702-1-git-send-email-mturquette@ti.com> Received-SPF: pass (localhost is always allowed.) X-Spam-Status: No, hits=-104.233 required=5 tests=AWL, BAYES_00, OSDL_HEADER_SPF_PASS, OSDL_HEADER_SUBJECT_BRACKETED, USER_IN_WHITELIST X-Spam-Checker-Version: SpamAssassin 3.2.4-osdl_revision__1.47__ X-MIMEDefang-Filter: lf$Revision: 1.188 $ X-Scanned-By: MIMEDefang 2.63 on 140.211.169.21 Cc: linux-pm@lists.linux-foundation.org, gregkh@suse.de, linaro-dev@lists.linaro.org, patches@linaro.org Subject: [linux-pm] [PATCH v2 2/2] cpu: update cpu_hotpluggable_mask in register_cpu X-BeenThere: linux-pm@lists.linux-foundation.org X-Mailman-Version: 2.1.9 Precedence: list List-Id: Linux power management List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-pm-bounces@lists.linux-foundation.org Errors-To: linux-pm-bounces@lists.linux-foundation.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, 10 Aug 2011 20:14:28 +0000 (UTC) Update the cpu_hotpluggable_mask for each registered CPU which supports hotplug. This makes it trivial for kernel code to know which CPUs support hotplug operations. Signed-off-by: Mike Turquette Reviewed-by: daniel.lezcano@linaro.org --- Change log: v2: no change drivers/base/cpu.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c index 251acea..91ddcf8 100644 --- a/drivers/base/cpu.c +++ b/drivers/base/cpu.c @@ -224,8 +224,10 @@ int __cpuinit register_cpu(struct cpu *cpu, int num) error = sysdev_register(&cpu->sysdev); - if (!error && cpu->hotpluggable) + if (!error && cpu->hotpluggable) { register_cpu_control(cpu); + set_cpu_hotpluggable(num, true); + } if (!error) per_cpu(cpu_sys_devices, num) = &cpu->sysdev; if (!error)