From patchwork Mon Jul 22 15:37:32 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Rutland X-Patchwork-Id: 2831435 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 33EAE9F243 for ; Mon, 22 Jul 2013 15:42:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D074B20207 for ; Mon, 22 Jul 2013 15:42:29 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4B5FE201F7 for ; Mon, 22 Jul 2013 15:42:24 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V1IDN-0006xt-6q; Mon, 22 Jul 2013 15:39:59 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V1ICh-000769-9g; Mon, 22 Jul 2013 15:39:15 +0000 Received: from cam-admin0.cambridge.arm.com ([217.140.96.50]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V1ICe-00074N-J2 for linux-arm-kernel@lists.infradead.org; Mon, 22 Jul 2013 15:39:13 +0000 Received: from e106331-lin.cambridge.arm.com (e106331-lin.cambridge.arm.com [10.1.205.41]) by cam-admin0.cambridge.arm.com (8.12.6/8.12.6) with ESMTP id r6MFbZkl007531; Mon, 22 Jul 2013 16:38:48 +0100 (BST) From: Mark Rutland To: linux-arm-kernel@lists.infradead.org Subject: [PATCHv2 3/5] arm64: read enable-method for CPU0 Date: Mon, 22 Jul 2013 16:37:32 +0100 Message-Id: <1374507454-4573-4-git-send-email-mark.rutland@arm.com> X-Mailer: git-send-email 1.8.1.1 In-Reply-To: <1374507454-4573-1-git-send-email-mark.rutland@arm.com> References: <1374507454-4573-1-git-send-email-mark.rutland@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130722_113912_886066_19B39DAB X-CRM114-Status: GOOD ( 11.15 ) X-Spam-Score: -8.4 (--------) Cc: Mark Rutland , Lorenzo.Pieralisi@arm.com, graeme.gregory@linaro.org, nico@linaro.org, Marc.Zyngier@arm.com, Catalin.Marinas@arm.com, sboyd@codeaurora.org, santosh.shilimkar@ti.com, hanjun.guo@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP With the advent of CPU_HOTPLUG, the enable-method property for CPU0 may tells us something useful (i.e. how to hotplug it back on), so we must read it along with all the enable-method for all the other CPUs. This patch ensures that CPU0's enable-method property is read. Signed-off-by: Mark Rutland --- arch/arm64/kernel/smp.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c index 72c2823..f6ce2ae 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c @@ -254,6 +254,8 @@ void __init smp_init_cpus(void) } } + enable_method = of_get_property(dn, "enable-method", NULL); + /* * The numbering scheme requires that the boot CPU * must be assigned logical id 0. Record it so that @@ -269,11 +271,12 @@ void __init smp_init_cpus(void) bootcpu_valid = true; + if (enable_method) + smp_ops[0] = smp_get_ops(enable_method); + /* - * cpu_logical_map has already been - * initialized and the boot cpu doesn't need - * the enable-method so continue without - * incrementing cpu. + * cpu_logical_map has already been initialized so + * continue without incrementing cpu. */ continue; } @@ -281,10 +284,6 @@ void __init smp_init_cpus(void) if (cpu >= NR_CPUS) goto next; - /* - * We currently support only the "spin-table" enable-method. - */ - enable_method = of_get_property(dn, "enable-method", NULL); if (!enable_method) { pr_err("%s: missing enable-method property\n", dn->full_name);