x86/CPU/AMD: Move TOPOEXT reenablement before reading smp_num_siblings
authorBorislav Petkov <bp@suse.de>
Fri, 22 Jun 2018 09:34:11 +0000 (11:34 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Aug 2018 16:12:53 +0000 (18:12 +0200)
commit2a82e5e51fc0153024c52d64ae00dcf006311c80
tree688043ebbf1189a1fb44ac484ea1c21c3b75d670
parent62f43866636d08efca34b87cd2bf8b0f49edb27c
x86/CPU/AMD: Move TOPOEXT reenablement before reading smp_num_siblings

commit 7ce2f0393ea2396142b7faf6ee9b1f3676d08a5f upstream

The TOPOEXT reenablement is a workaround for broken BIOSen which didn't
enable the CPUID bit. amd_get_topology_early(), however, relies on
that bit being set so that it can read out the CPUID leaf and set
smp_num_siblings properly.

Move the reenablement up to early_init_amd(). While at it, simplify
amd_get_topology_early().

Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kernel/cpu/amd.c