Received: by 2002:a05:7412:b795:b0:e2:908c:2ebd with SMTP id iv21csp76745rdb; Wed, 1 Nov 2023 17:53:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGWTjdUaRSb3zpTMeOAZKJD4HqXmtvHiNuouv4He4smUdi8FbnWo7hwBeLojmH6VsQQl4FK X-Received: by 2002:a05:6a20:7492:b0:181:63e5:d500 with SMTP id p18-20020a056a20749200b0018163e5d500mr3569670pzd.6.1698886410277; Wed, 01 Nov 2023 17:53:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698886410; cv=none; d=google.com; s=arc-20160816; b=HZSO/CIn5dEsGZ5h6AAYlKBGkS3c6EN3v5wNWEYvLIyiMHTAUslC8AdlyvylO3Tn0C 28Hh6JLLgUunbmd5ne9dijXTDUkll4tGIqbEsWY9RRWBffdAiiHRaeLUGGMML+rb+gea BSqKYHzy05LtCVPB2Z9r4cs4T3GrMoZNkuN887FUXzTMCBX3MizPhQMoVNTtL8tjmRc9 CJQtmc11ZzdDb0yrLzhtE/nToFt3TK0Zyl0wc7sNkMDd0B/PMrrQ2iw3GtLdAlyOt3Ql +SRvOjNfMrnmPH1KypilO1SR7RGs98t+Dn0NN5Yk2yB4lt5E4wKo4Yva7EQUFWnbe69i T9Pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=xEH7jgDGNi0IK8LdwBqEJDaZ1nOxkEDv/a4hPy0Cfvs=; fh=myLRlYVs552h3L1upkWYcpdFL2jH0+xAxYLaFpiG/fc=; b=euOmSrIOjuMhtMM3px642774LhbtekSwAdogjq5bxpFngdYdrqQIapoiLpqqZsXVAh r+c0fHk1vkVtZHYqAsm0GbIDS5HVKBoB+JfTZQyqXklUt6Z+apVyNnHkdFRFgvtCGuN1 upF+vkKZS421UMsVr5q0WuFyHT92Wk8naAUfMFXJPk85qzizVGiWYqkWJEqbOOxz/xQV epPY9IOAL5LPQaeReKS4cWJkC4TKaiWT4ssBuU35bSRepG7JAGI9CxTBg+xnvjbF77HM 3DuBo6glZPnWOiDkJaMUl5xMGPVliGb6kDynmsj00q06NFmXspXVg5u5cmrNqVKihZMt yjsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@wkennington-com.20230601.gappssmtp.com header.s=20230601 header.b=dWErfzAu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id bn21-20020a056a02031500b0056f8fdb4430si1194933pgb.893.2023.11.01.17.53.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 17:53:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@wkennington-com.20230601.gappssmtp.com header.s=20230601 header.b=dWErfzAu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 616D881A335B; Wed, 1 Nov 2023 17:53:29 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234541AbjKBAx2 (ORCPT + 99 others); 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-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 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 01 Nov 2023 17:53:29 -0700 (PDT) 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