From patchwork Thu Aug 11 19:54:47 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Turquette X-Patchwork-Id: 3396 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 CAA8423E54 for ; Thu, 11 Aug 2011 19:56:26 +0000 (UTC) Received: from mail-qw0-f52.google.com (mail-qw0-f52.google.com [209.85.216.52]) by fiordland.canonical.com (Postfix) with ESMTP id 99974A18382 for ; Thu, 11 Aug 2011 19:56:26 +0000 (UTC) Received: by qwb8 with SMTP id 8so1846050qwb.11 for ; Thu, 11 Aug 2011 12:56:26 -0700 (PDT) Received: by 10.224.190.69 with SMTP id dh5mr36023qab.184.1313092585844; Thu, 11 Aug 2011 12:56:25 -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.229.190.71 with SMTP id dh7cs126710qcb; Thu, 11 Aug 2011 12:56:25 -0700 (PDT) Received: from mr.google.com ([10.236.184.104]) by 10.236.184.104 with SMTP id r68mr239842yhm.91.1313092585229 (num_hops = 1); Thu, 11 Aug 2011 12:56:25 -0700 (PDT) Received: by 10.236.184.104 with SMTP id r68mr176007yhm.91.1313092584783; Thu, 11 Aug 2011 12:56:24 -0700 (PDT) Received: from na3sys009aog107.obsmtp.com ([74.125.149.197]) by mx.google.com with SMTP id g7si4893221wfe.11.2011.08.11.12.56.23 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 11 Aug 2011 12:56:24 -0700 (PDT) Received-SPF: pass (google.com: domain of mturquette@ti.com designates 74.125.149.197 as permitted sender) client-ip=74.125.149.197; Authentication-Results: mx.google.com; spf=pass (google.com: domain of mturquette@ti.com designates 74.125.149.197 as permitted sender) smtp.mail=mturquette@ti.com Received: from mail-gx0-f177.google.com ([209.85.161.177]) (using TLSv1) by na3sys009aob107.postini.com ([74.125.148.12]) with SMTP ID DSNKTkQz59xsiVfD77IsUGCB7PuOTyygwNrv@postini.com; Thu, 11 Aug 2011 12:56:24 PDT Received: by gxk2 with SMTP id 2so1678318gxk.8 for ; Thu, 11 Aug 2011 12:56:22 -0700 (PDT) Received: by 10.236.143.104 with SMTP id k68mr196159yhj.65.1313092582850; Thu, 11 Aug 2011 12:56:22 -0700 (PDT) Received: from localhost.localdomain (dragon.ti.com [192.94.94.33]) by mx.google.com with ESMTPS id q25sm2540733yhm.34.2011.08.11.12.56.20 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 11 Aug 2011 12:56:22 -0700 (PDT) From: Mike Turquette To: linux-kernel@vger.kernel.org Cc: linux-pm@lists.linux-foundation.org, linaro-dev@lists.linaro.org, patches@linaro.org, gregkh@suse.de, peterz@infradead.org, amit.kucheria@linaro.org, Mike Turquette Subject: [PATCH v3 2/2] cpu: update cpu_hotpluggable_mask in register_cpu Date: Thu, 11 Aug 2011 12:54:47 -0700 Message-Id: <1313092487-15858-2-git-send-email-mturquette@ti.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1313092487-15858-1-git-send-email-mturquette@ti.com> References: <1313006614-28702-1-git-send-email-mturquette@ti.com> <1313092487-15858-1-git-send-email-mturquette@ti.com> 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 --- Change log: v2: no change v3: 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)