From patchwork Thu Jul 11 09:52:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shinya Kuribayashi X-Patchwork-Id: 2826274 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 383339F756 for ; Thu, 11 Jul 2013 09:57:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2313E201C6 for ; Thu, 11 Jul 2013 09:57:05 +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 83C5D201C3 for ; Thu, 11 Jul 2013 09:57:03 +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 1UxDa5-0001fh-26; Thu, 11 Jul 2013 09:54:34 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UxDZA-0003Yz-3V; Thu, 11 Jul 2013 09:53:36 +0000 Received: from relmlor4.renesas.com ([210.160.252.174]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UxDZ6-0003Xu-VV for linux-arm-kernel@lists.infradead.org; Thu, 11 Jul 2013 09:53:33 +0000 Received: from relmlir3.idc.renesas.com ([10.200.68.153]) by relmlor4.idc.renesas.com ( SJSMS) with ESMTP id <0MPR00G72NGOE160@relmlor4.idc.renesas.com> for linux-arm-kernel@lists.infradead.org; Thu, 11 Jul 2013 18:53:12 +0900 (JST) Received: from relmlac2.idc.renesas.com ([10.200.69.22]) by relmlir3.idc.renesas.com ( SJSMS) with ESMTP id <0MPR00BERNGO8BF0@relmlir3.idc.renesas.com> for linux-arm-kernel@lists.infradead.org; Thu, 11 Jul 2013 18:53:12 +0900 (JST) Received: by relmlac2.idc.renesas.com (Postfix, from userid 0) id 1D716280A5; Thu, 11 Jul 2013 18:53:12 +0900 (JST) Received: from relmlac2.idc.renesas.com (localhost [127.0.0.1]) by relmlac2.idc.renesas.com (Postfix) with ESMTP id 1CD57280A6; Thu, 11 Jul 2013 18:53:12 +0900 (JST) Received: from relmlii1.idc.renesas.com [10.200.68.65] by relmlac2.idc.renesas.com with ESMTP id UAH09598; Thu, 11 Jul 2013 18:53:12 +0900 X-IronPort-AV: E=Sophos; i="4.87,1043,1363100400"; d="scan'208"; a="133584815" Received: from unknown (HELO [10.161.64.55]) ([10.161.64.55]) by relmlii1.idc.renesas.com with ESMTP; Thu, 11 Jul 2013 18:52:57 +0900 Message-id: <51DE8079.6000001@renesas.com> Date: Thu, 11 Jul 2013 18:52:57 +0900 From: Shinya Kuribayashi User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-version: 1.0 To: magnus.damm@gmail.com Subject: [PATCH 4/4] ARM: shmobile: smp-r8a7790: power up a CPU core at .smp_boot_secondary stage References: <20130710104151.20742.56398.sendpatchset@w520> <51DE7FF4.5050800@renesas.com> In-reply-to: <51DE7FF4.5050800@renesas.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130711_055333_173641_66AF61FF X-CRM114-Status: UNSURE ( 9.40 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.2 (--) Cc: linux@arm.linux.org.uk, arnd@arndb.de, linux-sh@vger.kernel.org, horms@verge.net.au, ulrich.hecht@gmail.com, olof@lixom.net, linux-arm-kernel@lists.infradead.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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.5 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 CPU hotplug support in mind, we should not let oneline CPU cores get powered on at .smp_prepare_cpus stage _just_ _once_, but should power up a requested CPU core one by one, when .smp_boot_secondary is processed. Otherwise, the power supply to CPU cores can never be on again after resume or cpu_up request via CPU hotplug. Signed-off-by: Shinya Kuribayashi --- arch/arm/mach-shmobile/smp-r8a7790.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/arch/arm/mach-shmobile/smp-r8a7790.c b/arch/arm/mach-shmobile/smp-r8a7790.c index 1448e387..6d23c52 100644 --- a/arch/arm/mach-shmobile/smp-r8a7790.c +++ b/arch/arm/mach-shmobile/smp-r8a7790.c @@ -120,11 +120,9 @@ static void __init r8a7790_smp_prepare_cpus(unsigned int max_cpus) memcpy_toio(p, shmobile_boot_vector, 16); iounmap(p); - /* keep secondary CPU cores in reset, but powered on */ - for (k = 1; k < 8; k++) { + /* keep secondary CPU cores in reset */ + for (k = 1; k < 8; k++) r8a7790_assert_reset(k); - r8a7790_power_on(k); - } } static int __cpuinit r8a7790_boot_secondary(unsigned int cpu, @@ -134,6 +132,7 @@ static int __cpuinit r8a7790_boot_secondary(unsigned int cpu, if (r8a7790_clst_id(cpu) != r8a7790_clst_id(0)) return -ENOTSUPP; + r8a7790_power_on(cpu); r8a7790_deassert_reset(cpu); return 0; }