From patchwork Tue May 16 09:09:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 94557 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp283972vqo; Tue, 16 May 2023 02:12:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ525IXiWIXsXyq3KdvFRqoa9+uEGVbgkglEZIPTTBSaXcp3DTLNVUopRob4zgDpwpg0bxDc X-Received: by 2002:a17:90a:e613:b0:252:7c76:ba7c with SMTP id j19-20020a17090ae61300b002527c76ba7cmr20492865pjy.24.1684228334934; Tue, 16 May 2023 02:12:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684228334; cv=none; d=google.com; s=arc-20160816; b=hD3VKuL3ZzU0ozY1eve+B7BHMzDEBkXPbvEIkQSKAXXtL4b6oCX7XupijUKXAeRyxt Msmiyo7+pm2hK3rGSzhVI78GXLvHARP1WvU0dXkfULIUlbzbVm3T3qHsV95v5zPPa9+2 /SP//cT+8pqVDrfVj9MoGwY9taVIlGneoRs4pb2Yrb7xAGcuJFNY0sbgjtkhworl7nyb I/yw40b9uBZ6rv3S8r4I+C2n9OgeR0DkpkRK13ixogMNWzA4OVHgDWbiAz9tNrEfWlE2 eb0RgtiPQnnELWBOFTIUVuklzaMuPAbJdpORJMy2/5Y4FgMpQ4M9VZaILkg8CmWcx9GW qT8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=i1JV2VttK9sYAaqITq7ZS8l//oZbDX+nsKl/YA+dOtc=; b=FCCNrOdko3iltEBR6pyPu2ACAI+8Wi2OGF18hmlmbuBD+hYUlW+jMNnzRIRGQFB+B/ xiSGvjCGNQbOHMqp+X7QrcsxkLS6ADGCfqLuxrXCpynWRhhiGbsjDo7FSNoJanmtd17A EqeIANZ7GvL+Yc7yffjOy7btaMD1S9dR19aZVx8FtnCd6YNTixW2bOGj8q1zkRatsiUi BYZLXxmx0+6KzczqNZfq4dTcyCo8GWE9v4IbFAeda/RDYIqgboHiMpHP+taVk5HuGP4t Yc2itwtfFYC4Ntfjh5RLf/WWGM/QvY9Mbw/Lva+PE4VrMcCfV8U9kZt321LB7RFLO0Kx SMhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=bo8SxMJT; dkim=neutral (no key) header.i=@linutronix.de header.b=COhnqNys; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bw11-20020a17090af60b00b0024df598ed11si1235299pjb.188.2023.05.16.02.11.59; Tue, 16 May 2023 02:12:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=bo8SxMJT; dkim=neutral (no key) header.i=@linutronix.de header.b=COhnqNys; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231960AbjEPJKu (ORCPT + 99 others); Tue, 16 May 2023 05:10:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46108 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231799AbjEPJKE (ORCPT ); Tue, 16 May 2023 05:10:04 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 298674C04; Tue, 16 May 2023 02:10:01 -0700 (PDT) Date: Tue, 16 May 2023 09:09:56 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1684228197; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=i1JV2VttK9sYAaqITq7ZS8l//oZbDX+nsKl/YA+dOtc=; b=bo8SxMJT56zdQWUVIfWGqtFgsHUnkPNXCTIKMIbH+QHOA4ygIuIGzxCfR3lJcv6HtmkkT9 k8eUrXcPlaWXhbJWqmLWjAiDugsCN7AYsHp1pu+q5JGCu0dTfBJi+Dyo7SV22+KIf/QmNf 2GIoV72yuEnHfQtfwcven7Y1uira7Vkow9abLOAAUNs+M7wpdwHSVezvpzc7qg8gFXclTm 1P3rRrX9UQmbSveZ/rIz4tQub8qP0SbyE5DEnuoMxBIre/QSpMjSTvVW9JwNJ/6SRyO62I OaWPmc1743G++O1yPjQ0vBgKTAi2aZ23WJeDubz7wjssF4iET3jMp8A5CahbtQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1684228197; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=i1JV2VttK9sYAaqITq7ZS8l//oZbDX+nsKl/YA+dOtc=; b=COhnqNysLHyeHEZnBREQQQ5NMyk8ru/bnNE9uy79C40WKhPUBRiSnS6DIgq0PIM+G4AmyM 5bpqorlaa7OphwDA== From: "tip-bot2 for Thomas Gleixner" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: smp/core] parisc: Switch to hotplug core state synchronization Cc: Thomas Gleixner , "Peter Zijlstra (Intel)" , Michael Kelley , Oleksandr Natalenko , Helge Deller , "Guilherme G. Piccoli" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230512205256.859920443@linutronix.de> References: <20230512205256.859920443@linutronix.de> MIME-Version: 1.0 Message-ID: <168422819654.404.3463481491264474300.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765724781866515439?= X-GMAIL-MSGID: =?utf-8?q?1766041410638293762?= The following commit has been merged into the smp/core branch of tip: Commit-ID: 51e0efe1f26ec900ad80025b9faa2bec9575f1b2 Gitweb: https://git.kernel.org/tip/51e0efe1f26ec900ad80025b9faa2bec9575f1b2 Author: Thomas Gleixner AuthorDate: Fri, 12 May 2023 23:07:38 +02:00 Committer: Peter Zijlstra CommitterDate: Mon, 15 May 2023 13:44:59 +02:00 parisc: Switch to hotplug core state synchronization Switch to the CPU hotplug core state tracking and synchronization mechanim. No functional change intended. Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra (Intel) Tested-by: Michael Kelley Tested-by: Oleksandr Natalenko Tested-by: Helge Deller # parisc Tested-by: Guilherme G. Piccoli # Steam Deck Link: https://lore.kernel.org/r/20230512205256.859920443@linutronix.de --- arch/parisc/Kconfig | 1 + arch/parisc/kernel/process.c | 4 ++-- arch/parisc/kernel/smp.c | 7 +++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/parisc/Kconfig b/arch/parisc/Kconfig index 466a255..67a3f98 100644 --- a/arch/parisc/Kconfig +++ b/arch/parisc/Kconfig @@ -57,6 +57,7 @@ config PARISC select HAVE_ARCH_SECCOMP_FILTER select HAVE_ARCH_TRACEHOOK select HAVE_REGS_AND_STACK_ACCESS_API + select HOTPLUG_CORE_SYNC_DEAD if HOTPLUG_CPU select GENERIC_SCHED_CLOCK select GENERIC_IRQ_MIGRATION if SMP select HAVE_UNSTABLE_SCHED_CLOCK if SMP diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c index 97c6f87..66f6543 100644 --- a/arch/parisc/kernel/process.c +++ b/arch/parisc/kernel/process.c @@ -166,8 +166,8 @@ void __noreturn arch_cpu_idle_dead(void) local_irq_disable(); - /* Tell __cpu_die() that this CPU is now safe to dispose of. */ - (void)cpu_report_death(); + /* Tell the core that this CPU is now safe to dispose of. */ + cpuhp_ap_report_dead(); /* Ensure that the cache lines are written out. */ flush_cache_all_local(); diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c index b7fc859..6b6eaa4 100644 --- a/arch/parisc/kernel/smp.c +++ b/arch/parisc/kernel/smp.c @@ -500,11 +500,10 @@ int __cpu_disable(void) void __cpu_die(unsigned int cpu) { pdc_cpu_rendezvous_lock(); +} - if (!cpu_wait_death(cpu, 5)) { - pr_crit("CPU%u: cpu didn't die\n", cpu); - return; - } +void arch_cpuhp_cleanup_dead_cpu(unsigned int cpu) +{ pr_info("CPU%u: is shutting down\n", cpu); /* set task's state to interruptible sleep */