]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Jan 2021 08:44:26 +0000 (09:44 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Jan 2021 08:44:26 +0000 (09:44 +0100)
added patches:
x86-topology-make-__max_die_per_package-available-unconditionally.patch

queue-5.4/series
queue-5.4/x86-topology-make-__max_die_per_package-available-unconditionally.patch [new file with mode: 0644]

index 9f4eb58576f074830871f2db5dc40d1a705b0a53..c11f2471a7d4d7bd14d8e8762312e11718102b4d 100644 (file)
@@ -53,6 +53,7 @@ iio-ad5504-fix-setting-power-down-state.patch
 cifs-do-not-fail-__smb_send_rqst-if-non-fatal-signals-are-pending.patch
 irqchip-mips-cpu-set-ipi-domain-parent-chip.patch
 x86-fpu-add-kernel_fpu_begin_mask-to-selectively-initialize-state.patch
+x86-topology-make-__max_die_per_package-available-unconditionally.patch
 x86-mmx-use-kfpu_387-for-mmx-string-operations.patch
 intel_th-pci-add-alder-lake-p-support.patch
 stm-class-fix-module-init-return-on-allocation-failure.patch
diff --git a/queue-5.4/x86-topology-make-__max_die_per_package-available-unconditionally.patch b/queue-5.4/x86-topology-make-__max_die_per_package-available-unconditionally.patch
new file mode 100644 (file)
index 0000000..7b8e62f
--- /dev/null
@@ -0,0 +1,58 @@
+From 1eb8f690bcb565a6600f8b6dcc78f7b239ceba17 Mon Sep 17 00:00:00 2001
+From: Borislav Petkov <bp@suse.de>
+Date: Thu, 14 Jan 2021 10:36:59 +0100
+Subject: x86/topology: Make __max_die_per_package available unconditionally
+
+From: Borislav Petkov <bp@suse.de>
+
+commit 1eb8f690bcb565a6600f8b6dcc78f7b239ceba17 upstream.
+
+Move it outside of CONFIG_SMP in order to avoid ifdeffery at the usage
+sites.
+
+Fixes: 76e2fc63ca40 ("x86/cpu/amd: Set __max_die_per_package on AMD")
+Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
+Reported-by: kernel test robot <lkp@intel.com>
+Signed-off-by: Borislav Petkov <bp@suse.de>
+Link: https://lkml.kernel.org/r/20210114111814.5346-1-bp@alien8.de
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/include/asm/topology.h |    4 ++--
+ arch/x86/kernel/cpu/topology.c  |    2 +-
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+
+--- a/arch/x86/include/asm/topology.h
++++ b/arch/x86/include/asm/topology.h
+@@ -110,6 +110,8 @@ extern const struct cpumask *cpu_coregro
+ #define topology_die_id(cpu)                  (cpu_data(cpu).cpu_die_id)
+ #define topology_core_id(cpu)                 (cpu_data(cpu).cpu_core_id)
++extern unsigned int __max_die_per_package;
++
+ #ifdef CONFIG_SMP
+ #define topology_die_cpumask(cpu)             (per_cpu(cpu_die_map, cpu))
+ #define topology_core_cpumask(cpu)            (per_cpu(cpu_core_map, cpu))
+@@ -118,8 +120,6 @@ extern const struct cpumask *cpu_coregro
+ extern unsigned int __max_logical_packages;
+ #define topology_max_packages()                       (__max_logical_packages)
+-extern unsigned int __max_die_per_package;
+-
+ static inline int topology_max_die_per_package(void)
+ {
+       return __max_die_per_package;
+--- a/arch/x86/kernel/cpu/topology.c
++++ b/arch/x86/kernel/cpu/topology.c
+@@ -25,10 +25,10 @@
+ #define BITS_SHIFT_NEXT_LEVEL(eax)    ((eax) & 0x1f)
+ #define LEVEL_MAX_SIBLINGS(ebx)               ((ebx) & 0xffff)
+-#ifdef CONFIG_SMP
+ unsigned int __max_die_per_package __read_mostly = 1;
+ EXPORT_SYMBOL(__max_die_per_package);
++#ifdef CONFIG_SMP
+ /*
+  * Check if given CPUID extended toplogy "leaf" is implemented
+  */