From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752064AbdEJFN7 (ORCPT ); Wed, 10 May 2017 01:13:59 -0400 Received: from mail1.windriver.com ([147.11.146.13]:43879 "EHLO mail1.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751731AbdEJFNz (ORCPT ); Wed, 10 May 2017 01:13:55 -0400 From: To: , , , CC: , , , Subject: [PATCH] socfpga_a10: reset CPU1 in socfpga_cpu_kill() Date: Wed, 10 May 2017 01:13:04 -0400 Message-ID: <20170510051304.131042-2-yanjiang.jin@windriver.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170510051304.131042-1-yanjiang.jin@windriver.com> References: <20170510051304.131042-1-yanjiang.jin@windriver.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yanjiang Jin Kexec's second kernel would hang if CPU1 isn't reset. Signed-off-by: Yanjiang Jin --- arch/arm/mach-socfpga/platsmp.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-socfpga/platsmp.c b/arch/arm/mach-socfpga/platsmp.c index 0ee7677..db3940e 100644 --- a/arch/arm/mach-socfpga/platsmp.c +++ b/arch/arm/mach-socfpga/platsmp.c @@ -117,6 +117,16 @@ static int socfpga_cpu_kill(unsigned int cpu) { return 1; } + +static int socfpga_a10_cpu_kill(unsigned int cpu) +{ + /* This will put CPU #1 into reset. */ + if (socfpga_cpu1start_addr) + writel(RSTMGR_MPUMODRST_CPU1, rst_manager_base_addr + + SOCFPGA_A10_RSTMGR_MODMPURST); + + return 1; +} #endif static const struct smp_operations socfpga_smp_ops __initconst = { @@ -133,7 +143,7 @@ static int socfpga_cpu_kill(unsigned int cpu) .smp_boot_secondary = socfpga_a10_boot_secondary, #ifdef CONFIG_HOTPLUG_CPU .cpu_die = socfpga_cpu_die, - .cpu_kill = socfpga_cpu_kill, + .cpu_kill = socfpga_a10_cpu_kill, #endif }; -- 1.9.1