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 38A2EC7EE26 for ; Tue, 9 May 2023 10:50:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235311AbjEIKu2 (ORCPT ); Tue, 9 May 2023 06:50:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234584AbjEIKu1 (ORCPT ); Tue, 9 May 2023 06:50:27 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 655D519A1; Tue, 9 May 2023 03:50:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=8P7wZHGsQrdcODAexcyC5HmNjq7UyxY+a/r9BHYLyPc=; b=LZcrlvoWgQ+AuQIzSKoAbD0LMI b6BHDQIQNgv1TgrA6LONLCnHui8tdPe3S7PqOkv3sYRCrscZ+XMID94S8/TszoyfPgDPSAtQ+UTEb h4a3MCLNpB/XRmwM0n8A1ogc7k4Bpmn3jlbth/DX7axlvB31Yl6fCYMH6bJHqtyrRocreKHmePIjY oGkzR9e3lZU/07+fFI0IW2dT3qtKo/wVGsmWPmVsGg8bTZtIl1kVM5ehFmk3qTLmzEE7S3RcUzrrq Hzf61paJrYytBCotmCbO9yxt1Ffzzoe6S7f87moZIuIvJFRKis9FFf32XMpNwcYOWQPfdMZxjOYjd W8dWFyOA==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1pwKuD-0066WL-1Q; Tue, 09 May 2023 10:49:19 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id C2CAA300023; Tue, 9 May 2023 12:49:15 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id A111020B0882C; Tue, 9 May 2023 12:49:15 +0200 (CEST) Date: Tue, 9 May 2023 12:49:15 +0200 From: Peter Zijlstra To: Thomas Gleixner Cc: LKML , x86@kernel.org, David Woodhouse , Andrew Cooper , Brian Gerst , Arjan van de Veen , Paolo Bonzini , Paul McKenney , Tom Lendacky , Sean Christopherson , Oleksandr Natalenko , Paul Menzel , "Guilherme G. Piccoli" , Piotr Gorski , Usama Arif , Juergen Gross , Boris Ostrovsky , xen-devel@lists.xenproject.org, Russell King , Arnd Bergmann , linux-arm-kernel@lists.infradead.org, Catalin Marinas , Will Deacon , Guo Ren , linux-csky@vger.kernel.org, Thomas Bogendoerfer , linux-mips@vger.kernel.org, "James E.J. Bottomley" , Helge Deller , linux-parisc@vger.kernel.org, Paul Walmsley , Palmer Dabbelt , linux-riscv@lists.infradead.org, Mark Rutland , Sabin Rapan , "Michael Kelley (LINUX)" Subject: Re: [patch v3 13/36] x86/smpboot: Remove cpu_callin_mask Message-ID: <20230509104915.GX83892@hirez.programming.kicks-ass.net> References: <20230508181633.089804905@linutronix.de> <20230508185217.956149661@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230508185217.956149661@linutronix.de> Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org On Mon, May 08, 2023 at 09:43:47PM +0200, Thomas Gleixner wrote: > --- a/arch/x86/kernel/smpboot.c > +++ b/arch/x86/kernel/smpboot.c > @@ -167,21 +166,16 @@ static inline void smpboot_restore_warm_ > */ > static void smp_callin(void) > { > - int cpuid; > + int cpuid = smp_processor_id(); > > /* > * If waken up by an INIT in an 82489DX configuration > - * cpu_callout_mask guarantees we don't get here before > - * an INIT_deassert IPI reaches our local APIC, so it is > - * now safe to touch our local APIC. > - */ > - cpuid = smp_processor_id(); > - > - /* > - * the boot CPU has finished the init stage and is spinning > - * on callin_map until we finish. We are free to set up this > - * CPU, first the APIC. (this is probably redundant on most > - * boards) > + * cpu_callout_mask guarantees we don't get here before an > + * INIT_deassert IPI reaches our local APIC, so it is now safe to > + * touch our local APIC. > + * > + * Set up this CPU, first the APIC, which is probably redundant on > + * most boards. > */ > apic_ap_setup(); > > @@ -192,7 +186,7 @@ static void smp_callin(void) > * The topology information must be up to date before > * calibrate_delay() and notify_cpu_starting(). > */ > - set_cpu_sibling_map(raw_smp_processor_id()); > + set_cpu_sibling_map(cpuid); > > ap_init_aperfmperf(); > > @@ -205,11 +199,6 @@ static void smp_callin(void) > * state (CPUHP_ONLINE in the case of serial bringup). > */ > notify_cpu_starting(cpuid); > - > - /* > - * Allow the master to continue. > - */ > - cpumask_set_cpu(cpuid, cpu_callin_mask); > } > > static void ap_calibrate_delay(void) > @@ -268,11 +257,6 @@ static void notrace start_secondary(void > rcu_cpu_starting(raw_smp_processor_id()); > x86_cpuinit.early_percpu_clock_init(); > > - /* > - * Sync point with wait_cpu_callin(). The AP doesn't wait here > - * but just sets the bit to let the controlling CPU (BSP) know that > - * it's got this far. > - */ > smp_callin(); > > /* Otherwise gcc will move up smp_processor_id() before cpu_init() */ Good riddance to that mask; however is smp_callin() still an appropriate name for that function? Would smp_starting() -- seeing how this kicks of CPU_STARTING not be a better name?