Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp5625623rwr; Tue, 9 May 2023 04:19:18 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7esooSNsT4C8LAf1aPK6oVE8iq888IxsnLaMZJXtVJJpty5trteqLnsdrG7eRGw2LnVMW2 X-Received: by 2002:a05:6a21:7890:b0:f5:39bd:3023 with SMTP id bf16-20020a056a21789000b000f539bd3023mr17960486pzc.26.1683631158419; Tue, 09 May 2023 04:19:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683631158; cv=none; d=google.com; s=arc-20160816; b=nTuZiTahTPdIqMK0XMIzcC6CvAr8P0OORHOGmTJBB4O+GKk3985kppScy+Zv5PYL5K kSFbvJRoVh6NokNvzOWf+n2ltsaPSOrcZV5ydYwX2aYj7cdxl3ai3Y4yqJT/b4f0ezss /oWHyQuxxw9q4tolDypS2eKHQm4I/4o+FAu4HgFKITNB9AJFsqqiIkxN03ialdhMg3fg EMkxSdKEfKmVmssGGjfZFTiqiOsczRlf/ZNxU9FuY8smEC2KfuxBba0rxXgR89cKhV9Z zHXeeZ1fFoakffV7tvM4mWBWII/78Kw8ok54nposYrIYOBqmd/7ZzAHsjZoJOLYEV+IE jiJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=8P7wZHGsQrdcODAexcyC5HmNjq7UyxY+a/r9BHYLyPc=; b=qMGBz/Jci0R66cCVhFUMz2R/xrELEniCzq8nKpHXKIgbMj/Pgd/H8xCMIPofQ5KWht epVdTyKAwBePTm9WZ0iaEiIbN+aoDyOpMgmDxk2cj+66f9vP0azfXmcVSqCTqvZMqG06 NYCqnotjAByvK1uQqQYRG7plyy5UyNOQtU1vvh6opXCtrmwTO4eNzHVza7t5J11xMh0Y IdvBxUO15hbyoqHs1uO2b5Awzr7LXv2PtlFoBaFxXR6XqkIPExvJBGXPFSKc5ylg8vSS otY71VLc2bJSkwlAx7r+REKimBqv3bgsTO4sV9MDQEPiLE8OlzK75EMfzaHnar3FkRIL 6Ntw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=LZcrlvoW; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c129-20020a633587000000b0051384f6edeasi879422pga.537.2023.05.09.04.19.03; Tue, 09 May 2023 04:19:18 -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=@infradead.org header.s=desiato.20200630 header.b=LZcrlvoW; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235365AbjEIKu3 (ORCPT + 99 others); Tue, 9 May 2023 06:50:29 -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> 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_NONE,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 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?