WSL2-Linux-Kernel/arch
Prarit Bhargava b4c0a7326f x86/smpboot: Fix __max_logical_packages estimate
A system booted with a small number of cores enabled per package
panics because the estimate of __max_logical_packages is too low.

This occurs when the total number of active cores across all packages is
less than the maximum core count for a single package. e.g.:

  On a 4 package system with 20 cores/package where only 4 cores are
  enabled on each package, the value of __max_logical_packages is
  calculated as DIV_ROUND_UP(16 / 20) = 1 and not 4.

Calculate __max_logical_packages after the cpu enumeration has completed.
Use the boot cpu's data to extrapolate the number of packages.

Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Kan Liang <kan.liang@intel.com>
Cc: He Chen <he.chen@linux.intel.com>
Cc: Stephane Eranian <eranian@google.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Piotr Luc <piotr.luc@intel.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Arvind Yadav <arvind.yadav.cs@gmail.com>
Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: Tim Chen <tim.c.chen@linux.intel.com>
Cc: Mathias Krause <minipli@googlemail.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Link: https://lkml.kernel.org/r/20171114124257.22013-4-prarit@redhat.com
2017-11-17 16:22:31 +01:00
..
alpha Merge branch 'linus' into locking/core, to resolve conflicts 2017-11-07 10:32:44 +01:00
arc Merge branch 'linus' into locking/core, to resolve conflicts 2017-11-07 10:32:44 +01:00
arm Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-11-13 17:56:58 -08:00
arm64 Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-11-13 17:33:11 -08:00
blackfin Merge branch 'linus' into locking/core, to resolve conflicts 2017-11-07 10:32:44 +01:00
c6x License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
cris License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
frv License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
h8300 License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
hexagon Merge branch 'linus' into locking/core, to resolve conflicts 2017-11-07 10:32:44 +01:00
ia64 Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-11-13 17:56:58 -08:00
m32r Merge branch 'linus' into locking/core, to resolve conflicts 2017-11-07 10:32:44 +01:00
m68k Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-11-13 17:56:58 -08:00
metag Merge branch 'linus' into locking/core, to resolve conflicts 2017-11-07 10:32:44 +01:00
microblaze License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
mips Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-11-13 17:56:58 -08:00
mn10300 Merge branch 'linus' into locking/core, to resolve conflicts 2017-11-07 10:32:44 +01:00
nios2 License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
openrisc OpenRISC updates for v4.15 2017-11-13 12:12:00 -08:00
parisc Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-11-13 17:56:58 -08:00
powerpc Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-11-13 17:56:58 -08:00
s390 Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-11-13 17:56:58 -08:00
score License cleanup: add SPDX license identifier to uapi header files with no license 2017-11-02 11:19:54 +01:00
sh Merge branch 'linus' into locking/core, to resolve conflicts 2017-11-07 10:32:44 +01:00
sparc Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-11-13 17:56:58 -08:00
tile Merge branch 'linus' into locking/core, to resolve conflicts 2017-11-07 10:32:44 +01:00
um Merge branch 'linus' into locking/core, to resolve conflicts 2017-11-07 10:32:44 +01:00
unicore32 License cleanup: add SPDX license identifier to uapi header files with a license 2017-11-02 11:20:11 +01:00
x86 x86/smpboot: Fix __max_logical_packages estimate 2017-11-17 16:22:31 +01:00
xtensa Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-11-13 17:56:58 -08:00
.gitignore
Kconfig Merge branch 'linus' into perf/core, to fix conflicts 2017-11-07 10:30:18 +01:00