--- /dev/null
+From 269777aa530f3438ec1781586cdac0b5fe47b061 Mon Sep 17 00:00:00 2001
+From: Abel Vesa <abelvesa@linux.com>
+Date: Wed, 15 Aug 2018 00:26:00 +0300
+Subject: cpu/hotplug: Non-SMP machines do not make use of booted_once
+
+From: Abel Vesa <abelvesa@linux.com>
+
+commit 269777aa530f3438ec1781586cdac0b5fe47b061 upstream.
+
+Commit 0cc3cd21657b ("cpu/hotplug: Boot HT siblings at least once")
+breaks non-SMP builds.
+
+[ I suspect the 'bool' fields should just be made to be bitfields and be
+ exposed regardless of configuration, but that's a separate cleanup
+ that I'll leave to the owners of this file for later. - Linus ]
+
+Fixes: 0cc3cd21657b ("cpu/hotplug: Boot HT siblings at least once")
+Cc: Dave Hansen <dave.hansen@intel.com>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Cc: Tony Luck <tony.luck@intel.com>
+Signed-off-by: Abel Vesa <abelvesa@linux.com>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ kernel/cpu.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/kernel/cpu.c
++++ b/kernel/cpu.c
+@@ -2267,6 +2267,8 @@ void __init boot_cpu_init(void)
+ */
+ void __init boot_cpu_hotplug_init(void)
+ {
++#ifdef CONFIG_SMP
+ this_cpu_write(cpuhp_state.booted_once, true);
++#endif
+ this_cpu_write(cpuhp_state.state, CPUHP_ONLINE);
+ }
tools-headers-synchronize-prctl.h-abi-header.patch
tools-headers-synchronise-x86-cpufeatures.h-for-l1tf-additions.patch
x86-microcode-allow-late-microcode-loading-with-smt-disabled.patch
+x86-smp-fix-non-smp-broken-build-due-to-redefinition-of-apic_id_is_primary_thread.patch
+cpu-hotplug-non-smp-machines-do-not-make-use-of-booted_once.patch
+x86-init-fix-build-with-config_swap-n.patch
--- /dev/null
+From 792adb90fa724ce07c0171cbc96b9215af4b1045 Mon Sep 17 00:00:00 2001
+From: Vlastimil Babka <vbabka@suse.cz>
+Date: Tue, 14 Aug 2018 20:50:47 +0200
+Subject: x86/init: fix build with CONFIG_SWAP=n
+
+From: Vlastimil Babka <vbabka@suse.cz>
+
+commit 792adb90fa724ce07c0171cbc96b9215af4b1045 upstream.
+
+The introduction of generic_max_swapfile_size and arch-specific versions has
+broken linking on x86 with CONFIG_SWAP=n due to undefined reference to
+'generic_max_swapfile_size'. Fix it by compiling the x86-specific
+max_swapfile_size() only with CONFIG_SWAP=y.
+
+Reported-by: Tomas Pruzina <pruzinat@gmail.com>
+Fixes: 377eeaa8e11f ("x86/speculation/l1tf: Limit swap file size to MAX_PA/2")
+Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
+Cc: stable@vger.kernel.org
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/mm/init.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/arch/x86/mm/init.c
++++ b/arch/x86/mm/init.c
+@@ -883,6 +883,7 @@ void update_cache_mode_entry(unsigned en
+ __pte2cachemode_tbl[entry] = cache;
+ }
+
++#ifdef CONFIG_SWAP
+ unsigned long max_swapfile_size(void)
+ {
+ unsigned long pages;
+@@ -903,3 +904,4 @@ unsigned long max_swapfile_size(void)
+ }
+ return pages;
+ }
++#endif
--- /dev/null
+From d0055f351e647f33f3b0329bff022213bf8aa085 Mon Sep 17 00:00:00 2001
+From: Vlastimil Babka <vbabka@suse.cz>
+Date: Tue, 14 Aug 2018 23:38:57 +0200
+Subject: x86/smp: fix non-SMP broken build due to redefinition of apic_id_is_primary_thread
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Vlastimil Babka <vbabka@suse.cz>
+
+commit d0055f351e647f33f3b0329bff022213bf8aa085 upstream.
+
+The function has an inline "return false;" definition with CONFIG_SMP=n
+but the "real" definition is also visible leading to "redefinition of
+‘apic_id_is_primary_thread’" compiler error.
+
+Guard it with #ifdef CONFIG_SMP
+
+Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
+Fixes: 6a4d2657e048 ("x86/smp: Provide topology_is_primary_thread()")
+Cc: stable@vger.kernel.org
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/kernel/apic/apic.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/arch/x86/kernel/apic/apic.c
++++ b/arch/x86/kernel/apic/apic.c
+@@ -2193,6 +2193,7 @@ static int cpuid_to_apicid[] = {
+ [0 ... NR_CPUS - 1] = -1,
+ };
+
++#ifdef CONFIG_SMP
+ /**
+ * apic_id_is_primary_thread - Check whether APIC ID belongs to a primary thread
+ * @id: APIC ID to check
+@@ -2207,6 +2208,7 @@ bool apic_id_is_primary_thread(unsigned
+ mask = (1U << (fls(smp_num_siblings) - 1)) - 1;
+ return !(apicid & mask);
+ }
++#endif
+
+ /*
+ * Should use this API to allocate logical CPU IDs to keep nr_logical_cpuids