Message ID | 20230504185937.584277566@linutronix.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:3046:b0:115:7a1d:dabb with SMTP id p6csp523412rwl; Thu, 4 May 2023 12:25:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7TLjNf+rYHwTEn0NGdTn5QGFZf+LVUD2Y7GCxPtz55+tCK49Cr0+tzCznYxdpPeyhTQlnA X-Received: by 2002:a17:903:2349:b0:1a9:581d:3efb with SMTP id c9-20020a170903234900b001a9581d3efbmr5701538plh.6.1683228321936; Thu, 04 May 2023 12:25:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683228321; cv=none; d=google.com; s=arc-20160816; b=sU0IJIS6fL2qU7VhMCATM/32sDaQbDVxt5sF+q1uMwcoSSLCoyrtP9lP/aAVnfvjrK iqCyQdrAQXq2+cHouOHwlUcj/YLdkNB5CwMJR++WXeoZvPbO9pHSK9VYeZ4fV4TgqZoF aNhI1prlf1I1hBxPqQN7kkIwLnVd+T+GMJinUJyU1ZTqghtHNw/Nm9cYP/aOfwJGdOze X0OSyXj24kmU12TOpl/pvjrXHuPLR9O3fDdVRrzrjFqsjWF7GOfdjicMKZ/4ALi2YRB4 PJtX28Epd140QB8thBBB01/+78rXZr4QHXarl2tRrjNKeap1w5a3VljbVHSsxYrQdbZf c2Jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:mime-version:references:subject:cc:to:from :dkim-signature:dkim-signature:message-id; bh=wTNocxrIkrZERW1CgHrOxDfBd1NuTsgJS4AJ8mYPyyQ=; b=MQDmaD08cerJvDUdb/MA0tIKP1gZk91xkbJ525I4imAKQdy9HAQJ0UNKTCuCeY+Cro IvCpwzdZ0IbtIWEibCTKppm4RHKdlsun7djG0yoNTekf3PVEPcy8BMAivR+AjSOFlFHT O3c25ZwZk2SeL+bUK/uRYa1nXC4xIkyvouUdw4gzyzAjd4ZzRLgsJRi/Gz45fYVRPh1Z 7ykxVUpJ+xtPxxXv0v84M0VS13WJL+u+HN4D53so3cMboWs72mNQfOZnP3JuT3DnHkNq cCV/mTyzJi/gCXGVBkIZFgD8V0hl184Sa3oUjf8lcvhTdpBEc8eT1sYaj0bLEp9obc6y CIhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Mi46V8eH; dkim=neutral (no key) header.i=@linutronix.de header.b=4wN87waB; 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 x65-20020a17090a6c4700b0024e0f3308a0si4773175pjj.32.2023.05.04.12.25.09; Thu, 04 May 2023 12:25:21 -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=Mi46V8eH; dkim=neutral (no key) header.i=@linutronix.de header.b=4wN87waB; 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 S230400AbjEDTFW (ORCPT <rfc822;b08248@gmail.com> + 99 others); Thu, 4 May 2023 15:05:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230302AbjEDTED (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 4 May 2023 15:04:03 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4B939EFF; Thu, 4 May 2023 12:03:11 -0700 (PDT) Message-ID: <20230504185937.584277566@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1683226956; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=wTNocxrIkrZERW1CgHrOxDfBd1NuTsgJS4AJ8mYPyyQ=; b=Mi46V8eHgoltNQxPJmnbu9i1N0WqNbjlBS5gXzUQdYuzDGSlRAwFIn42Fl4qTDQ9tpMOpi 9pMD9eqFIhnqecwmKQOcPdssVAfxr98Ufnj8kPfEnna6Jg1FJPiFDXjB5qyYPeKOEBzagH d9bGKI26ZnIO1dmzo62pzKDwF621ZdxsTsNqH8faar1/6RQwLMfz9EzVFpDrERESz08UzT RKiX6TWVgbEvDpDMLz5ptMwZldZAxWrvz613h9Whj+rnlmmRseJTa9scp2XVHyZRgXYYx9 W9B8x3jWUGKujnEYbsdrx7KzjQ+swT2YMyT9UZUBAmo9KzwEdkHLM2GZWs0XOQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1683226956; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=wTNocxrIkrZERW1CgHrOxDfBd1NuTsgJS4AJ8mYPyyQ=; b=4wN87waBqOWq8wTSM62nHwIaB3nHKF5Odvy83jhqjVG4mxeKOSh6qxwJk2zaru4HlpMduu ieIS3XjNdw5x/MBw== From: Thomas Gleixner <tglx@linutronix.de> To: LKML <linux-kernel@vger.kernel.org> Cc: x86@kernel.org, David Woodhouse <dwmw2@infradead.org>, Andrew Cooper <andrew.cooper3@citrix.com>, Brian Gerst <brgerst@gmail.com>, Arjan van de Veen <arjan@linux.intel.com>, Paolo Bonzini <pbonzini@redhat.com>, Paul McKenney <paulmck@kernel.org>, Tom Lendacky <thomas.lendacky@amd.com>, Sean Christopherson <seanjc@google.com>, Oleksandr Natalenko <oleksandr@natalenko.name>, Paul Menzel <pmenzel@molgen.mpg.de>, "Guilherme G. Piccoli" <gpiccoli@igalia.com>, Piotr Gorski <lucjan.lucjanov@gmail.com>, Usama Arif <usama.arif@bytedance.com>, Juergen Gross <jgross@suse.com>, Boris Ostrovsky <boris.ostrovsky@oracle.com>, xen-devel@lists.xenproject.org, Russell King <linux@armlinux.org.uk>, Arnd Bergmann <arnd@arndb.de>, linux-arm-kernel@lists.infradead.org, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, Guo Ren <guoren@kernel.org>, linux-csky@vger.kernel.org, Thomas Bogendoerfer <tsbogend@alpha.franken.de>, linux-mips@vger.kernel.org, "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>, Helge Deller <deller@gmx.de>, linux-parisc@vger.kernel.org, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, linux-riscv@lists.infradead.org, Mark Rutland <mark.rutland@arm.com>, Sabin Rapan <sabrapan@amazon.com>, "Michael Kelley (LINUX)" <mikelley@microsoft.com> Subject: [patch V2 23/38] csky/smp: Switch to hotplug core state synchronization References: <20230504185733.126511787@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Date: Thu, 4 May 2023 21:02:35 +0200 (CEST) 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764992821267887306?= X-GMAIL-MSGID: =?utf-8?q?1764992821267887306?= |
Series |
cpu/hotplug, x86: Reworked parallel CPU bringup
|
|
Commit Message
Thomas Gleixner
May 4, 2023, 7:02 p.m. UTC
From: Thomas Gleixner <tglx@linutronix.de> Switch to the CPU hotplug core state tracking and synchronization mechanim. No functional change intended. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Guo Ren <guoren@kernel.org> Cc: linux-csky@vger.kernel.org --- arch/csky/Kconfig | 1 + arch/csky/include/asm/smp.h | 2 +- arch/csky/kernel/smp.c | 8 ++------ 3 files changed, 4 insertions(+), 7 deletions(-) ---
--- a/arch/csky/Kconfig +++ b/arch/csky/Kconfig @@ -96,6 +96,7 @@ config CSKY select HAVE_REGS_AND_STACK_ACCESS_API select HAVE_STACKPROTECTOR select HAVE_SYSCALL_TRACEPOINTS + select HOTPLUG_CORE_SYNC_DEAD if HOTPLUG_CPU select MAY_HAVE_SPARSE_IRQ select MODULES_USE_ELF_RELA if MODULES select OF --- a/arch/csky/include/asm/smp.h +++ b/arch/csky/include/asm/smp.h @@ -23,7 +23,7 @@ void __init set_send_ipi(void (*func)(co int __cpu_disable(void); -void __cpu_die(unsigned int cpu); +static inline void __cpu_die(unsigned int cpu) { } #endif /* CONFIG_SMP */ --- a/arch/csky/kernel/smp.c +++ b/arch/csky/kernel/smp.c @@ -291,12 +291,8 @@ int __cpu_disable(void) return 0; } -void __cpu_die(unsigned int cpu) +void arch_cpuhp_cleanup_dead_cpu(unsigned int cpu) { - if (!cpu_wait_death(cpu, 5)) { - pr_crit("CPU%u: shutdown failed\n", cpu); - return; - } pr_notice("CPU%u: shutdown\n", cpu); } @@ -304,7 +300,7 @@ void __noreturn arch_cpu_idle_dead(void) { idle_task_exit(); - cpu_report_death(); + cpuhp_ap_report_dead(); while (!secondary_stack) arch_cpu_idle();