Message ID | 20220331153926.25742-1-pauld@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v3] arch/arm64: Fix topology initialization for core scheduling | expand |
On Thu, 31 Mar 2022 11:39:26 -0400, Phil Auld wrote: > Arm64 systems rely on store_cpu_topology() to call update_siblings_masks() > to transfer the toplogy to the various cpu masks. This needs to be done > before the call to notify_cpu_starting() which tells the scheduler about > each cpu found, otherwise the core scheduling data structures are setup > in a way that does not match the actual topology. > > With smt_mask not setup correctly we bail on `cpumask_weight(smt_mask) == 1` > for !leaders in: > > [...] Applied to arm64 (for-next/fixes), thanks! [1/1] arch/arm64: Fix topology initialization for core scheduling https://git.kernel.org/arm64/c/5524cbb1bfcd Cheers,
On Mon, Apr 04, 2022 at 11:10:48AM +0100 Will Deacon wrote: > On Thu, 31 Mar 2022 11:39:26 -0400, Phil Auld wrote: > > Arm64 systems rely on store_cpu_topology() to call update_siblings_masks() > > to transfer the toplogy to the various cpu masks. This needs to be done > > before the call to notify_cpu_starting() which tells the scheduler about > > each cpu found, otherwise the core scheduling data structures are setup > > in a way that does not match the actual topology. > > > > With smt_mask not setup correctly we bail on `cpumask_weight(smt_mask) == 1` > > for !leaders in: > > > > [...] > > Applied to arm64 (for-next/fixes), thanks! > Thanks, Will! Cheers, Phil > [1/1] arch/arm64: Fix topology initialization for core scheduling > https://git.kernel.org/arm64/c/5524cbb1bfcd > > Cheers, > -- > Will > > https://fixes.arm64.dev > https://next.arm64.dev > https://will.arm64.dev >
diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c index 27df5c1e6baa..3b46041f2b97 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c @@ -234,6 +234,7 @@ asmlinkage notrace void secondary_start_kernel(void) * Log the CPU info before it is marked online and might get read. */ cpuinfo_store_cpu(); + store_cpu_topology(cpu); /* * Enable GIC and timers. @@ -242,7 +243,6 @@ asmlinkage notrace void secondary_start_kernel(void) ipi_setup(cpu); - store_cpu_topology(cpu); numa_add_cpu(cpu); /*