From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B7FFFC4332F for ; Fri, 10 Nov 2023 02:25:38 +0000 (UTC) Authentication-Results: lists.ozlabs.org; dkim=permerror header.d=wkennington-com.20230601.gappssmtp.com header.i=@wkennington-com.20230601.gappssmtp.com header.a=rsa-sha1 header.s=20230601 header.b=y/aIwDB1; dkim-atps=neutral Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4SRN352tZbz3bWQ for ; Fri, 10 Nov 2023 13:25:37 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=wkennington-com.20230601.gappssmtp.com header.i=@wkennington-com.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=y/aIwDB1; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=wkennington.com (client-ip=2607:f8b0:4864:20::42e; helo=mail-pf1-x42e.google.com; envelope-from=william@wkennington.com; receiver=lists.ozlabs.org) Received: from mail-pf1-x42e.google.com (mail-pf1-x42e.google.com [IPv6:2607:f8b0:4864:20::42e]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4SLQNR6yrbz2xHb for ; Thu, 2 Nov 2023 11:53:27 +1100 (AEDT) Received: by mail-pf1-x42e.google.com with SMTP id d2e1a72fcca58-6bf03b98b9bso1227488b3a.1 for ; Wed, 01 Nov 2023 17:53:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wkennington-com.20230601.gappssmtp.com; s=20230601; t=1698886404; x=1699491204; darn=lists.ozlabs.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xEH7jgDGNi0IK8LdwBqEJDaZ1nOxkEDv/a4hPy0Cfvs=; b=y/aIwDB1z/AQyTa5ZGSsiIPnKW9syWiX3E/zrfKwckqLOGi2AE2FyhSAlRdyZYdPXj yhVHDoHuq+Gb/ac5I33dRx3kjyVD9WzB8N7FkUOeoZz3IRikgWThwiSY0gZIQOeWFuJb wyPC5GYqpvRDP0jAH5U654EX5TkZky/I1AWO+ZLwNNemTAZmDDIE+AtWvd+Ybij7WhoL 1RY5mvwCeAFUmxE8WbYPk03Pp0ALwV6Z5CRiRIJ0cjeBs+d0lZrGh7JRv0/HUplS3kcH GhGWSYVBmtqZxylCshvCdU30JtoXQ6HmKxuUyhEmBUGCUj4DWWS0q6kdnrfQhWV5GVVV TEoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698886404; x=1699491204; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xEH7jgDGNi0IK8LdwBqEJDaZ1nOxkEDv/a4hPy0Cfvs=; b=PFGPMGbtCM0VgAKpk5U/F8N8YPeu9N6rFDsAfU9w7Wg2uvW0F1h4zhogpmueat+ipt ceKm5NcFd9U38FGOir3WoZEHo1IIe3+2zOcMRQtTmRv6HBLwQ/9Qgz6YVSjHFiY5McL6 5DnO/lwFfDCYphhIKqDhi3AoyfXWfddtpwtNAja81+/EyrK9b9Pgt/QV4KVF6a6Pkb2L 9u2pjh+TUBsQX4wiVhfbdTTWB5B12VFHC1iqustaJ7DaAOd0WTjyKLAp6tFKrimYHoQk 1JqBIyo2jq8665ef8U4QAkJpPdBqoLGhZh9dfID9Xrxgu86y8rrpzGPT5BXVaHbACpxo AUkg== X-Gm-Message-State: AOJu0YyENOJ5cUZ+73wzQ78uTBaLYj7zygc4yXRkEan0hDwNMnZaSgeZ 3h5gD44TuuhBFB4t7Vv5RwvVh71R59WqRe+3kf5rgg== X-Google-Smtp-Source: AGHT+IGSWXVKZ/Zqa3AgiAFvgieUYgWobPDkFn/aMZfv3jNm/vUrhTJokjt51yoYFUCRMB0d+zLJXw== X-Received: by 2002:a05:6a20:1443:b0:17e:aa00:ca62 with SMTP id a3-20020a056a20144300b0017eaa00ca62mr10468558pzi.17.1698886404340; Wed, 01 Nov 2023 17:53:24 -0700 (PDT) Received: from wak-linux.svl.corp.google.com ([2620:15c:2a3:200:8eb3:7c85:29f7:efa1]) by smtp.gmail.com with ESMTPSA id n20-20020aa78a54000000b006c2d53e0b5fsm1768083pfa.57.2023.11.01.17.53.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 17:53:23 -0700 (PDT) From: william@wkennington.com To: tmaimon77@gmail.com, tali.perry1@gmail.com, avifishman70@gmail.com Subject: [PATCH RESEND] ARM: npcm: Add CPU hotplug callbacks for kexec support Date: Wed, 1 Nov 2023 17:53:21 -0700 Message-ID: <20231102005321.1303809-1-william@wkennington.com> X-Mailer: git-send-email 2.42.0.820.g83a721a137-goog In-Reply-To: <20231102002453.1299195-1-william@wkennington.com> References: <20231102002453.1299195-1-william@wkennington.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Fri, 10 Nov 2023 13:23:51 +1100 X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "William A . Kennington III" , openbmc@lists.ozlabs.org, Brian Ma , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Errors-To: openbmc-bounces+openbmc=archiver.kernel.org@lists.ozlabs.org Sender: "openbmc" From: Brian Ma Add callbacks required for kexec to function. The NPCM7xx/NPCN8xx does not expose controls for powering down CPU cores, so just wait in idle loop. Signed-off-by: Brian Ma Signed-off-by: William A. Kennington III --- arch/arm/mach-npcm/platsmp.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/arm/mach-npcm/platsmp.c b/arch/arm/mach-npcm/platsmp.c index 41891d3aa124..6cc7b5894f08 100644 --- a/arch/arm/mach-npcm/platsmp.c +++ b/arch/arm/mach-npcm/platsmp.c @@ -69,10 +69,27 @@ static void __init npcm7xx_smp_prepare_cpus(unsigned int max_cpus) iounmap(scu_base); } +#ifdef CONFIG_HOTPLUG_CPU +static void npcm7xx_cpu_die(unsigned int cpu) +{ + while (1) + cpu_do_idle(); +} + +static int npcm7xx_cpu_kill(unsigned int l_cpu) +{ + return 1; +} +#endif + static struct smp_operations npcm7xx_smp_ops __initdata = { .smp_prepare_cpus = npcm7xx_smp_prepare_cpus, .smp_boot_secondary = npcm7xx_smp_boot_secondary, +#ifdef CONFIG_HOTPLUG_CPU + .cpu_die = npcm7xx_cpu_die, + .cpu_kill = npcm7xx_cpu_kill, +#endif }; CPU_METHOD_OF_DECLARE(npcm7xx_smp, "nuvoton,npcm750-smp", &npcm7xx_smp_ops); -- 2.42.0.820.g83a721a137-goog From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 585EBC4332F for ; Thu, 2 Nov 2023 00:54:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Bs+ldj9v6r323uCfy+heHXE3ZdvM+YtHSFt4WfKeWUc=; b=ZpszxwEXXE8CJU 3+fqKJl5sDyW/nAmXsjU2y3z8mvFgaOgQ9oLQbPkGaQuZrosgJzVlG62QoZyjuX61oTi3QHq7EbDz 0e53gq5YQhEajwlc2bwbUoVmRn9SyVpy+rf6LEyupEUZdi/JXwY3mmTN8doGBe3iY1E4KAcZy7uAI CvqT77A8VrQFn2Yx7tonRWVFziaQqewJqZg/nI7/m0BxZ1alwl7FUzDmxIu+3Skk8JLRJs4cE0mFF n0hJOIE5IJvTa7l1DPhjJzleS9Hr3IpJkv/VftSVn7CWNXOyToXwTr/oMF1xqdNIyklkj0Whw4B1o fsqh76sS0NIEP3uWLzgg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qyLxi-008R0K-0G; Thu, 02 Nov 2023 00:53:30 +0000 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qyLxf-008Qzd-0s for linux-arm-kernel@lists.infradead.org; Thu, 02 Nov 2023 00:53:29 +0000 Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-6b44befac59so1240800b3a.0 for ; Wed, 01 Nov 2023 17:53:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wkennington-com.20230601.gappssmtp.com; s=20230601; t=1698886404; x=1699491204; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xEH7jgDGNi0IK8LdwBqEJDaZ1nOxkEDv/a4hPy0Cfvs=; b=kPsCjZus80X68W2Ex09HgZq5jYvhQTxgoo1DgEyc/lJZUdjiJt2j9tNB8vbm2ApkGy BBNLDOZL1v4iid/l2ilgrG5GT/sr8gnJIVL8pGB0zTuZpDgLgO8MOzTKSiiKoRV5UukI i4AArPsQOW/n/Wcd3feGiXs89IXoW+Z62DFGMF1Knvi+s6X51k5KZJnML9xZ++vNAgkj acZ7qslZyppMMrZ/d6DLFYfFCM9dSOp/P2jBWmSHSl9HVZZdj2RtbDQ5ondqMCNC1Vc7 NTTUD4Z5OlGfASxVrQa3tLbLkIGFm29BNP2nRJOI3xa1eNBXd9HHFFEIpmtaMjTBeugC hatA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698886404; x=1699491204; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xEH7jgDGNi0IK8LdwBqEJDaZ1nOxkEDv/a4hPy0Cfvs=; b=reFK7toRH8Ww5WzxiiNkTp7cTVsb2/ym9O8JC+XP4VQvBcuwEAx4pT2Pj/aZpXtAlb z64kar3voG8AjvRuYCL/qU7CRRhPKL13wxbMEKXyFHGa4wWmP7FPfY20oiMyWiFqVSL3 tLjb5H4Bn+/AtY98bCC+KdWvPUMT2ncMzECwMXYZPGrxe8mImjlEhyLr2iMp5Evmdbpg GaHiY443xswbUks8P700VQ/jJB3vJFLE9Fl8jfUTok/HnmsChOcoEBbrqWhSoj40/P8d WrTFvbooyoeuptc3PNs4prVJBuWu6VgD0mmbsd//mECpddR3kOiVlsCwF+jNF9FdOHkp 3N/w== X-Gm-Message-State: AOJu0Yyum9rvhmBrt2945lRNyGi9FuUc8mCNslSHNAK+WLrvFyVpn1FH /GMEiQdxalsqOtur2xgLLPajhw== X-Google-Smtp-Source: AGHT+IGSWXVKZ/Zqa3AgiAFvgieUYgWobPDkFn/aMZfv3jNm/vUrhTJokjt51yoYFUCRMB0d+zLJXw== X-Received: by 2002:a05:6a20:1443:b0:17e:aa00:ca62 with SMTP id a3-20020a056a20144300b0017eaa00ca62mr10468558pzi.17.1698886404340; Wed, 01 Nov 2023 17:53:24 -0700 (PDT) Received: from wak-linux.svl.corp.google.com ([2620:15c:2a3:200:8eb3:7c85:29f7:efa1]) by smtp.gmail.com with ESMTPSA id n20-20020aa78a54000000b006c2d53e0b5fsm1768083pfa.57.2023.11.01.17.53.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 17:53:23 -0700 (PDT) From: william@wkennington.com To: tmaimon77@gmail.com, tali.perry1@gmail.com, avifishman70@gmail.com Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org, Brian Ma , "William A . Kennington III" Subject: [PATCH RESEND] ARM: npcm: Add CPU hotplug callbacks for kexec support Date: Wed, 1 Nov 2023 17:53:21 -0700 Message-ID: <20231102005321.1303809-1-william@wkennington.com> X-Mailer: git-send-email 2.42.0.820.g83a721a137-goog In-Reply-To: <20231102002453.1299195-1-william@wkennington.com> References: <20231102002453.1299195-1-william@wkennington.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231101_175327_309552_51EBF7C5 X-CRM114-Status: GOOD ( 11.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Brian Ma Add callbacks required for kexec to function. The NPCM7xx/NPCN8xx does not expose controls for powering down CPU cores, so just wait in idle loop. Signed-off-by: Brian Ma Signed-off-by: William A. Kennington III --- arch/arm/mach-npcm/platsmp.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/arm/mach-npcm/platsmp.c b/arch/arm/mach-npcm/platsmp.c index 41891d3aa124..6cc7b5894f08 100644 --- a/arch/arm/mach-npcm/platsmp.c +++ b/arch/arm/mach-npcm/platsmp.c @@ -69,10 +69,27 @@ static void __init npcm7xx_smp_prepare_cpus(unsigned int max_cpus) iounmap(scu_base); } +#ifdef CONFIG_HOTPLUG_CPU +static void npcm7xx_cpu_die(unsigned int cpu) +{ + while (1) + cpu_do_idle(); +} + +static int npcm7xx_cpu_kill(unsigned int l_cpu) +{ + return 1; +} +#endif + static struct smp_operations npcm7xx_smp_ops __initdata = { .smp_prepare_cpus = npcm7xx_smp_prepare_cpus, .smp_boot_secondary = npcm7xx_smp_boot_secondary, +#ifdef CONFIG_HOTPLUG_CPU + .cpu_die = npcm7xx_cpu_die, + .cpu_kill = npcm7xx_cpu_kill, +#endif }; CPU_METHOD_OF_DECLARE(npcm7xx_smp, "nuvoton,npcm750-smp", &npcm7xx_smp_ops); -- 2.42.0.820.g83a721a137-goog _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 444CDC4332F for ; Thu, 2 Nov 2023 00:53:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234755AbjKBAx2 (ORCPT ); Wed, 1 Nov 2023 20:53:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230395AbjKBAx1 (ORCPT ); Wed, 1 Nov 2023 20:53:27 -0400 Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D7065101 for ; Wed, 1 Nov 2023 17:53:24 -0700 (PDT) Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-6bf03b98b9bso1227489b3a.1 for ; Wed, 01 Nov 2023 17:53:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wkennington-com.20230601.gappssmtp.com; s=20230601; t=1698886404; x=1699491204; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xEH7jgDGNi0IK8LdwBqEJDaZ1nOxkEDv/a4hPy0Cfvs=; b=dWErfzAui2cK+FM9ru4SXx8kLKUZL0aQCsBU0VSnNXajFadcyUlstnSpNB8djE/49o jSJtnAYwnEvUPLpYSk0BIzORQvdjMDODjbQEYg96MemdRXS6FKjhJ49xyaUjkaoZvDVG BpQxLAH6b4eocpegFF6zjctjXOrSEF7i/4jRkQJzi4e4RFHfC8BO/vAhkh7v5bv/GTEs jnKEuvP9H0O12RX+Ra1i0/a3xNYfnfWSM+tbS2kgZPVXPgIzbYXUt/Uo7Iv18Qg65mIr cmcLntbYrHzRsV/YdyyTlYBOjyVZNA2H8zBH79O3gv5rVfb8ZU/Bf+tSRKIIyGLeYswV A//g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698886404; x=1699491204; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xEH7jgDGNi0IK8LdwBqEJDaZ1nOxkEDv/a4hPy0Cfvs=; b=RXrYvIWDGtqiYM869vtM4mUza/QJ8pfn9xrUxdi1avSTaXHYImIOl4uSd4yHaagq1+ F9IGnJ8CpIW5zqIKtWVeqpGsDL4q1VYNKe5zIVDA4DcfzyEllhc2fRrMO1UbMHGH61gM pcYd7N6PPh29yZxGFhN5escajStsZvp9EQU/QIzgBTXiw7rqMyrAMiJBqiIlW+K03fD8 csU/8zidZ61vmJDBQeDnl1bTp+oeBs+mID2wWTBc6FO1dNY59lnVYsWlxG2kUTiA1OVi E7XBVvE6LM5iS9zqjuP6Zi9eurDrHnwl5RRkA7O6z/06S54ifgM/BiEu9iVxgosc4rqA b/tw== X-Gm-Message-State: AOJu0YytJ5Nf8oovRPUmbxci+fCo4y05tEJbUj3bevqRPD0vMlac6RfZ BlX6bMD5Omo25dUdS0cQ/DdUHw== X-Google-Smtp-Source: AGHT+IGSWXVKZ/Zqa3AgiAFvgieUYgWobPDkFn/aMZfv3jNm/vUrhTJokjt51yoYFUCRMB0d+zLJXw== X-Received: by 2002:a05:6a20:1443:b0:17e:aa00:ca62 with SMTP id a3-20020a056a20144300b0017eaa00ca62mr10468558pzi.17.1698886404340; Wed, 01 Nov 2023 17:53:24 -0700 (PDT) Received: from wak-linux.svl.corp.google.com ([2620:15c:2a3:200:8eb3:7c85:29f7:efa1]) by smtp.gmail.com with ESMTPSA id n20-20020aa78a54000000b006c2d53e0b5fsm1768083pfa.57.2023.11.01.17.53.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 17:53:23 -0700 (PDT) From: william@wkennington.com To: tmaimon77@gmail.com, tali.perry1@gmail.com, avifishman70@gmail.com Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org, Brian Ma , "William A . Kennington III" Subject: [PATCH RESEND] ARM: npcm: Add CPU hotplug callbacks for kexec support Date: Wed, 1 Nov 2023 17:53:21 -0700 Message-ID: <20231102005321.1303809-1-william@wkennington.com> X-Mailer: git-send-email 2.42.0.820.g83a721a137-goog In-Reply-To: <20231102002453.1299195-1-william@wkennington.com> References: <20231102002453.1299195-1-william@wkennington.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Brian Ma Add callbacks required for kexec to function. The NPCM7xx/NPCN8xx does not expose controls for powering down CPU cores, so just wait in idle loop. Signed-off-by: Brian Ma Signed-off-by: William A. Kennington III --- arch/arm/mach-npcm/platsmp.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/arch/arm/mach-npcm/platsmp.c b/arch/arm/mach-npcm/platsmp.c index 41891d3aa124..6cc7b5894f08 100644 --- a/arch/arm/mach-npcm/platsmp.c +++ b/arch/arm/mach-npcm/platsmp.c @@ -69,10 +69,27 @@ static void __init npcm7xx_smp_prepare_cpus(unsigned int max_cpus) iounmap(scu_base); } +#ifdef CONFIG_HOTPLUG_CPU +static void npcm7xx_cpu_die(unsigned int cpu) +{ + while (1) + cpu_do_idle(); +} + +static int npcm7xx_cpu_kill(unsigned int l_cpu) +{ + return 1; +} +#endif + static struct smp_operations npcm7xx_smp_ops __initdata = { .smp_prepare_cpus = npcm7xx_smp_prepare_cpus, .smp_boot_secondary = npcm7xx_smp_boot_secondary, +#ifdef CONFIG_HOTPLUG_CPU + .cpu_die = npcm7xx_cpu_die, + .cpu_kill = npcm7xx_cpu_kill, +#endif }; CPU_METHOD_OF_DECLARE(npcm7xx_smp, "nuvoton,npcm750-smp", &npcm7xx_smp_ops); -- 2.42.0.820.g83a721a137-goog