[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230509104915.GX83892@hirez.programming.kicks-ass.net>
Date: Tue, 9 May 2023 12:49:15 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: LKML <linux-kernel@...r.kernel.org>, x86@...nel.org,
David Woodhouse <dwmw2@...radead.org>,
Andrew Cooper <andrew.cooper3@...rix.com>,
Brian Gerst <brgerst@...il.com>,
Arjan van de Veen <arjan@...ux.intel.com>,
Paolo Bonzini <pbonzini@...hat.com>,
Paul McKenney <paulmck@...nel.org>,
Tom Lendacky <thomas.lendacky@....com>,
Sean Christopherson <seanjc@...gle.com>,
Oleksandr Natalenko <oleksandr@...alenko.name>,
Paul Menzel <pmenzel@...gen.mpg.de>,
"Guilherme G. Piccoli" <gpiccoli@...lia.com>,
Piotr Gorski <lucjan.lucjanov@...il.com>,
Usama Arif <usama.arif@...edance.com>,
Juergen Gross <jgross@...e.com>,
Boris Ostrovsky <boris.ostrovsky@...cle.com>,
xen-devel@...ts.xenproject.org,
Russell King <linux@...linux.org.uk>,
Arnd Bergmann <arnd@...db.de>,
linux-arm-kernel@...ts.infradead.org,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>, Guo Ren <guoren@...nel.org>,
linux-csky@...r.kernel.org,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
linux-mips@...r.kernel.org,
"James E.J. Bottomley" <James.Bottomley@...senpartnership.com>,
Helge Deller <deller@....de>, linux-parisc@...r.kernel.org,
Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>,
linux-riscv@...ts.infradead.org,
Mark Rutland <mark.rutland@....com>,
Sabin Rapan <sabrapan@...zon.com>,
"Michael Kelley (LINUX)" <mikelley@...rosoft.com>
Subject: Re: [patch v3 13/36] x86/smpboot: Remove cpu_callin_mask
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?
Powered by blists - more mailing lists