Home Home > GIT Browse > SLE15-SP1-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Tesarik <ptesarik@suse.cz>2019-06-21 21:46:14 +0200
committerPetr Tesarik <ptesarik@suse.cz>2019-06-21 21:46:14 +0200
commit5e145baf5986430ed0e889f24fcfcbd940f9c381 (patch)
tree29daf5f1384133539730798267c0aa0730a147bb
parentbb88551acfe873fcbfd967954276a906293df0f9 (diff)
parenta759aeae9e8f32fba498f5fcf93b53c5b4b2c5e0 (diff)
Merge branch 'SLE15' into SLE15-SP1
- Refresh patches.arch/x86-amd_nb-add-pci-device-ids-for-family-17h-model-30h.patch - Refresh patches.arch/x86-speculation-mds-revert-cpu-buffer-clear-on-double-fault-exit.patch - Refresh patches.drivers/hwmon-k10temp-add-hygon-dhyana-support.patch - Refresh patches.drivers/hwmon-k10temp-add-support-for-amd-family-17h-model-30h-cpus.patch - Refresh patches.drivers/hwmon-k10temp-x86-amd_nb-consolidate-shared-device-ids.patch - Refresh patches.fixes/sched-topology-Improve-load-balancing-on-AMD-EPYC.patch - Refresh patches.kabi/x86-topology-Add-CPUID.1F-multi-die-package-support.patch - Refresh patches.kabi/x86-topology-Define-topology_logical_die_id.patch Conflicts: patches.drivers/hwmon-k10temp-x86-amd_nb-consolidate-shared-device-ids.patch series.conf
-rw-r--r--blacklist.conf1
-rw-r--r--patches.arch/kvm-x86-include-cpuid-leaf-0x8000001e-in-kvm-s-supported-cpuid.patch40
-rw-r--r--patches.arch/kvm-x86-include-multiple-indices-with-cpuid-leaf-0x8000001d.patch57
-rw-r--r--patches.arch/powerpc-pseries-dlpar-Fix-a-missing-check-in-dlpar_p.patch40
-rw-r--r--patches.arch/s390-jump_label-Use-jdd-constraint-on-gcc9.patch72
-rw-r--r--patches.arch/x86-amd_nb-add-pci-device-ids-for-family-17h-model-30h.patch19
-rw-r--r--patches.arch/x86-amd_nb-add-support-for-raven-ridge-cpus.patch56
-rw-r--r--patches.arch/x86-cpu-amd-don-t-force-the-cpb-cap-when-running-under-a-hypervisor.patch65
-rw-r--r--patches.arch/x86-mce-fix-machine_check_poll-tests-for-error-types.patch103
-rw-r--r--patches.arch/x86-microcode-cpuhotplug-add-a-microcode-loader-cpu-hotplug-callback.patch72
-rw-r--r--patches.arch/x86-microcode-fix-the-ancient-deprecated-microcode-loading-method.patch42
-rw-r--r--patches.arch/x86-mm-mem_encrypt-disable-all-instrumentation-for-early-sme-setup.patch94
-rw-r--r--patches.arch/x86-speculation-mds-revert-cpu-buffer-clear-on-double-fault-exit.patch70
-rw-r--r--patches.drivers/drivers-rapidio-devices-rio_mport_cdev.c-fix-resourc.patch44
-rw-r--r--patches.drivers/drivers-rapidio-rio_cm.c-fix-potential-oops-in-riocm.patch44
-rw-r--r--patches.drivers/edac-mc-fix-edac_mc_find-in-case-no-device-is-found.patch60
-rw-r--r--patches.drivers/hwmon-k10temp-27c-offset-needed-for-threadripper2.patch28
-rw-r--r--patches.drivers/hwmon-k10temp-add-hygon-dhyana-support.patch39
-rw-r--r--patches.drivers/hwmon-k10temp-add-support-for-amd-family-17h-model-30h-cpus.patch4
-rw-r--r--patches.drivers/hwmon-k10temp-add-support-for-amd-ryzen-w-vega-graphics.patch40
-rw-r--r--patches.drivers/hwmon-k10temp-add-support-for-family-17h.patch67
-rw-r--r--patches.drivers/hwmon-k10temp-add-support-for-stoney-ridge-and-bristol.patch38
-rw-r--r--patches.drivers/hwmon-k10temp-add-support-for-temperature-offsets.patch77
-rw-r--r--patches.drivers/hwmon-k10temp-add-temperature-offset-for-ryzen-1900x.patch25
-rw-r--r--patches.drivers/hwmon-k10temp-add-temperature-offset-for-ryzen-2700x.patch62
-rw-r--r--patches.drivers/hwmon-k10temp-correct-model-name-for-ryzen-1600x.patch25
-rw-r--r--patches.drivers/hwmon-k10temp-display-both-tctl-and-tdie.patch138
-rw-r--r--patches.drivers/hwmon-k10temp-fix-reading-critical-temperature-register.patch116
-rw-r--r--patches.drivers/hwmon-k10temp-make-function-get_raw_temp-static.patch31
-rw-r--r--patches.drivers/hwmon-k10temp-move-chip-specific-code-into-probe-function.patch129
-rw-r--r--patches.drivers/hwmon-k10temp-only-apply-temperature-offset-if-result-is.patch38
-rw-r--r--patches.drivers/hwmon-k10temp-support-all-family-15h-model-6xh-and-model.patch36
-rw-r--r--patches.drivers/hwmon-k10temp-support-threadripper-2920x-2970wx-simplify.patch39
-rw-r--r--patches.drivers/hwmon-k10temp-use-api-function-to-access-system-management.patch78
-rw-r--r--patches.drivers/hwmon-k10temp-x86-amd_nb-consolidate-shared-device-ids.patch32
-rw-r--r--patches.drivers/i2c-piix4-add-hygon-dhyana-smbus-support.patch91
-rw-r--r--patches.drivers/qmi_wwan-add-network-device-usage-statistics-for-qmi.patch156
-rw-r--r--patches.drivers/qmi_wwan-add-support-for-QMAP-padding-in-the-RX-path.patch66
-rw-r--r--patches.drivers/qmi_wwan-avoid-RCU-stalls-on-device-disconnect-when-.patch76
-rw-r--r--patches.drivers/qmi_wwan-extend-permitted-QMAP-mux_id-value-range.patch60
-rw-r--r--patches.drivers/rapidio-fix-a-NULL-pointer-dereference-when-create_w.patch44
-rw-r--r--patches.drivers/ras-cec-convert-the-timer-callback-to-a-workqueue.patch141
-rw-r--r--patches.drivers/ras-cec-fix-binary-search-function.patch90
-rw-r--r--patches.drivers/soc-mediatek-pwrap-Zero-initialize-rdata-in-pwrap_in.patch46
-rw-r--r--patches.drivers/soc-rockchip-Set-the-proper-PWM-for-rk3288.patch57
-rw-r--r--patches.drivers/tty-max310x-Fix-external-crystal-register-setup.patch47
-rw-r--r--patches.fixes/0001-USB-serial-pl2303-fix-tranceiver-suspend-mode.patch83
-rw-r--r--patches.fixes/0001-mwifiex-Abort-at-too-short-BSS-descriptor-element.patch3
-rw-r--r--patches.fixes/0001-mwifiex-Fix-heap-overflow-in-mwifiex_uap_parse_tail_.patch3
-rw-r--r--patches.fixes/0001-mwifiex-Fix-possible-buffer-overflows-at-parsing-bss.patch3
-rw-r--r--patches.fixes/0001-usb-xhci-avoid-null-pointer-deref-when-bos-field-is-.patch105
-rw-r--r--patches.fixes/6lowpan-Off-by-one-handling-nexthdr.patch41
-rw-r--r--patches.fixes/SMB3-Fix-endian-warning.patch40
-rw-r--r--patches.fixes/af_key-unconditionally-clone-on-broadcast.patch132
-rw-r--r--patches.fixes/audit-fix-a-memory-leak-bug.patch68
-rw-r--r--patches.fixes/cfg80211-fix-memory-leak-of-wiphy-device-name.patch39
-rw-r--r--patches.fixes/drivers-thermal-tsens-Don-t-print-error-message-on-E.patch38
-rw-r--r--patches.fixes/nfsd-COPY-and-CLONE-operations-require-the-saved-fil.patch2
-rw-r--r--patches.fixes/sched-topology-Improve-load-balancing-on-AMD-EPYC.patch6
-rw-r--r--patches.fixes/scsi-vmw_pscsi-Fix-use-after-free-in-pvscsi_queue_lc.patch51
-rw-r--r--patches.fixes/tcp-add-tcp_min_snd_mss-sysctl.patch3
-rw-r--r--patches.fixes/tcp-enforce-tcp_min_snd_mss-in-tcp_mtu_probing.patch4
-rw-r--r--patches.fixes/tcp-fix-fack_count-accounting-on-tcp_shift_skb_data.patch50
-rw-r--r--patches.fixes/tcp-limit-payload-size-of-sacked-skbs.patch29
-rw-r--r--patches.fixes/tcp-tcp_fragment-should-apply-sane-memory-limits.patch3
-rw-r--r--patches.fixes/thermal-rcar_gen3_thermal-disable-interrupt-in-.remo.patch42
-rw-r--r--patches.fixes/tmpfs-fix-link-accounting-when-a-tmpfile-is-linked-i.patch64
-rw-r--r--patches.fixes/tmpfs-fix-uninitialized-return-value-in-shmem_link.patch42
-rw-r--r--patches.fixes/vlan-disable-SIOCSHWTSTAMP-in-container.patch44
-rw-r--r--patches.kabi/kabi-x86-microcode-hotplug-state-fix.patch40
-rw-r--r--patches.kabi/x86-topology-Add-CPUID.1F-multi-die-package-support.patch36
-rw-r--r--patches.kabi/x86-topology-Define-topology_logical_die_id.patch34
-rw-r--r--patches.suse/NFS-optional-NFSv4_2-fix.patch30
-rw-r--r--patches.suse/cpu-topology-Export-die_id.patch94
-rw-r--r--patches.suse/hwmon-coretemp-Cosmetic-Rename-internal-variables-to.patch133
-rw-r--r--patches.suse/hwmon-coretemp-Support-multi-die-package.patch65
-rw-r--r--patches.suse/ibmveth-Update-ethtool-settings-to-reflect-virtual-p.patch162
-rw-r--r--patches.suse/module-fix-livepatch-ftrace-module-text-permissions-race.patch170
-rw-r--r--patches.suse/perf-x86-intel-cstate-Support-multi-die-package.patch73
-rw-r--r--patches.suse/perf-x86-intel-rapl-Cosmetic-rename-internal-variabl.patch82
-rw-r--r--patches.suse/perf-x86-intel-rapl-Support-multi-die-package.patch78
-rw-r--r--patches.suse/perf-x86-intel-uncore-Cosmetic-renames-in-response-t.patch326
-rw-r--r--patches.suse/perf-x86-intel-uncore-Support-multi-die-package.patch120
-rw-r--r--patches.suse/powercap-intel_rapl-Simplify-rapl_find_package.patch96
-rw-r--r--patches.suse/powercap-intel_rapl-Support-multi-die-package.patch49
-rw-r--r--patches.suse/powercap-intel_rapl-Update-RAPL-domain-name-and-debu.patch199
-rw-r--r--patches.suse/thermal-x86_pkg_temp_thermal-Cosmetic-Rename-interna.patch404
-rw-r--r--patches.suse/thermal-x86_pkg_temp_thermal-Support-multi-die-packa.patch64
-rw-r--r--patches.suse/topology-Create-core_cpus-and-die_cpus-sysfs-attribu.patch240
-rw-r--r--patches.suse/topology-Create-package_cpus-sysfs-attribute.patch81
-rw-r--r--patches.suse/x86-cpufeatures-Carve-out-CQM-features-retrieval.patch105
-rw-r--r--patches.suse/x86-cpufeatures-Combine-word-11-and-12-into-a-new-sc.patch198
-rw-r--r--patches.suse/x86-cpufeatures-Enumerate-the-new-AVX512-BFLOAT16-in.patch109
-rw-r--r--patches.suse/x86-smpboot-Rename-match_die-to-match_pkg.patch54
-rw-r--r--patches.suse/x86-topology-Add-CPUID.1F-multi-die-package-support.patch238
-rw-r--r--patches.suse/x86-topology-Create-topology_max_die_per_package.patch86
-rw-r--r--patches.suse/x86-topology-Define-topology_die_id.patch31
-rw-r--r--patches.suse/x86-topology-Define-topology_logical_die_id.patch147
-rw-r--r--series.conf105
99 files changed, 7243 insertions, 96 deletions
diff --git a/blacklist.conf b/blacklist.conf
index 60dbd54602..d71d7d1d0b 100644
--- a/blacklist.conf
+++ b/blacklist.conf
@@ -1167,3 +1167,4 @@ b616b9dbc5f613d64224b2e430211211812eadd0 # reverting drm/nouveau kconfig change
a25d8c327bb41742dbd59f8c545f59f3b9c39983 # md/raid5: reverting the above
9421e45f5ff3d558cf8b75a8cc0824530caf3453 # uio: reverted by the below
3d27c4de8d4fb2d4099ff324671792aa2578c6f9 # uio: reverting the above
+9d8d0294e78a164d407133dea05caf4b84247d6a # documentation only
diff --git a/patches.arch/kvm-x86-include-cpuid-leaf-0x8000001e-in-kvm-s-supported-cpuid.patch b/patches.arch/kvm-x86-include-cpuid-leaf-0x8000001e-in-kvm-s-supported-cpuid.patch
new file mode 100644
index 0000000000..6b9f1eb7d7
--- /dev/null
+++ b/patches.arch/kvm-x86-include-cpuid-leaf-0x8000001e-in-kvm-s-supported-cpuid.patch
@@ -0,0 +1,40 @@
+From: Jim Mattson <jmattson@google.com>
+Date: Wed, 27 Mar 2019 13:15:37 -0700
+Subject: kvm: x86: Include CPUID leaf 0x8000001e in kvm's supported CPUID
+Git-commit: 382409b4c43e5b44ae4a869ff793d3cf01d12004
+Patch-mainline: v5.2-rc2
+References: bsc#1114279
+
+Kvm now supports extended CPUID functions through 0x8000001f. CPUID
+leaf 0x8000001e is AMD's Processor Topology Information leaf. This
+contains similar information to CPUID leaf 0xb (Intel's Extended
+Topology Enumeration leaf), and should be included in the output of
+KVM_GET_SUPPORTED_CPUID, even though userspace is likely to override
+some of this information based upon the configuration of the
+particular VM.
+
+Cc: Brijesh Singh <brijesh.singh@amd.com>
+Cc: Borislav Petkov <bp@suse.de>
+Fixes: 8765d75329a38 ("KVM: X86: Extend CPUID range to include new leaf")
+Signed-off-by: Jim Mattson <jmattson@google.com>
+Reviewed-by: Marc Orr <marcorr@google.com>
+Reviewed-by: Borislav Petkov <bp@suse.de>
+Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
+Acked-by: Borislav Petkov <bp@suse.de>
+---
+ arch/x86/kvm/cpuid.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
+index 3c96ce8fbb96..e18a9f9f65b5 100644
+--- a/arch/x86/kvm/cpuid.c
++++ b/arch/x86/kvm/cpuid.c
+@@ -702,6 +702,7 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
+ entry->ecx = entry->edx = 0;
+ break;
+ case 0x8000001a:
++ case 0x8000001e:
+ break;
+ /*Add support for Centaur's CPUID instruction*/
+ case 0xC0000000:
+
diff --git a/patches.arch/kvm-x86-include-multiple-indices-with-cpuid-leaf-0x8000001d.patch b/patches.arch/kvm-x86-include-multiple-indices-with-cpuid-leaf-0x8000001d.patch
new file mode 100644
index 0000000000..96647bad22
--- /dev/null
+++ b/patches.arch/kvm-x86-include-multiple-indices-with-cpuid-leaf-0x8000001d.patch
@@ -0,0 +1,57 @@
+From: Jim Mattson <jmattson@google.com>
+Date: Wed, 27 Mar 2019 13:15:36 -0700
+Subject: kvm: x86: Include multiple indices with CPUID leaf 0x8000001d
+Git-commit: 32a243df82c8dc04ccba7fc6c6564ae9261cb738
+Patch-mainline: v5.2-rc2
+References: bsc#1114279
+
+Per the APM, "CPUID Fn8000_001D_E[D,C,B,A]X reports cache topology
+information for the cache enumerated by the value passed to the
+instruction in ECX, referred to as Cache n in the following
+description. To gather information for all cache levels, software must
+repeatedly execute CPUID with 8000_001Dh in EAX and ECX set to
+increasing values beginning with 0 until a value of 00h is returned in
+the field CacheType (EAX[4:0]) indicating no more cache descriptions
+are available for this processor."
+
+The termination condition is the same as leaf 4, so we can reuse that
+code block for leaf 0x8000001d.
+
+Fixes: 8765d75329a38 ("KVM: X86: Extend CPUID range to include new leaf")
+Cc: Brijesh Singh <brijesh.singh@amd.com>
+Cc: Borislav Petkov <bp@suse.de>
+Signed-off-by: Jim Mattson <jmattson@google.com>
+Reviewed-by: Marc Orr <marcorr@google.com>
+Reviewed-by: Borislav Petkov <bp@suse.de>
+Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
+Acked-by: Borislav Petkov <bp@suse.de>
+---
+ arch/x86/kvm/cpuid.c | 7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
+index 80a642a0143d..3c96ce8fbb96 100644
+--- a/arch/x86/kvm/cpuid.c
++++ b/arch/x86/kvm/cpuid.c
+@@ -456,8 +456,9 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
+ }
+ break;
+ }
+- /* function 4 has additional index. */
+- case 4: {
++ /* functions 4 and 0x8000001d have additional index. */
++ case 4:
++ case 0x8000001d: {
+ int i, cache_type;
+
+ entry->flags |= KVM_CPUID_FLAG_SIGNIFCANT_INDEX;
+@@ -702,8 +703,6 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
+ break;
+ case 0x8000001a:
+ break;
+- case 0x8000001d:
+- break;
+ /*Add support for Centaur's CPUID instruction*/
+ case 0xC0000000:
+ /*Just support up to 0xC0000004 now*/
+
diff --git a/patches.arch/powerpc-pseries-dlpar-Fix-a-missing-check-in-dlpar_p.patch b/patches.arch/powerpc-pseries-dlpar-Fix-a-missing-check-in-dlpar_p.patch
new file mode 100644
index 0000000000..412f1cfa75
--- /dev/null
+++ b/patches.arch/powerpc-pseries-dlpar-Fix-a-missing-check-in-dlpar_p.patch
@@ -0,0 +1,40 @@
+From efa9ace68e487ddd29c2b4d6dd23242158f1f607 Mon Sep 17 00:00:00 2001
+From: Gen Zhang <blackgod016574@gmail.com>
+Date: Sun, 26 May 2019 10:42:40 +0800
+Subject: [PATCH] powerpc/pseries/dlpar: Fix a missing check in
+ dlpar_parse_cc_property()
+
+References: bsc#1137194, CVE-2019-12614
+Patch-mainline: queued
+Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git
+Git-commit: efa9ace68e487ddd29c2b4d6dd23242158f1f607
+
+In dlpar_parse_cc_property(), 'prop->name' is allocated by kstrdup().
+kstrdup() may return NULL, so it should be checked and handle error.
+And prop should be freed if 'prop->name' is NULL.
+
+Signed-off-by: Gen Zhang <blackgod016574@gmail.com>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ arch/powerpc/platforms/pseries/dlpar.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/arch/powerpc/platforms/pseries/dlpar.c b/arch/powerpc/platforms/pseries/dlpar.c
+index 17958043e7f7..c852024044bb 100644
+--- a/arch/powerpc/platforms/pseries/dlpar.c
++++ b/arch/powerpc/platforms/pseries/dlpar.c
+@@ -61,6 +61,10 @@ static struct property *dlpar_parse_cc_property(struct cc_workarea *ccwa)
+
+ name = (char *)ccwa + be32_to_cpu(ccwa->name_offset);
+ prop->name = kstrdup(name, GFP_KERNEL);
++ if (!prop->name) {
++ dlpar_free_cc_property(prop);
++ return NULL;
++ }
+
+ prop->length = be32_to_cpu(ccwa->prop_length);
+ value = (char *)ccwa + be32_to_cpu(ccwa->prop_offset);
+--
+2.21.0
+
diff --git a/patches.arch/s390-jump_label-Use-jdd-constraint-on-gcc9.patch b/patches.arch/s390-jump_label-Use-jdd-constraint-on-gcc9.patch
new file mode 100644
index 0000000000..d6f09a9478
--- /dev/null
+++ b/patches.arch/s390-jump_label-Use-jdd-constraint-on-gcc9.patch
@@ -0,0 +1,72 @@
+From 146448524bddbf6dfc62de31957e428de001cbda Mon Sep 17 00:00:00 2001
+From: Ilya Leoshkevich <iii@linux.ibm.com>
+Date: Wed, 6 Feb 2019 12:35:58 +0100
+Subject: [PATCH] s390/jump_label: Use "jdd" constraint on gcc9
+
+References: bsc#1138589
+Patch-mainline: v5.1-rc1
+Git-commit: 146448524bddbf6dfc62de31957e428de001cbda
+
+[heiko.carstens@de.ibm.com]:
+-----
+Laura Abbott reported that the kernel doesn't build anymore with gcc 9,
+due to the "X" constraint. Ilya provided the gcc 9 patch "S/390:
+Introduce jdd constraint" which introduces the new "jdd" constraint
+which fixes this.
+-----
+
+The support for section anchors on S/390 introduced in gcc9 has changed
+the behavior of "X" constraint, which can now produce register
+references. Since existing constraints, in particular, "i", do not fit
+the intended use case on S/390, the new machine-specific "jdd"
+constraint was introduced. This patch makes jump labels use "jdd"
+constraint when building with gcc9.
+
+Reported-by: Laura Abbott <labbott@redhat.com>
+Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
+Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
+Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ arch/s390/include/asm/jump_label.h | 14 ++++++++++----
+ 1 file changed, 10 insertions(+), 4 deletions(-)
+
+--- a/arch/s390/include/asm/jump_label.h
++++ b/arch/s390/include/asm/jump_label.h
+@@ -9,6 +9,12 @@
+ #define JUMP_LABEL_NOP_SIZE 6
+ #define JUMP_LABEL_NOP_OFFSET 2
+
++#if __GNUC__ < 9
++#define JUMP_LABEL_STATIC_KEY_CONSTRAINT "X"
++#else
++#define JUMP_LABEL_STATIC_KEY_CONSTRAINT "jdd"
++#endif
++
+ /*
+ * We use a brcl 0,2 instruction for jump labels at compile time so it
+ * can be easily distinguished from a hotpatch generated instruction.
+@@ -18,9 +24,9 @@ static __always_inline bool arch_static_
+ asm_volatile_goto("0: brcl 0,"__stringify(JUMP_LABEL_NOP_OFFSET)"\n"
+ ".pushsection __jump_table, \"aw\"\n"
+ ".balign 8\n"
+- ".quad 0b, %l[label], %0\n"
++ ".quad 0b, %l[label], %0+%1\n"
+ ".popsection\n"
+- : : "X" (&((char *)key)[branch]) : : label);
++ : : JUMP_LABEL_STATIC_KEY_CONSTRAINT (key), "i" (branch) : : label);
+
+ return false;
+ label:
+@@ -32,9 +38,9 @@ static __always_inline bool arch_static_
+ asm_volatile_goto("0: brcl 15, %l[label]\n"
+ ".pushsection __jump_table, \"aw\"\n"
+ ".balign 8\n"
+- ".quad 0b, %l[label], %0\n"
++ ".quad 0b, %l[label], %0+%1\n"
+ ".popsection\n"
+- : : "X" (&((char *)key)[branch]) : : label);
++ : : JUMP_LABEL_STATIC_KEY_CONSTRAINT (key), "i" (branch) : : label);
+
+ return false;
+ label:
diff --git a/patches.arch/x86-amd_nb-add-pci-device-ids-for-family-17h-model-30h.patch b/patches.arch/x86-amd_nb-add-pci-device-ids-for-family-17h-model-30h.patch
index 17c39d1ebd..f45d89847a 100644
--- a/patches.arch/x86-amd_nb-add-pci-device-ids-for-family-17h-model-30h.patch
+++ b/patches.arch/x86-amd_nb-add-pci-device-ids-for-family-17h-model-30h.patch
@@ -30,20 +30,21 @@ Link: http://lkml.kernel.org/r/20181106200754.60722-4-brian.woods@amd.com
--- a/arch/x86/kernel/amd_nb.c
+++ b/arch/x86/kernel/amd_nb.c
-@@ -15,7 +15,9 @@
- #include <asm/amd_nb.h>
+@@ -16,8 +16,10 @@
#define PCI_DEVICE_ID_AMD_17H_ROOT 0x1450
+ #define PCI_DEVICE_ID_AMD_17H_M10H_ROOT 0x15d0
+#define PCI_DEVICE_ID_AMD_17H_M30H_ROOT 0x1480
#define PCI_DEVICE_ID_AMD_17H_DF_F4 0x1464
+ #define PCI_DEVICE_ID_AMD_17H_M10H_DF_F4 0x15ec
+#define PCI_DEVICE_ID_AMD_17H_M30H_DF_F4 0x1494
/* Protect the PCI config register pairs used for SMN and DF indirect access. */
static DEFINE_MUTEX(smn_mutex);
-@@ -24,9 +26,11 @@ static u32 *flush_words;
-
+@@ -27,9 +29,11 @@ static u32 *flush_words;
static const struct pci_device_id amd_root_ids[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_ROOT) },
+ { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M10H_ROOT) },
+ { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M30H_ROOT) },
{}
};
@@ -52,25 +53,25 @@ Link: http://lkml.kernel.org/r/20181106200754.60722-4-brian.woods@amd.com
#define PCI_DEVICE_ID_AMD_CNB17H_F4 0x1704
const struct pci_device_id amd_nb_misc_ids[] = {
-@@ -39,6 +43,7 @@ const struct pci_device_id amd_nb_misc_i
- { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_NB_F3) },
+@@ -43,6 +47,7 @@ const struct pci_device_id amd_nb_misc_i
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_M30H_NB_F3) },
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_DF_F3) },
+ { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M10H_DF_F3) },
+ { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M30H_DF_F3) },
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CNB17H_F3) },
{}
};
-@@ -51,6 +56,7 @@ static const struct pci_device_id amd_nb
- { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_NB_F4) },
+@@ -56,6 +61,7 @@ static const struct pci_device_id amd_nb
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_M30H_NB_F4) },
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_DF_F4) },
+ { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M10H_DF_F4) },
+ { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M30H_DF_F4) },
{ PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CNB17H_F4) },
{}
};
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
-@@ -539,6 +539,7 @@
+@@ -542,6 +542,7 @@
#define PCI_DEVICE_ID_AMD_16H_M30H_NB_F4 0x1584
#define PCI_DEVICE_ID_AMD_17H_DF_F3 0x1463
#define PCI_DEVICE_ID_AMD_17H_M10H_DF_F3 0x15eb
diff --git a/patches.arch/x86-amd_nb-add-support-for-raven-ridge-cpus.patch b/patches.arch/x86-amd_nb-add-support-for-raven-ridge-cpus.patch
new file mode 100644
index 0000000000..9da914c237
--- /dev/null
+++ b/patches.arch/x86-amd_nb-add-support-for-raven-ridge-cpus.patch
@@ -0,0 +1,56 @@
+From: Guenter Roeck <linux@roeck-us.net>
+Date: Fri, 4 May 2018 13:01:32 -0700
+Subject: x86/amd_nb: Add support for Raven Ridge CPUs
+Git-commit: f9bc6b2dd9cf025f827f471769e1d88b527bfb91
+Patch-mainline: v4.17
+References: FATE#327735
+
+Add Raven Ridge root bridge and data fabric PCI IDs.
+This is required for amd_pci_dev_to_node_id() and amd_smn_read().
+
+Cc: stable@vger.kernel.org # v4.16+
+Tested-by: Gabriel Craciunescu <nix.or.die@gmail.com>
+Acked-by: Thomas Gleixner <tglx@linutronix.de>
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Acked-by: Jean Delvare <jdelvare@suse.de>
+
+diff --git a/arch/x86/kernel/amd_nb.c b/arch/x86/kernel/amd_nb.c
+index c88e0b127810..b481b95bd8f6 100644
+--- a/arch/x86/kernel/amd_nb.c
++++ b/arch/x86/kernel/amd_nb.c
+@@ -14,8 +14,11 @@
+ #include <asm/amd_nb.h>
+
+ #define PCI_DEVICE_ID_AMD_17H_ROOT 0x1450
++#define PCI_DEVICE_ID_AMD_17H_M10H_ROOT 0x15d0
+ #define PCI_DEVICE_ID_AMD_17H_DF_F3 0x1463
+ #define PCI_DEVICE_ID_AMD_17H_DF_F4 0x1464
++#define PCI_DEVICE_ID_AMD_17H_M10H_DF_F3 0x15eb
++#define PCI_DEVICE_ID_AMD_17H_M10H_DF_F4 0x15ec
+
+ /* Protect the PCI config register pairs used for SMN and DF indirect access. */
+ static DEFINE_MUTEX(smn_mutex);
+@@ -24,6 +27,7 @@ static u32 *flush_words;
+
+ static const struct pci_device_id amd_root_ids[] = {
+ { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_ROOT) },
++ { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M10H_ROOT) },
+ {}
+ };
+
+@@ -39,6 +43,7 @@ const struct pci_device_id amd_nb_misc_ids[] = {
+ { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_NB_F3) },
+ { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_M30H_NB_F3) },
+ { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_DF_F3) },
++ { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M10H_DF_F3) },
+ { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CNB17H_F3) },
+ {}
+ };
+@@ -51,6 +56,7 @@ static const struct pci_device_id amd_nb_link_ids[] = {
+ { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_NB_F4) },
+ { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_M30H_NB_F4) },
+ { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_DF_F4) },
++ { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_17H_M10H_DF_F4) },
+ { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CNB17H_F4) },
+ {}
+ };
diff --git a/patches.arch/x86-cpu-amd-don-t-force-the-cpb-cap-when-running-under-a-hypervisor.patch b/patches.arch/x86-cpu-amd-don-t-force-the-cpb-cap-when-running-under-a-hypervisor.patch
new file mode 100644
index 0000000000..41cd328937
--- /dev/null
+++ b/patches.arch/x86-cpu-amd-don-t-force-the-cpb-cap-when-running-under-a-hypervisor.patch
@@ -0,0 +1,65 @@
+From: Frank van der Linden <fllinden@amazon.com>
+Date: Wed, 22 May 2019 22:17:45 +0000
+Subject: x86/CPU/AMD: Don't force the CPB cap when running under a hypervisor
+Git-commit: 2ac44ab608705948564791ce1d15d43ba81a1e38
+Patch-mainline: v5.2-rc3
+References: bsc#1114279
+
+For F17h AMD CPUs, the CPB capability ('Core Performance Boost') is forcibly set,
+because some versions of that chip incorrectly report that they do not have it.
+
+However, a hypervisor may filter out the CPB capability, for good
+reasons. For example, KVM currently does not emulate setting the CPB
+bit in MSR_K7_HWCR, and unchecked MSR access errors will be thrown
+when trying to set it as a guest:
+
+ unchecked MSR access error: WRMSR to 0xc0010015 (tried to write 0x0000000001000011) at rIP: 0xffffffff890638f4 (native_write_msr+0x4/0x20)
+
+ Call Trace:
+ boost_set_msr+0x50/0x80 [acpi_cpufreq]
+ cpuhp_invoke_callback+0x86/0x560
+ sort_range+0x20/0x20
+ cpuhp_thread_fun+0xb0/0x110
+ smpboot_thread_fn+0xef/0x160
+ kthread+0x113/0x130
+ kthread_create_worker_on_cpu+0x70/0x70
+ ret_from_fork+0x35/0x40
+
+To avoid this issue, don't forcibly set the CPB capability for a CPU
+when running under a hypervisor.
+
+Signed-off-by: Frank van der Linden <fllinden@amazon.com>
+Acked-by: Borislav Petkov <bp@suse.de>
+Cc: Andy Lutomirski <luto@kernel.org>
+Cc: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Cc: bp@alien8.de
+Cc: jiaxun.yang@flygoat.com
+Fixes: 0237199186e7 ("x86/CPU/AMD: Set the CPB bit unconditionally on F17h")
+Link: http://lkml.kernel.org/r/20190522221745.GA15789@dev-dsk-fllinden-2c-c1893d73.us-west-2.amazon.com
+[ Minor edits to the changelog. ]
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+---
+ arch/x86/kernel/cpu/amd.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
+index 80a405c2048a..8d4e50428b68 100644
+--- a/arch/x86/kernel/cpu/amd.c
++++ b/arch/x86/kernel/cpu/amd.c
+@@ -824,8 +824,11 @@ static void init_amd_zn(struct cpuinfo_x86 *c)
+ {
+ set_cpu_cap(c, X86_FEATURE_ZEN);
+
+- /* Fix erratum 1076: CPB feature bit not being set in CPUID. */
+- if (!cpu_has(c, X86_FEATURE_CPB))
++ /*
++ * Fix erratum 1076: CPB feature bit not being set in CPUID.
++ * Always set it, except when running under a hypervisor.
++ */
++ if (!cpu_has(c, X86_FEATURE_HYPERVISOR) && !cpu_has(c, X86_FEATURE_CPB))
+ set_cpu_cap(c, X86_FEATURE_CPB);
+ }
+
+
diff --git a/patches.arch/x86-mce-fix-machine_check_poll-tests-for-error-types.patch b/patches.arch/x86-mce-fix-machine_check_poll-tests-for-error-types.patch
new file mode 100644
index 0000000000..ed550385fe
--- /dev/null
+++ b/patches.arch/x86-mce-fix-machine_check_poll-tests-for-error-types.patch
@@ -0,0 +1,103 @@
+From: Tony Luck <tony.luck@intel.com>
+Date: Tue, 12 Mar 2019 10:09:38 -0700
+Subject: x86/mce: Fix machine_check_poll() tests for error types
+Git-commit: f19501aa07f18268ab14f458b51c1c6b7f72a134
+Patch-mainline: v5.2-rc1
+References: bsc#1114279
+
+There has been a lurking "TBD" in the machine check poll routine ever
+since it was first split out from the machine check handler. The
+potential issue is that the poll routine may have just begun a read from
+the STATUS register in a machine check bank when the hardware logs an
+error in that bank and signals a machine check.
+
+That race used to be pretty small back when machine checks were
+broadcast, but the addition of local machine check means that the poll
+code could continue running and clear the error from the bank before the
+local machine check handler on another CPU gets around to reading it.
+
+Fix the code to be sure to only process errors that need to be processed
+in the poll code, leaving other logged errors alone for the machine
+check handler to find and process.
+
+ [ bp: Massage a bit and flip the "== 0" check to the usual !(..) test. ]
+
+Fixes: b79109c3bbcf ("x86, mce: separate correct machine check poller and fatal exception handler")
+Fixes: ed7290d0ee8f ("x86, mce: implement new status bits")
+Reported-by: Ashok Raj <ashok.raj@intel.com>
+Signed-off-by: Tony Luck <tony.luck@intel.com>
+Signed-off-by: Borislav Petkov <bp@suse.de>
+Cc: Ashok Raj <ashok.raj@intel.com>
+Cc: "H. Peter Anvin" <hpa@zytor.com>
+Cc: Ingo Molnar <mingo@redhat.com>
+Cc: linux-edac <linux-edac@vger.kernel.org>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Cc: x86-ml <x86@kernel.org>
+Cc: Yazen Ghannam <Yazen.Ghannam@amd.com>
+Link: https://lkml.kernel.org/r/20190312170938.GA23035@agluck-desk
+---
+ arch/x86/kernel/cpu/mcheck/mce.c | 44 +++++++++++++++++++++++++++++++++++-------
+ 1 file changed, 37 insertions(+), 7 deletions(-)
+
+diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
+index b7fb541a4873..e558ca77cfe8 100644
+--- a/arch/x86/kernel/cpu/mcheck/mce.c
++++ b/arch/x86/kernel/cpu/mcheck/mce.c
+@@ -712,19 +712,49 @@ bool machine_check_poll(enum mcp_flags flags, mce_banks_t *b)
+
+ barrier();
+ m.status = mce_rdmsrl(msr_ops.status(i));
++
++ /* If this entry is not valid, ignore it */
+ if (!(m.status & MCI_STATUS_VAL))
+ continue;
+
+ /*
+- * Uncorrected or signalled events are handled by the exception
+- * handler when it is enabled, so don't process those here.
+- *
+- * TBD do the same check for MCI_STATUS_EN here?
++ * If we are logging everything (at CPU online) or this
++ * is a corrected error, then we must log it.
+ */
+- if (!(flags & MCP_UC) &&
+- (m.status & (mca_cfg.ser ? MCI_STATUS_S : MCI_STATUS_UC)))
+- continue;
++ if ((flags & MCP_UC) || !(m.status & MCI_STATUS_UC))
++ goto log_it;
++
++ /*
++ * Newer Intel systems that support software error
++ * recovery need to make additional checks. Other
++ * CPUs should skip over uncorrected errors, but log
++ * everything else.
++ */
++ if (!mca_cfg.ser) {
++ if (m.status & MCI_STATUS_UC)
++ continue;
++ goto log_it;
++ }
++
++ /* Log "not enabled" (speculative) errors */
++ if (!(m.status & MCI_STATUS_EN))
++ goto log_it;
++
++ /*
++ * Log UCNA (SDM: 15.6.3 "UCR Error Classification")
++ * UC == 1 && PCC == 0 && S == 0
++ */
++ if (!(m.status & MCI_STATUS_PCC) && !(m.status & MCI_STATUS_S))
++ goto log_it;
++
++ /*
++ * Skip anything else. Presumption is that our read of this
++ * bank is racing with a machine check. Leave the log alone
++ * for do_machine_check() to deal with it.
++ */
++ continue;
+
++log_it:
+ error_seen = true;
+
+ mce_read_aux(&m, i);
+
diff --git a/patches.arch/x86-microcode-cpuhotplug-add-a-microcode-loader-cpu-hotplug-callback.patch b/patches.arch/x86-microcode-cpuhotplug-add-a-microcode-loader-cpu-hotplug-callback.patch
new file mode 100644
index 0000000000..feaa22f1ea
--- /dev/null
+++ b/patches.arch/x86-microcode-cpuhotplug-add-a-microcode-loader-cpu-hotplug-callback.patch
@@ -0,0 +1,72 @@
+From: Borislav Petkov <bp@suse.de>
+Date: Thu, 13 Jun 2019 15:49:02 +0200
+Subject: x86/microcode, cpuhotplug: Add a microcode loader CPU hotplug callback
+Git-commit: 78f4e932f7760d965fb1569025d1576ab77557c5
+Patch-mainline: v5.2-rc5
+References: bsc#1114279
+
+Adric Blake reported the following warning during suspend-resume:
+
+ Enabling non-boot CPUs ...
+ x86: Booting SMP configuration:
+ smpboot: Booting Node 0 Processor 1 APIC 0x2
+ unchecked MSR access error: WRMSR to 0x10f (tried to write 0x0000000000000000) \
+ at rIP: 0xffffffff8d267924 (native_write_msr+0x4/0x20)
+ Call Trace:
+ intel_set_tfa
+ intel_pmu_cpu_starting
+ ? x86_pmu_dead_cpu
+ x86_pmu_starting_cpu
+ cpuhp_invoke_callback
+ ? _raw_spin_lock_irqsave
+ notify_cpu_starting
+ start_secondary
+ secondary_startup_64
+ microcode: sig=0x806ea, pf=0x80, revision=0x96
+ microcode: updated to revision 0xb4, date = 2019-04-01
+ CPU1 is up
+
+The MSR in question is MSR_TFA_RTM_FORCE_ABORT and that MSR is emulated
+by microcode. The log above shows that the microcode loader callback
+happens after the PMU restoration, leading to the conjecture that
+because the microcode hasn't been updated yet, that MSR is not present
+yet, leading to the #GP.
+
+Add a microcode loader-specific hotplug vector which comes before
+the PERF vectors and thus executes earlier and makes sure the MSR is
+present.
+
+Fixes: 400816f60c54 ("perf/x86/intel: Implement support for TSX Force Abort")
+Reported-by: Adric Blake <promarbler14@gmail.com>
+Signed-off-by: Borislav Petkov <bp@suse.de>
+Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: <stable@vger.kernel.org>
+Cc: x86@kernel.org
+Link: https://bugzilla.kernel.org/show_bug.cgi?id=203637
+---
+ arch/x86/kernel/cpu/microcode/core.c | 2 +-
+ include/linux/cpuhotplug.h | 1 +
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+--- a/arch/x86/kernel/cpu/microcode/core.c
++++ b/arch/x86/kernel/cpu/microcode/core.c
+@@ -853,7 +853,7 @@ int __init microcode_init(void)
+ goto out_ucode_group;
+
+ register_syscore_ops(&mc_syscore_ops);
+- cpuhp_setup_state_nocalls(CPUHP_AP_ONLINE_DYN, "x86/microcode:online",
++ cpuhp_setup_state_nocalls(CPUHP_AP_MICROCODE_LOADER, "x86/microcode:online",
+ mc_cpu_online, mc_cpu_down_prep);
+
+ pr_info("Microcode Update Driver: v%s.", DRIVER_VERSION);
+--- a/include/linux/cpuhotplug.h
++++ b/include/linux/cpuhotplug.h
+@@ -84,6 +84,7 @@ enum cpuhp_state {
+ CPUHP_AP_IRQ_ARMADA_XP_STARTING,
+ CPUHP_AP_IRQ_BCM2836_STARTING,
+ CPUHP_AP_ARM_MVEBU_COHERENCY,
++ CPUHP_AP_MICROCODE_LOADER,
+ CPUHP_AP_PERF_X86_AMD_UNCORE_STARTING,
+ CPUHP_AP_PERF_X86_STARTING,
+ CPUHP_AP_PERF_X86_AMD_IBS_STARTING,
diff --git a/patches.arch/x86-microcode-fix-the-ancient-deprecated-microcode-loading-method.patch b/patches.arch/x86-microcode-fix-the-ancient-deprecated-microcode-loading-method.patch
new file mode 100644
index 0000000000..09f5dbadd8
--- /dev/null
+++ b/patches.arch/x86-microcode-fix-the-ancient-deprecated-microcode-loading-method.patch
@@ -0,0 +1,42 @@
+From: Borislav Petkov <bp@suse.de>
+Date: Thu, 4 Apr 2019 22:14:07 +0200
+Subject: x86/microcode: Fix the ancient deprecated microcode loading method
+Git-commit: 24613a04ad1c0588c10f4b5403ca60a73d164051
+Patch-mainline: v5.2-rc1
+References: bsc#1114279
+
+Commit
+
+ 2613f36ed965 ("x86/microcode: Attempt late loading only when new microcode is present")
+
+added the new define UCODE_NEW to denote that an update should happen
+only when newer microcode (than installed on the system) has been found.
+
+But it missed adjusting that for the old /dev/cpu/microcode loading
+interface. Fix it.
+
+Fixes: 2613f36ed965 ("x86/microcode: Attempt late loading only when new microcode is present")
+Signed-off-by: Borislav Petkov <bp@suse.de>
+Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
+Cc: Jann Horn <jannh@google.com>
+Link: https://lkml.kernel.org/r/20190405133010.24249-3-bp@alien8.de
+---
+ arch/x86/kernel/cpu/microcode/core.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/arch/x86/kernel/cpu/microcode/core.c b/arch/x86/kernel/cpu/microcode/core.c
+index 5260185cbf7b..8a4a7823451a 100644
+--- a/arch/x86/kernel/cpu/microcode/core.c
++++ b/arch/x86/kernel/cpu/microcode/core.c
+@@ -418,8 +418,9 @@ static int do_microcode_update(const void __user *buf, size_t size)
+ if (ustate == UCODE_ERROR) {
+ error = -1;
+ break;
+- } else if (ustate == UCODE_OK)
++ } else if (ustate == UCODE_NEW) {
+ apply_microcode_on_target(cpu);
++ }
+ }
+
+ return error;
+
diff --git a/patches.arch/x86-mm-mem_encrypt-disable-all-instrumentation-for-early-sme-setup.patch b/patches.arch/x86-mm-mem_encrypt-disable-all-instrumentation-for-early-sme-setup.patch
new file mode 100644
index 0000000000..71866ad228
--- /dev/null
+++ b/patches.arch/x86-mm-mem_encrypt-disable-all-instrumentation-for-early-sme-setup.patch
@@ -0,0 +1,94 @@
+From: Gary Hook <Gary.Hook@amd.com>
+Date: Mon, 29 Apr 2019 22:22:58 +0000
+Subject: x86/mm/mem_encrypt: Disable all instrumentation for early SME setup
+Git-commit: b51ce3744f115850166f3d6c292b9c8cb849ad4f
+Patch-mainline: v5.1
+References: bsc#1114279
+
+Enablement of AMD's Secure Memory Encryption feature is determined very
+early after start_kernel() is entered. Part of this procedure involves
+scanning the command line for the parameter 'mem_encrypt'.
+
+To determine intended state, the function sme_enable() uses library
+functions cmdline_find_option() and strncmp(). Their use occurs early
+enough such that it cannot be assumed that any instrumentation subsystem
+is initialized.
+
+For example, making calls to a KASAN-instrumented function before KASAN
+is set up will result in the use of uninitialized memory and a boot
+failure.
+
+When AMD's SME support is enabled, conditionally disable instrumentation
+of these dependent functions in lib/string.c and arch/x86/lib/cmdline.c.
+
+ [ bp: Get rid of intermediary nostackp var and cleanup whitespace. ]
+
+Fixes: aca20d546214 ("x86/mm: Add support to make use of Secure Memory Encryption")
+Reported-by: Li RongQing <lirongqing@baidu.com>
+Signed-off-by: Gary R Hook <gary.hook@amd.com>
+Signed-off-by: Borislav Petkov <bp@suse.de>
+Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
+Cc: Andrew Morton <akpm@linux-foundation.org>
+Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Cc: Boris Brezillon <bbrezillon@kernel.org>
+Cc: Coly Li <colyli@suse.de>
+Cc: "dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>
+Cc: "H. Peter Anvin" <hpa@zytor.com>
+Cc: Ingo Molnar <mingo@redhat.com>
+Cc: Kees Cook <keescook@chromium.org>
+Cc: Kent Overstreet <kent.overstreet@gmail.com>
+Cc: "luto@kernel.org" <luto@kernel.org>
+Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
+Cc: Matthew Wilcox <willy@infradead.org>
+Cc: "mingo@redhat.com" <mingo@redhat.com>
+Cc: "peterz@infradead.org" <peterz@infradead.org>
+Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Cc: x86-ml <x86@kernel.org>
+Link: https://lkml.kernel.org/r/155657657552.7116.18363762932464011367.stgit@sosrh3.amd.com
+---
+ arch/x86/lib/Makefile | 12 ++++++++++++
+ lib/Makefile | 11 +++++++++++
+ 2 files changed, 23 insertions(+)
+
+--- a/arch/x86/lib/Makefile
++++ b/arch/x86/lib/Makefile
+@@ -5,6 +5,18 @@
+ # Produces uninteresting flaky coverage.
+ KCOV_INSTRUMENT_delay.o := n
+
++# Early boot use of cmdline; don't instrument it
++ifdef CONFIG_AMD_MEM_ENCRYPT
++KCOV_INSTRUMENT_cmdline.o := n
++KASAN_SANITIZE_cmdline.o := n
++
++ifdef CONFIG_FUNCTION_TRACER
++CFLAGS_REMOVE_cmdline.o = -pg
++endif
++
++CFLAGS_cmdline.o := $(call cc-option, -fno-stack-protector)
++endif
++
+ inat_tables_script = $(srctree)/arch/x86/tools/gen-insn-attr-x86.awk
+ inat_tables_maps = $(srctree)/arch/x86/lib/x86-opcode-map.txt
+ quiet_cmd_inat_tables = GEN $@
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -16,6 +16,17 @@ KCOV_INSTRUMENT_list_debug.o := n
+ KCOV_INSTRUMENT_debugobjects.o := n
+ KCOV_INSTRUMENT_dynamic_debug.o := n
+
++# Early boot use of cmdline, don't instrument it
++ifdef CONFIG_AMD_MEM_ENCRYPT
++KASAN_SANITIZE_string.o := n
++
++ifdef CONFIG_FUNCTION_TRACER
++CFLAGS_REMOVE_string.o = -pg
++endif
++
++CFLAGS_string.o := $(call cc-option, -fno-stack-protector)
++endif
++
+ lib-y := ctype.o string.o vsprintf.o cmdline.o \
+ rbtree.o radix-tree.o dump_stack.o timerqueue.o\
+ idr.o int_sqrt.o extable.o \
diff --git a/patches.arch/x86-speculation-mds-revert-cpu-buffer-clear-on-double-fault-exit.patch b/patches.arch/x86-speculation-mds-revert-cpu-buffer-clear-on-double-fault-exit.patch
new file mode 100644
index 0000000000..4e0b16cc72
--- /dev/null
+++ b/patches.arch/x86-speculation-mds-revert-cpu-buffer-clear-on-double-fault-exit.patch
@@ -0,0 +1,70 @@
+From: Andy Lutomirski <luto@kernel.org>
+Date: Tue, 14 May 2019 13:24:39 -0700
+Subject: x86/speculation/mds: Revert CPU buffer clear on double fault exit
+Git-commit: 88640e1dcd089879530a49a8d212d1814678dfe7
+Patch-mainline: v5.2-rc1
+References: bsc#1114279
+
+The double fault ESPFIX path doesn't return to user mode at all --
+it returns back to the kernel by simulating a #GP fault.
+prepare_exit_to_usermode() will run on the way out of
+general_protection before running user code.
+
+Signed-off-by: Andy Lutomirski <luto@kernel.org>
+Cc: Borislav Petkov <bp@suse.de>
+Cc: Frederic Weisbecker <frederic@kernel.org>
+Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Cc: Jon Masters <jcm@redhat.com>
+Cc: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Cc: stable@vger.kernel.org
+Fixes: 04dcbdb80578 ("x86/speculation/mds: Clear CPU buffers on exit to user")
+Link: http://lkml.kernel.org/r/ac97612445c0a44ee10374f6ea79c222fe22a5c4.1557865329.git.luto@kernel.org
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+Acked-by: Borislav Petkov <bp@suse.de>
+---
+ Documentation/x86/mds.rst | 7 -------
+ arch/x86/kernel/traps.c | 8 --------
+ 2 files changed, 15 deletions(-)
+
+--- a/arch/x86/kernel/traps.c
++++ b/arch/x86/kernel/traps.c
+@@ -59,7 +59,6 @@
+ #include <asm/alternative.h>
+ #include <asm/fpu/xstate.h>
+ #include <asm/trace/mpx.h>
+-#include <asm/nospec-branch.h>
+ #include <asm/mpx.h>
+ #include <asm/vm86.h>
+ #include <asm/umip.h>
+@@ -394,13 +393,6 @@ dotraplinkage void do_double_fault(struc
+ regs->ip = (unsigned long)general_protection;
+ regs->sp = (unsigned long)&gpregs->orig_ax;
+
+- /*
+- * This situation can be triggered by userspace via
+- * modify_ldt(2) and the return does not take the regular
+- * user space exit, so a CPU buffer clear is required when
+- * MDS mitigation is enabled.
+- */
+- mds_user_clear_cpu_buffers();
+ return;
+ }
+ #endif
+--- a/Documentation/x86/mds.rst
++++ b/Documentation/x86/mds.rst
+@@ -157,13 +157,6 @@ Mitigation points
+ mitigated on the return from do_nmi() to provide almost complete
+ coverage.
+
+- - Double fault (#DF):
+-
+- A double fault is usually fatal, but the ESPFIX workaround, which can
+- be triggered from user space through modify_ldt(2) is a recoverable
+- double fault. #DF uses the paranoid exit path, so explicit mitigation
+- in the double fault handler is required.
+-
+ - Machine Check Exception (#MC):
+
+ Another corner case is a #MC which hits between the CPU buffer clear
diff --git a/patches.drivers/drivers-rapidio-devices-rio_mport_cdev.c-fix-resourc.patch b/patches.drivers/drivers-rapidio-devices-rio_mport_cdev.c-fix-resourc.patch
new file mode 100644
index 0000000000..5f2be1e44a
--- /dev/null
+++ b/patches.drivers/drivers-rapidio-devices-rio_mport_cdev.c-fix-resourc.patch
@@ -0,0 +1,44 @@
+From b1402dcb5643b7a27d46a05edd7491d49ba0e248 Mon Sep 17 00:00:00 2001
+From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
+Date: Fri, 17 Nov 2017 15:37:57 -0800
+Subject: [PATCH] drivers/rapidio/devices/rio_mport_cdev.c: fix resource leak in error handling path in 'rio_dma_transfer()'
+Git-commit: b1402dcb5643b7a27d46a05edd7491d49ba0e248
+Patch-mainline: v4.15-rc1
+References: bsc#1051510
+
+If 'dma_map_sg()', we should branch to the existing error handling path
+to free some resources before returning.
+
+Link: http://lkml.kernel.org/r/61292a4f369229eee03394247385e955027283f8.1505687047.git.christophe.jaillet@wanadoo.fr
+Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
+Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
+Cc: Matt Porter <mporter@kernel.crashing.org>
+Cc: Alexandre Bounine <alexandre.bounine@idt.com>
+Cc: Lorenzo Stoakes <lstoakes@gmail.com>
+Cc: Jesper Nilsson <jesper.nilsson@axis.com>
+Cc: Christian K_nig <christian.koenig@amd.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/rapidio/devices/rio_mport_cdev.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/rapidio/devices/rio_mport_cdev.c b/drivers/rapidio/devices/rio_mport_cdev.c
+index 5c1b6388122a..86805747a422 100644
+--- a/drivers/rapidio/devices/rio_mport_cdev.c
++++ b/drivers/rapidio/devices/rio_mport_cdev.c
+@@ -963,7 +963,8 @@ rio_dma_transfer(struct file *filp, u32 transfer_mode,
+ req->sgt.sgl, req->sgt.nents, dir);
+ if (nents == -EFAULT) {
+ rmcd_error("Failed to map SG list");
+- return -EFAULT;
++ ret = -EFAULT;
++ goto err_pg;
+ }
+
+ ret = do_dma_request(req, xfer, sync, nents);
+--
+2.16.4
+
diff --git a/patches.drivers/drivers-rapidio-rio_cm.c-fix-potential-oops-in-riocm.patch b/patches.drivers/drivers-rapidio-rio_cm.c-fix-potential-oops-in-riocm.patch
new file mode 100644
index 0000000000..41da0a0e02
--- /dev/null
+++ b/patches.drivers/drivers-rapidio-rio_cm.c-fix-potential-oops-in-riocm.patch
@@ -0,0 +1,44 @@
+From 5ac188b12e7cbdd92dee60877d1fac913fc1d074 Mon Sep 17 00:00:00 2001
+From: Dan Carpenter <dan.carpenter@oracle.com>
+Date: Thu, 7 Mar 2019 16:29:33 -0800
+Subject: [PATCH] drivers/rapidio/rio_cm.c: fix potential oops in riocm_ch_listen()
+Git-commit: 5ac188b12e7cbdd92dee60877d1fac913fc1d074
+Patch-mainline: v5.1-rc1
+References: bsc#1051510
+
+If riocm_get_channel() fails, then we should just return -EINVAL.
+Calling riocm_put_channel() will trigger a NULL dereference and
+generally we should call put() if the get() didn't succeed.
+
+Link: http://lkml.kernel.org/r/20190110130230.GB27017@kadam
+Fixes: b6e8d4aa1110 ("rapidio: add RapidIO channelized messaging driver")
+Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
+Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
+Cc: Matt Porter <mporter@kernel.crashing.org>
+Cc: Alexandre Bounine <alexandre.bounine@idt.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/rapidio/rio_cm.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/rapidio/rio_cm.c b/drivers/rapidio/rio_cm.c
+index bad0e0ea4f30..cf45829585cb 100644
+--- a/drivers/rapidio/rio_cm.c
++++ b/drivers/rapidio/rio_cm.c
+@@ -1215,7 +1215,9 @@ static int riocm_ch_listen(u16 ch_id)
+ riocm_debug(CHOP, "(ch_%d)", ch_id);
+
+ ch = riocm_get_channel(ch_id);
+- if (!ch || !riocm_cmp_exch(ch, RIO_CM_CHAN_BOUND, RIO_CM_LISTEN))
++ if (!ch)
++ return -EINVAL;
++ if (!riocm_cmp_exch(ch, RIO_CM_CHAN_BOUND, RIO_CM_LISTEN))
+ ret = -EINVAL;
+ riocm_put_channel(ch);
+ return ret;
+--
+2.16.4
+
diff --git a/patches.drivers/edac-mc-fix-edac_mc_find-in-case-no-device-is-found.patch b/patches.drivers/edac-mc-fix-edac_mc_find-in-case-no-device-is-found.patch
new file mode 100644
index 0000000000..947777dc21
--- /dev/null
+++ b/patches.drivers/edac-mc-fix-edac_mc_find-in-case-no-device-is-found.patch
@@ -0,0 +1,60 @@
+From: Robert Richter <rrichter@marvell.com>
+Date: Tue, 14 May 2019 10:49:09 +0000
+Subject: EDAC/mc: Fix edac_mc_find() in case no device is found
+Git-commit: 29a0c843973bc385918158c6976e4dbe891df969
+Patch-mainline: v5.2-rc1
+References: bsc#1114279
+
+The function should return NULL in case no device is found, but it
+always returns the last checked mc device from the list even if the
+index did not match. Fix that.
+
+I did some analysis why this did not raise any issues for about 3 years
+and the reason is that edac_mc_find() is mostly used to search for
+existing devices. Thus, the bug is not triggered.
+
+ [ bp: Drop the if (mci->mc_idx > idx) test in favor of readability. ]
+
+Fixes: c73e8833bec5 ("EDAC, mc: Fix locking around mc_devices list")
+Signed-off-by: Robert Richter <rrichter@marvell.com>
+Signed-off-by: Borislav Petkov <bp@suse.de>
+Cc: "linux-edac@vger.kernel.org" <linux-edac@vger.kernel.org>
+Cc: James Morse <james.morse@arm.com>
+Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
+Link: https://lkml.kernel.org/r/20190514104838.15065-1-rrichter@marvell.com
+---
+ drivers/edac/edac_mc.c | 12 ++++--------
+ 1 file changed, 4 insertions(+), 8 deletions(-)
+
+diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c
+index 13594ffadcb3..64922c8fa7e3 100644
+--- a/drivers/edac/edac_mc.c
++++ b/drivers/edac/edac_mc.c
+@@ -679,22 +679,18 @@ static int del_mc_from_global_list(struct mem_ctl_info *mci)
+
+ struct mem_ctl_info *edac_mc_find(int idx)
+ {
+- struct mem_ctl_info *mci = NULL;
++ struct mem_ctl_info *mci;
+ struct list_head *item;
+
+ mutex_lock(&mem_ctls_mutex);
+
+ list_for_each(item, &mc_devices) {
+ mci = list_entry(item, struct mem_ctl_info, link);
+-
+- if (mci->mc_idx >= idx) {
+- if (mci->mc_idx == idx) {
+- goto unlock;
+- }
+- break;
+- }
++ if (mci->mc_idx == idx)
++ goto unlock;
+ }
+
++ mci = NULL;
+ unlock:
+ mutex_unlock(&mem_ctls_mutex);
+ return mci;
+
diff --git a/patches.drivers/hwmon-k10temp-27c-offset-needed-for-threadripper2.patch b/patches.drivers/hwmon-k10temp-27c-offset-needed-for-threadripper2.patch
new file mode 100644
index 0000000000..c3f0ba00b5
--- /dev/null
+++ b/patches.drivers/hwmon-k10temp-27c-offset-needed-for-threadripper2.patch
@@ -0,0 +1,28 @@
+From: Michael Larabel <michael@phoronix.com>
+Date: Tue, 7 Aug 2018 09:54:54 -0400
+Subject: hwmon: (k10temp) 27C Offset needed for Threadripper2
+Git-commit: 484a84f25ca7817c3662001316ba7d1e06b74ae2
+Patch-mainline: v4.19
+References: FATE#327735
+
+For at least the Threadripper 2950X and Threadripper 2990WX,
+it's confirmed a 27 degree offset is needed.
+
+Signed-off-by: Michael Larabel <michael@phoronix.com>
+Cc: stable@vger.kernel.org
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Acked-by: Jean Delvare <jdelvare@suse.de>
+
+diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c
+index 17c6460ae351..577e2ede5a1a 100644
+--- a/drivers/hwmon/k10temp.c
++++ b/drivers/hwmon/k10temp.c
+@@ -105,6 +105,8 @@ static const struct tctl_offset tctl_offset_table[] = {
+ { 0x17, "AMD Ryzen Threadripper 1950", 10000 },
+ { 0x17, "AMD Ryzen Threadripper 1920", 10000 },
+ { 0x17, "AMD Ryzen Threadripper 1910", 10000 },
++ { 0x17, "AMD Ryzen Threadripper 2950X", 27000 },
++ { 0x17, "AMD Ryzen Threadripper 2990WX", 27000 },
+ };
+
+ static void read_htcreg_pci(struct pci_dev *pdev, u32 *regval)
diff --git a/patches.drivers/hwmon-k10temp-add-hygon-dhyana-support.patch b/patches.drivers/hwmon-k10temp-add-hygon-dhyana-support.patch
new file mode 100644
index 0000000000..c24a4b3373
--- /dev/null
+++ b/patches.drivers/hwmon-k10temp-add-hygon-dhyana-support.patch
@@ -0,0 +1,39 @@
+From: Pu Wen <puwen@hygon.cn>
+Date: Sat, 8 Dec 2018 14:33:28 +0800
+Subject: hwmon: (k10temp) Add Hygon Dhyana support
+Git-commit: d93217d84c6c7ef74bfeb606a1fb1ee28720646b
+Patch-mainline: v5.0
+References: FATE#327735
+
+Add support for Hygon Dhyana family 18h processor for k10temp to get the
+temperature. As Hygon Dhyana shares the same function interface with AMD
+family 17h, so add Hygon PCI Vendor ID and reuse the code path of AMD.
+
+Signed-off-by: Pu Wen <puwen@hygon.cn>
+Acked-by: Borislav Petkov <bp@suse.de>
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Acked-by: Jean Delvare <jdelvare@suse.de>
+
+---
+ drivers/hwmon/k10temp.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/hwmon/k10temp.c
++++ b/drivers/hwmon/k10temp.c
+@@ -323,7 +323,7 @@ static int k10temp_probe(struct pci_dev
+ (boot_cpu_data.x86_model & 0xf0) == 0x70)) {
+ data->read_htcreg = read_htcreg_nb_f15;
+ data->read_tempreg = read_tempreg_nb_f15;
+- } else if (boot_cpu_data.x86 == 0x17) {
++ } else if (boot_cpu_data.x86 == 0x17 || boot_cpu_data.x86 == 0x18) {
+ data->temp_adjust_mask = 0x80000;
+ data->read_tempreg = read_tempreg_nb_f17;
+ data->show_tdie = true;
+@@ -360,6 +360,7 @@ static const struct pci_device_id k10tem
+ { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_17H_DF_F3) },
+ { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_17H_M10H_DF_F3) },
+ { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_17H_M30H_DF_F3) },
++ { PCI_VDEVICE(HYGON, PCI_DEVICE_ID_AMD_17H_DF_F3) },
+ {}
+ };
+ MODULE_DEVICE_TABLE(pci, k10temp_id_table);
diff --git a/patches.drivers/hwmon-k10temp-add-support-for-amd-family-17h-model-30h-cpus.patch b/patches.drivers/hwmon-k10temp-add-support-for-amd-family-17h-model-30h-cpus.patch
index 529de2ce30..ff0d2050cd 100644
--- a/patches.drivers/hwmon-k10temp-add-support-for-amd-family-17h-model-30h-cpus.patch
+++ b/patches.drivers/hwmon-k10temp-add-support-for-amd-family-17h-model-30h-cpus.patch
@@ -31,9 +31,9 @@ Link: http://lkml.kernel.org/r/20181106200754.60722-5-brian.woods@amd.com
--- a/drivers/hwmon/k10temp.c
+++ b/drivers/hwmon/k10temp.c
@@ -215,6 +215,7 @@ static const struct pci_device_id k10tem
- { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_M60H_NB_F3) },
- { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_NB_F3) },
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_M30H_NB_F3) },
+ { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_17H_DF_F3) },
+ { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_17H_M10H_DF_F3) },
+ { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_17H_M30H_DF_F3) },
{}
};
diff --git a/patches.drivers/hwmon-k10temp-add-support-for-amd-ryzen-w-vega-graphics.patch b/patches.drivers/hwmon-k10temp-add-support-for-amd-ryzen-w-vega-graphics.patch
new file mode 100644
index 0000000000..ea4a4ea221
--- /dev/null
+++ b/patches.drivers/hwmon-k10temp-add-support-for-amd-ryzen-w-vega-graphics.patch
@@ -0,0 +1,40 @@
+From: Guenter Roeck <linux@roeck-us.net>
+Date: Tue, 24 Apr 2018 08:59:45 -0700
+Subject: hwmon: (k10temp) Add support for AMD Ryzen w/ Vega graphics
+Git-commit: 877d8948d0aa402fbbede138fc73432bb335b65f
+Patch-mainline: v4.17
+References: FATE#327735
+
+Enable k10temp for AMD Ryzen APUs w/ Vega Mobile Gfx.
+
+Based on patch from René Rebe <rene@exactcode.de>. Dropped temperature
+offsets since those are not supposed to apply for the affected CPUs.
+
+Cc: stable@vger.kernel.org # v4.16+
+Cc: René Rebe <rene@exactcode.de>
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Acked-by: Jean Delvare <jdelvare@suse.de>
+
+diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c
+index d19d08f81c6f..d2cc55e21374 100644
+--- a/drivers/hwmon/k10temp.c
++++ b/drivers/hwmon/k10temp.c
+@@ -40,6 +40,10 @@ static DEFINE_MUTEX(nb_smu_ind_mutex);
+ #define PCI_DEVICE_ID_AMD_17H_DF_F3 0x1463
+ #endif
+
++#ifndef PCI_DEVICE_ID_AMD_17H_RR_NB
++#define PCI_DEVICE_ID_AMD_17H_RR_NB 0x15d0
++#endif
++
+ /* CPUID function 0x80000001, ebx */
+ #define CPUID_PKGTYPE_MASK 0xf0000000
+ #define CPUID_PKGTYPE_F 0x00000000
+@@ -298,6 +302,7 @@ static const struct pci_device_id k10temp_id_table[] = {
+ { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_NB_F3) },
+ { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_M30H_NB_F3) },
+ { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_17H_DF_F3) },
++ { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_17H_RR_NB) },
+ {}
+ };
+ MODULE_DEVICE_TABLE(pci, k10temp_id_table);
diff --git a/patches.drivers/hwmon-k10temp-add-support-for-family-17h.patch b/patches.drivers/hwmon-k10temp-add-support-for-family-17h.patch
new file mode 100644
index 0000000000..cc7b2e4997
--- /dev/null
+++ b/patches.drivers/hwmon-k10temp-add-support-for-family-17h.patch
@@ -0,0 +1,67 @@
+From: Guenter Roeck <linux@roeck-us.net>
+Date: Mon, 4 Sep 2017 18:33:53 -0700
+Subject: hwmon: (k10temp) Add support for family 17h
+Git-commit: 9af0a9aecdb945cd5513941ffdcbcc031009b402
+Patch-mainline: v4.15
+References: FATE#327735
+
+Add support for temperature sensors on Family 17h (Ryzen) processors.
+
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Acked-by: Jean Delvare <jdelvare@suse.de>
+
+diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c
+index fc8076c7e1a1..c4dac53206c3 100644
+--- a/drivers/hwmon/k10temp.c
++++ b/drivers/hwmon/k10temp.c
+@@ -36,6 +36,10 @@ MODULE_PARM_DESC(force, "force loading on processors with erratum 319");
+ /* Provide lock for writing to NB_SMU_IND_ADDR */
+ static DEFINE_MUTEX(nb_smu_ind_mutex);
+
++#ifndef PCI_DEVICE_ID_AMD_17H_DF_F3
++#define PCI_DEVICE_ID_AMD_17H_DF_F3 0x1463
++#endif
++
+ /* CPUID function 0x80000001, ebx */
+ #define CPUID_PKGTYPE_MASK 0xf0000000
+ #define CPUID_PKGTYPE_F 0x00000000
+@@ -61,6 +65,9 @@ static DEFINE_MUTEX(nb_smu_ind_mutex);
+ */
+ #define F15H_M60H_REPORTED_TEMP_CTRL_OFFSET 0xd8200ca4
+
++/* F17h M01h Access througn SMN */
++#define F17H_M01H_REPORTED_TEMP_CTRL_OFFSET 0x00059800
++
+ struct k10temp_data {
+ struct pci_dev *pdev;
+ void (*read_tempreg)(struct pci_dev *pdev, u32 *regval);
+@@ -88,6 +95,12 @@ static void read_tempreg_nb_f15(struct pci_dev *pdev, u32 *regval)
+ F15H_M60H_REPORTED_TEMP_CTRL_OFFSET, regval);
+ }
+
++static void read_tempreg_nb_f17(struct pci_dev *pdev, u32 *regval)
++{
++ amd_nb_index_read(pdev, PCI_DEVFN(0, 0), 0x60,
++ F17H_M01H_REPORTED_TEMP_CTRL_OFFSET, regval);
++}
++
+ static ssize_t temp1_input_show(struct device *dev,
+ struct device_attribute *attr, char *buf)
+ {
+@@ -224,6 +237,8 @@ static int k10temp_probe(struct pci_dev *pdev,
+ if (boot_cpu_data.x86 == 0x15 && (boot_cpu_data.x86_model == 0x60 ||
+ boot_cpu_data.x86_model == 0x70))
+ data->read_tempreg = read_tempreg_nb_f15;
++ else if (boot_cpu_data.x86 == 0x17)
++ data->read_tempreg = read_tempreg_nb_f17;
+ else
+ data->read_tempreg = read_tempreg_pci;
+
+@@ -242,6 +257,7 @@ static const struct pci_device_id k10temp_id_table[] = {
+ { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_M60H_NB_F3) },
+ { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_NB_F3) },
+ { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_M30H_NB_F3) },
++ { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_17H_DF_F3) },
+ {}
+ };
+ MODULE_DEVICE_TABLE(pci, k10temp_id_table);
diff --git a/patches.drivers/hwmon-k10temp-add-support-for-stoney-ridge-and-bristol.patch b/patches.drivers/hwmon-k10temp-add-support-for-stoney-ridge-and-bristol.patch
new file mode 100644
index 0000000000..cb9253540c
--- /dev/null
+++ b/patches.drivers/hwmon-k10temp-add-support-for-stoney-ridge-and-bristol.patch
@@ -0,0 +1,38 @@
+From: Guenter Roeck <linux@roeck-us.net>
+Date: Sun, 29 Apr 2018 09:16:45 -0700
+Subject: hwmon: (k10temp) Add support for Stoney Ridge and Bristol Ridge CPUs
+Git-commit: ccaf63b4d6eaf3447037cefbb0b1038fa80c6639
+Patch-mainline: v4.18
+References: FATE#327735
+
+Add support for Stoney Ridge and Bristol Ridge (Family 15h Model 0x70)
+CPUs. Registers match those of Family 15h Model 0x60.
+
+Cc: stable@vger.kernel.org # v4.16+
+Tested-by: Gabriel Craciunescu <nix.or.die@gmail.com>
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Acked-by: Jean Delvare <jdelvare@suse.de>
+
+diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c
+index 3b73dee6fdc6..e97105ae4158 100644
+--- a/drivers/hwmon/k10temp.c
++++ b/drivers/hwmon/k10temp.c
+@@ -37,6 +37,10 @@ MODULE_PARM_DESC(force, "force loading on processors with erratum 319");
+ /* Provide lock for writing to NB_SMU_IND_ADDR */
+ static DEFINE_MUTEX(nb_smu_ind_mutex);
+
++#ifndef PCI_DEVICE_ID_AMD_15H_M70H_NB_F3
++#define PCI_DEVICE_ID_AMD_15H_M70H_NB_F3 0x15b3
++#endif
++
+ #ifndef PCI_DEVICE_ID_AMD_17H_DF_F3
+ #define PCI_DEVICE_ID_AMD_17H_DF_F3 0x1463
+ #endif
+@@ -320,6 +324,7 @@ static const struct pci_device_id k10temp_id_table[] = {
+ { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_M10H_F3) },
+ { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_M30H_NB_F3) },
+ { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_M60H_NB_F3) },
++ { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_M70H_NB_F3) },
+ { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_NB_F3) },
+ { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_M30H_NB_F3) },
+ { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_17H_DF_F3) },
diff --git a/patches.drivers/hwmon-k10temp-add-support-for-temperature-offsets.patch b/patches.drivers/hwmon-k10temp-add-support-for-temperature-offsets.patch
new file mode 100644
index 0000000000..3981e66da0
--- /dev/null
+++ b/patches.drivers/hwmon-k10temp-add-support-for-temperature-offsets.patch
@@ -0,0 +1,77 @@
+From: Guenter Roeck <linux@roeck-us.net>
+Date: Mon, 4 Sep 2017 18:33:53 -0700
+Subject: hwmon: (k10temp) Add support for temperature offsets
+Git-commit: 1b50b776355fa6c6d7b3281a63c275d5c18d629d
+Patch-mainline: v4.15
+References: FATE#327735
+
+Add support for handling temperature offset values for various AMD CPUs,
+similar to the code used in the coretemp driver for Intel CPUs. This is
+primarily for Ryzen CPUs (which has documented temperature offsets),
+but the code is kept generic to simplify adding additional CPUs.
+
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Acked-by: Jean Delvare <jdelvare@suse.de>
+
+diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c
+index c4dac53206c3..46a54ed23410 100644
+--- a/drivers/hwmon/k10temp.c
++++ b/drivers/hwmon/k10temp.c
+@@ -71,6 +71,24 @@ static DEFINE_MUTEX(nb_smu_ind_mutex);
+ struct k10temp_data {
+ struct pci_dev *pdev;
+ void (*read_tempreg)(struct pci_dev *pdev, u32 *regval);
++ int temp_offset;
++};
++
++struct tctl_offset {
++ u8 model;
++ char const *id;
++ int offset;
++};
++
++static const struct tctl_offset tctl_offset_table[] = {
++ { 0x17, "AMD Ryzen 7 1600X", 20000 },
++ { 0x17, "AMD Ryzen 7 1700X", 20000 },
++ { 0x17, "AMD Ryzen 7 1800X", 20000 },
++ { 0x17, "AMD Ryzen Threadripper 1950X", 27000 },
++ { 0x17, "AMD Ryzen Threadripper 1920X", 27000 },
++ { 0x17, "AMD Ryzen Threadripper 1950", 10000 },
++ { 0x17, "AMD Ryzen Threadripper 1920", 10000 },
++ { 0x17, "AMD Ryzen Threadripper 1910", 10000 },
+ };
+
+ static void read_tempreg_pci(struct pci_dev *pdev, u32 *regval)
+@@ -110,6 +128,7 @@ static ssize_t temp1_input_show(struct device *dev,
+
+ data->read_tempreg(data->pdev, &regval);
+ temp = (regval >> 21) * 125;
++ temp -= data->temp_offset;
+
+ return sprintf(buf, "%u\n", temp);
+ }
+@@ -217,6 +236,7 @@ static int k10temp_probe(struct pci_dev *pdev,
+ struct device *dev = &pdev->dev;
+ struct k10temp_data *data;
+ struct device *hwmon_dev;
++ int i;
+
+ if (unreliable) {
+ if (!force) {
+@@ -242,6 +262,16 @@ static int k10temp_probe(struct pci_dev *pdev,
+ else
+ data->read_tempreg = read_tempreg_pci;
+
++ for (i = 0; i < ARRAY_SIZE(tctl_offset_table); i++) {
++ const struct tctl_offset *entry = &tctl_offset_table[i];
++
++ if (boot_cpu_data.x86 == entry->model &&
++ strstr(boot_cpu_data.x86_model_id, entry->id)) {
++ data->temp_offset = entry->offset;
++ break;
++ }
++ }
++
+ hwmon_dev = devm_hwmon_device_register_with_groups(dev, "k10temp", data,
+ k10temp_groups);
+ return PTR_ERR_OR_ZERO(hwmon_dev);
diff --git a/patches.drivers/hwmon-k10temp-add-temperature-offset-for-ryzen-1900x.patch b/patches.drivers/hwmon-k10temp-add-temperature-offset-for-ryzen-1900x.patch
new file mode 100644
index 0000000000..32b6594373
--- /dev/null
+++ b/patches.drivers/hwmon-k10temp-add-temperature-offset-for-ryzen-1900x.patch
@@ -0,0 +1,25 @@
+From: Guenter Roeck <linux@roeck-us.net>
+Date: Fri, 19 Jan 2018 06:38:03 -0800
+Subject: hwmon: (k10temp) Add temperature offset for Ryzen 1900X
+Git-commit: 6509614fdd2d05c6926d50901a45d5dfb852b715
+Patch-mainline: v4.16
+References: FATE#327735
+
+Like the other CPUs from the same series, the 1900X has a
+temperature offset of 27 degrees C.
+
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Acked-by: Jean Delvare <jdelvare@suse.de>
+
+diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c
+index 0721e175664a..06b4e1c78bd8 100644
+--- a/drivers/hwmon/k10temp.c
++++ b/drivers/hwmon/k10temp.c
+@@ -86,6 +86,7 @@ static const struct tctl_offset tctl_offset_table[] = {
+ { 0x17, "AMD Ryzen 7 1800X", 20000 },
+ { 0x17, "AMD Ryzen Threadripper 1950X", 27000 },
+ { 0x17, "AMD Ryzen Threadripper 1920X", 27000 },
++ { 0x17, "AMD Ryzen Threadripper 1900X", 27000 },
+ { 0x17, "AMD Ryzen Threadripper 1950", 10000 },
+ { 0x17, "AMD Ryzen Threadripper 1920", 10000 },
+ { 0x17, "AMD Ryzen Threadripper 1910", 10000 },
diff --git a/patches.drivers/hwmon-k10temp-add-temperature-offset-for-ryzen-2700x.patch b/patches.drivers/hwmon-k10temp-add-temperature-offset-for-ryzen-2700x.patch
new file mode 100644
index 0000000000..d2a177033b
--- /dev/null
+++ b/patches.drivers/hwmon-k10temp-add-temperature-offset-for-ryzen-2700x.patch
@@ -0,0 +1,62 @@
+From: Guenter Roeck <linux@roeck-us.net>
+Date: Tue, 24 Apr 2018 06:55:55 -0700
+Subject: hwmon: (k10temp) Add temperature offset for Ryzen 2700X
+Git-commit: 1b59788979acd230b9627276c76f6e6ba2c4709c
+Patch-mainline: v4.17
+References: FATE#327735
+
+Ryzen 2700X has a temperature offset of 10 degrees C. If bit 19 of the
+Temperature Control register is set, there is an additional offset of
+49 degrees C. Take this into account as well.
+
+Cc: stable@vger.kernel.org # v4.16+
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Acked-by: Jean Delvare <jdelvare@suse.de>
+
+diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c
+index 051a72eecb24..d19d08f81c6f 100644
+--- a/drivers/hwmon/k10temp.c
++++ b/drivers/hwmon/k10temp.c
+@@ -72,6 +72,7 @@ struct k10temp_data {
+ struct pci_dev *pdev;
+ void (*read_tempreg)(struct pci_dev *pdev, u32 *regval);
+ int temp_offset;
++ u32 temp_adjust_mask;
+ };
+
+ struct tctl_offset {
+@@ -84,6 +85,7 @@ static const struct tctl_offset tctl_offset_table[] = {
+ { 0x17, "AMD Ryzen 5 1600X", 20000 },
+ { 0x17, "AMD Ryzen 7 1700X", 20000 },
+ { 0x17, "AMD Ryzen 7 1800X", 20000 },
++ { 0x17, "AMD Ryzen 7 2700X", 10000 },
+ { 0x17, "AMD Ryzen Threadripper 1950X", 27000 },
+ { 0x17, "AMD Ryzen Threadripper 1920X", 27000 },
+ { 0x17, "AMD Ryzen Threadripper 1900X", 27000 },
+@@ -129,6 +131,8 @@ static ssize_t temp1_input_show(struct device *dev,
+
+ data->read_tempreg(data->pdev, &regval);
+ temp = (regval >> 21) * 125;
++ if (regval & data->temp_adjust_mask)
++ temp -= 49000;
+ if (temp > data->temp_offset)
+ temp -= data->temp_offset;
+ else
+@@ -259,12 +263,14 @@ static int k10temp_probe(struct pci_dev *pdev,
+ data->pdev = pdev;
+
+ if (boot_cpu_data.x86 == 0x15 && (boot_cpu_data.x86_model == 0x60 ||
+- boot_cpu_data.x86_model == 0x70))
++ boot_cpu_data.x86_model == 0x70)) {
+ data->read_tempreg = read_tempreg_nb_f15;
+- else if (boot_cpu_data.x86 == 0x17)
++ } else if (boot_cpu_data.x86 == 0x17) {
++ data->temp_adjust_mask = 0x80000;
+ data->read_tempreg = read_tempreg_nb_f17;
+- else
++ } else {
+ data->read_tempreg = read_tempreg_pci;
++ }
+
+ for (i = 0; i < ARRAY_SIZE(tctl_offset_table); i++) {
+ const struct tctl_offset *entry = &tctl_offset_table[i];
diff --git a/patches.drivers/hwmon-k10temp-correct-model-name-for-ryzen-1600x.patch b/patches.drivers/hwmon-k10temp-correct-model-name-for-ryzen-1600x.patch
new file mode 100644
index 0000000000..a9e79d94a3
--- /dev/null
+++ b/patches.drivers/hwmon-k10temp-correct-model-name-for-ryzen-1600x.patch
@@ -0,0 +1,25 @@
+From: Guenter Roeck <linux@roeck-us.net>
+Date: Mon, 13 Nov 2017 12:38:23 -0800
+Subject: hwmon: (k10temp) Correct model name for Ryzen 1600X
+Git-commit: ab5ee24615f9dd8b0cd199403959f8b13309e7b1
+Patch-mainline: v4.15
+References: FATE#327735
+
+Ryzen 1600X is a Ryzen 5 processor.
+
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Acked-by: Jean Delvare <jdelvare@suse.de>
+
+diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c
+index 46a54ed23410..0721e175664a 100644
+--- a/drivers/hwmon/k10temp.c
++++ b/drivers/hwmon/k10temp.c
+@@ -81,7 +81,7 @@ struct tctl_offset {
+ };
+
+ static const struct tctl_offset tctl_offset_table[] = {
+- { 0x17, "AMD Ryzen 7 1600X", 20000 },
++ { 0x17, "AMD Ryzen 5 1600X", 20000 },
+ { 0x17, "AMD Ryzen 7 1700X", 20000 },
+ { 0x17, "AMD Ryzen 7 1800X", 20000 },
+ { 0x17, "AMD Ryzen Threadripper 1950X", 27000 },
diff --git a/patches.drivers/hwmon-k10temp-display-both-tctl-and-tdie.patch b/patches.drivers/hwmon-k10temp-display-both-tctl-and-tdie.patch
new file mode 100644
index 0000000000..7bebab0460
--- /dev/null
+++ b/patches.drivers/hwmon-k10temp-display-both-tctl-and-tdie.patch
@@ -0,0 +1,138 @@
+From: Guenter Roeck <linux@roeck-us.net>
+Date: Thu, 26 Apr 2018 12:22:29 -0700
+Subject: hwmon: (k10temp) Display both Tctl and Tdie
+Git-commit: f934c0599ecab63ec9cca0000315240c1202d20c
+Patch-mainline: v4.18
+References: FATE#327735
+
+On some AMD CPUs, there is a different between the die temperature
+(Tdie) and the reported temperature (Tctl). Tdie is the real measured
+temperature, and Tctl is used for fan control. Lets report both for
+affected CPUs.
+
+Tested-by: Gabriel Craciunescu <nix.or.die@gmail.com>
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Acked-by: Jean Delvare <jdelvare@suse.de>
+
+diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c
+index e97105ae4158..d3fae5a8e508 100644
+--- a/drivers/hwmon/k10temp.c
++++ b/drivers/hwmon/k10temp.c
+@@ -85,6 +85,7 @@ struct k10temp_data {
+ void (*read_tempreg)(struct pci_dev *pdev, u32 *regval);
+ int temp_offset;
+ u32 temp_adjust_mask;
++ bool show_tdie;
+ };
+
+ struct tctl_offset {
+@@ -145,17 +146,24 @@ static void read_tempreg_nb_f17(struct pci_dev *pdev, u32 *regval)
+ F17H_M01H_REPORTED_TEMP_CTRL_OFFSET, regval);
+ }
+
+-static ssize_t temp1_input_show(struct device *dev,
+- struct device_attribute *attr, char *buf)
++unsigned int get_raw_temp(struct k10temp_data *data)
+ {
+- struct k10temp_data *data = dev_get_drvdata(dev);
+- u32 regval;
+ unsigned int temp;
++ u32 regval;
+
+ data->read_tempreg(data->pdev, &regval);
+ temp = (regval >> 21) * 125;
+ if (regval & data->temp_adjust_mask)
+ temp -= 49000;
++ return temp;
++}
++
++static ssize_t temp1_input_show(struct device *dev,
++ struct device_attribute *attr, char *buf)
++{
++ struct k10temp_data *data = dev_get_drvdata(dev);
++ unsigned int temp = get_raw_temp(data);
++
+ if (temp > data->temp_offset)
+ temp -= data->temp_offset;
+ else
+@@ -164,6 +172,23 @@ static ssize_t temp1_input_show(struct device *dev,
+ return sprintf(buf, "%u\n", temp);
+ }
+
++static ssize_t temp2_input_show(struct device *dev,
++ struct device_attribute *devattr, char *buf)
++{
++ struct k10temp_data *data = dev_get_drvdata(dev);
++ unsigned int temp = get_raw_temp(data);
++
++ return sprintf(buf, "%u\n", temp);
++}
++
++static ssize_t temp_label_show(struct device *dev,
++ struct device_attribute *devattr, char *buf)
++{
++ struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
++
++ return sprintf(buf, "%s\n", attr->index ? "Tctl" : "Tdie");
++}
++
+ static ssize_t temp1_max_show(struct device *dev,
+ struct device_attribute *attr, char *buf)
+ {
+@@ -191,16 +216,23 @@ static DEVICE_ATTR_RO(temp1_max);
+ static SENSOR_DEVICE_ATTR(temp1_crit, S_IRUGO, show_temp_crit, NULL, 0);
+ static SENSOR_DEVICE_ATTR(temp1_crit_hyst, S_IRUGO, show_temp_crit, NULL, 1);
+
++static SENSOR_DEVICE_ATTR(temp1_label, 0444, temp_label_show, NULL, 0);
++static DEVICE_ATTR_RO(temp2_input);
++static SENSOR_DEVICE_ATTR(temp2_label, 0444, temp_label_show, NULL, 1);
++
+ static umode_t k10temp_is_visible(struct kobject *kobj,
+ struct attribute *attr, int index)
+ {
+ struct device *dev = container_of(kobj, struct device, kobj);
+ struct k10temp_data *data = dev_get_drvdata(dev);
+ struct pci_dev *pdev = data->pdev;
++ u32 reg;
+
+- if (index >= 2) {
+- u32 reg;
+-
++ switch (index) {
++ case 0 ... 1: /* temp1_input, temp1_max */
++ default:
++ break;
++ case 2 ... 3: /* temp1_crit, temp1_crit_hyst */
+ if (!data->read_htcreg)
+ return 0;
+
+@@ -212,6 +244,11 @@ static umode_t k10temp_is_visible(struct kobject *kobj,
+ data->read_htcreg(data->pdev, &reg);
+ if (!(reg & HTC_ENABLE))
+ return 0;
++ break;
++ case 4 ... 6: /* temp1_label, temp2_input, temp2_label */
++ if (!data->show_tdie)
++ return 0;
++ break;
+ }
+ return attr->mode;
+ }
+@@ -221,6 +258,9 @@ static struct attribute *k10temp_attrs[] = {
+ &dev_attr_temp1_max.attr,
+ &sensor_dev_attr_temp1_crit.dev_attr.attr,
+ &sensor_dev_attr_temp1_crit_hyst.dev_attr.attr,
++ &sensor_dev_attr_temp1_label.dev_attr.attr,
++ &dev_attr_temp2_input.attr,
++ &sensor_dev_attr_temp2_label.dev_attr.attr,
+ NULL
+ };
+
+@@ -296,6 +336,7 @@ static int k10temp_probe(struct pci_dev *pdev,
+ } else if (boot_cpu_data.x86 == 0x17) {
+ data->temp_adjust_mask = 0x80000;
+ data->read_tempreg = read_tempreg_nb_f17;
++ data->show_tdie = true;
+ } else {
+ data->read_htcreg = read_htcreg_pci;
+ data->read_tempreg = read_tempreg_pci;
diff --git a/patches.drivers/hwmon-k10temp-fix-reading-critical-temperature-register.patch b/patches.drivers/hwmon-k10temp-fix-reading-critical-temperature-register.patch
new file mode 100644
index 0000000000..f01561de90
--- /dev/null
+++ b/patches.drivers/hwmon-k10temp-fix-reading-critical-temperature-register.patch
@@ -0,0 +1,116 @@
+From: Guenter Roeck <linux@roeck-us.net>
+Date: Sun, 29 Apr 2018 08:08:24 -0700
+Subject: hwmon: (k10temp) Fix reading critical temperature register
+Git-commit: 40626a1bf657eef557fcee9e1b8ef5b4f5b56dcd
+Patch-mainline: v4.17
+References: FATE#327735
+
+The HTC (Hardware Temperature Control) register has moved
+for recent chips.
+
+Cc: stable@vger.kernel.org # v4.16+
+Tested-by: Gabriel Craciunescu <nix.or.die@gmail.com>
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Acked-by: Jean Delvare <jdelvare@suse.de>
+
+diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c
+index d2cc55e21374..34b5448b00be 100644
+--- a/drivers/hwmon/k10temp.c
++++ b/drivers/hwmon/k10temp.c
+@@ -63,10 +63,12 @@ static DEFINE_MUTEX(nb_smu_ind_mutex);
+ #define NB_CAP_HTC 0x00000400
+
+ /*
+- * For F15h M60h, functionality of REG_REPORTED_TEMPERATURE
+- * has been moved to D0F0xBC_xD820_0CA4 [Reported Temperature
+- * Control]
++ * For F15h M60h and M70h, REG_HARDWARE_THERMAL_CONTROL
++ * and REG_REPORTED_TEMPERATURE have been moved to
++ * D0F0xBC_xD820_0C64 [Hardware Temperature Control]
++ * D0F0xBC_xD820_0CA4 [Reported Temperature Control]
+ */
++#define F15H_M60H_HARDWARE_TEMP_CTRL_OFFSET 0xd8200c64
+ #define F15H_M60H_REPORTED_TEMP_CTRL_OFFSET 0xd8200ca4
+
+ /* F17h M01h Access througn SMN */
+@@ -74,6 +76,7 @@ static DEFINE_MUTEX(nb_smu_ind_mutex);
+
+ struct k10temp_data {
+ struct pci_dev *pdev;
++ void (*read_htcreg)(struct pci_dev *pdev, u32 *regval);
+ void (*read_tempreg)(struct pci_dev *pdev, u32 *regval);
+ int temp_offset;
+ u32 temp_adjust_mask;
+@@ -98,6 +101,11 @@ static const struct tctl_offset tctl_offset_table[] = {
+ { 0x17, "AMD Ryzen Threadripper 1910", 10000 },
+ };
+
++static void read_htcreg_pci(struct pci_dev *pdev, u32 *regval)
++{
++ pci_read_config_dword(pdev, REG_HARDWARE_THERMAL_CONTROL, regval);
++}
++
+ static void read_tempreg_pci(struct pci_dev *pdev, u32 *regval)
+ {
+ pci_read_config_dword(pdev, REG_REPORTED_TEMPERATURE, regval);
+@@ -114,6 +122,12 @@ static void amd_nb_index_read(struct pci_dev *pdev, unsigned int devfn,
+ mutex_unlock(&nb_smu_ind_mutex);
+ }
+
++static void read_htcreg_nb_f15(struct pci_dev *pdev, u32 *regval)
++{
++ amd_nb_index_read(pdev, PCI_DEVFN(0, 0), 0xb8,
++ F15H_M60H_HARDWARE_TEMP_CTRL_OFFSET, regval);
++}
++
+ static void read_tempreg_nb_f15(struct pci_dev *pdev, u32 *regval)
+ {
+ amd_nb_index_read(pdev, PCI_DEVFN(0, 0), 0xb8,
+@@ -160,8 +174,7 @@ static ssize_t show_temp_crit(struct device *dev,
+ u32 regval;
+ int value;
+
+- pci_read_config_dword(data->pdev,
+- REG_HARDWARE_THERMAL_CONTROL, &regval);
++ data->read_htcreg(data->pdev, &regval);
+ value = ((regval >> 16) & 0x7f) * 500 + 52000;
+ if (show_hyst)
+ value -= ((regval >> 24) & 0xf) * 500;
+@@ -181,13 +194,18 @@ static umode_t k10temp_is_visible(struct kobject *kobj,
+ struct pci_dev *pdev = data->pdev;
+
+ if (index >= 2) {
+- u32 reg_caps, reg_htc;
++ u32 reg;
++
++ if (!data->read_htcreg)
++ return 0;
+
+ pci_read_config_dword(pdev, REG_NORTHBRIDGE_CAPABILITIES,
+- &reg_caps);
+- pci_read_config_dword(pdev, REG_HARDWARE_THERMAL_CONTROL,
+- &reg_htc);
+- if (!(reg_caps & NB_CAP_HTC) || !(reg_htc & HTC_ENABLE))
++ &reg);
++ if (!(reg & NB_CAP_HTC))
++ return 0;
++
++ data->read_htcreg(data->pdev, &reg);
++ if (!(reg & HTC_ENABLE))
+ return 0;
+ }
+ return attr->mode;
+@@ -268,11 +286,13 @@ static int k10temp_probe(struct pci_dev *pdev,
+
+ if (boot_cpu_data.x86 == 0x15 && (boot_cpu_data.x86_model == 0x60 ||
+ boot_cpu_data.x86_model == 0x70)) {
++ data->read_htcreg = read_htcreg_nb_f15;
+ data->read_tempreg = read_tempreg_nb_f15;
+ } else if (boot_cpu_data.x86 == 0x17) {
+ data->temp_adjust_mask = 0x80000;
+ data->read_tempreg = read_tempreg_nb_f17;
+ } else {
++ data->read_htcreg = read_htcreg_pci;
+ data->read_tempreg = read_tempreg_pci;
+ }
+
diff --git a/patches.drivers/hwmon-k10temp-make-function-get_raw_temp-static.patch b/patches.drivers/hwmon-k10temp-make-function-get_raw_temp-static.patch
new file mode 100644
index 0000000000..a5d943e3b5
--- /dev/null
+++ b/patches.drivers/hwmon-k10temp-make-function-get_raw_temp-static.patch
@@ -0,0 +1,31 @@
+From: Colin Ian King <colin.king@canonical.com>
+Date: Fri, 1 Jun 2018 14:37:13 +0100
+Subject: hwmon: (k10temp) Make function get_raw_temp static
+Git-commit: fb8eefd3b4e6f79e0930fffff6640744699c6f1d
+Patch-mainline: v4.18
+References: FATE#327735
+
+The function get_raw_temp is local to the source and does not need to
+be in global scope, so make it static.
+
+Cleans up sparse warning:
+drivers/hwmon/k10temp.c:149:14: warning: symbol 'get_raw_temp' was not
+declared. Should it be static?
+
+Signed-off-by: Colin Ian King <colin.king@canonical.com>
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Acked-by: Jean Delvare <jdelvare@suse.de>
+
+diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c
+index d3fae5a8e508..17c6460ae351 100644
+--- a/drivers/hwmon/k10temp.c
++++ b/drivers/hwmon/k10temp.c
+@@ -146,7 +146,7 @@ static void read_tempreg_nb_f17(struct pci_dev *pdev, u32 *regval)
+ F17H_M01H_REPORTED_TEMP_CTRL_OFFSET, regval);
+ }
+
+-unsigned int get_raw_temp(struct k10temp_data *data)
++static unsigned int get_raw_temp(struct k10temp_data *data)
+ {
+ unsigned int temp;
+ u32 regval;
diff --git a/patches.drivers/hwmon-k10temp-move-chip-specific-code-into-probe-function.patch b/patches.drivers/hwmon-k10temp-move-chip-specific-code-into-probe-function.patch
new file mode 100644
index 0000000000..79c7ec76ca
--- /dev/null
+++ b/patches.drivers/hwmon-k10temp-move-chip-specific-code-into-probe-function.patch
@@ -0,0 +1,129 @@
+From: Guenter Roeck <linux@roeck-us.net>
+Date: Mon, 4 Sep 2017 18:33:53 -0700
+Subject: hwmon: (k10temp) Move chip specific code into probe function
+Git-commit: 68546abf7a3a63f199e53d6dcaa7375df37a6aaa
+Patch-mainline: v4.15
+References: FATE#327735
+
+Introduce a local data structure and determine the temperature read
+function at probe time to reduce runtime complexity.
+
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Acked-by: Jean Delvare <jdelvare@suse.de>
+
+diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c
+index ce3b91f22e30..fc8076c7e1a1 100644
+--- a/drivers/hwmon/k10temp.c
++++ b/drivers/hwmon/k10temp.c
+@@ -61,31 +61,44 @@ static DEFINE_MUTEX(nb_smu_ind_mutex);
+ */
+ #define F15H_M60H_REPORTED_TEMP_CTRL_OFFSET 0xd8200ca4
+
+-static void amd_nb_smu_index_read(struct pci_dev *pdev, unsigned int devfn,
+- int offset, u32 *val)
++struct k10temp_data {
++ struct pci_dev *pdev;
++ void (*read_tempreg)(struct pci_dev *pdev, u32 *regval);
++};
++
++static void read_tempreg_pci(struct pci_dev *pdev, u32 *regval)
++{
++ pci_read_config_dword(pdev, REG_REPORTED_TEMPERATURE, regval);
++}
++
++static void amd_nb_index_read(struct pci_dev *pdev, unsigned int devfn,
++ unsigned int base, int offset, u32 *val)
+ {
+ mutex_lock(&nb_smu_ind_mutex);
+ pci_bus_write_config_dword(pdev->bus, devfn,
+- 0xb8, offset);
++ base, offset);
+ pci_bus_read_config_dword(pdev->bus, devfn,
+- 0xbc, val);
++ base + 4, val);
+ mutex_unlock(&nb_smu_ind_mutex);
+ }
+
++static void read_tempreg_nb_f15(struct pci_dev *pdev, u32 *regval)
++{
++ amd_nb_index_read(pdev, PCI_DEVFN(0, 0), 0xb8,
++ F15H_M60H_REPORTED_TEMP_CTRL_OFFSET, regval);
++}
++
+ static ssize_t temp1_input_show(struct device *dev,
+ struct device_attribute *attr, char *buf)
+ {
++ struct k10temp_data *data = dev_get_drvdata(dev);
+ u32 regval;
+- struct pci_dev *pdev = dev_get_drvdata(dev);
+-
+- if (boot_cpu_data.x86 == 0x15 && boot_cpu_data.x86_model == 0x60) {
+- amd_nb_smu_index_read(pdev, PCI_DEVFN(0, 0),
+- F15H_M60H_REPORTED_TEMP_CTRL_OFFSET,
+- &regval);
+- } else {
+- pci_read_config_dword(pdev, REG_REPORTED_TEMPERATURE, &regval);
+- }
+- return sprintf(buf, "%u\n", (regval >> 21) * 125);
++ unsigned int temp;
++
++ data->read_tempreg(data->pdev, &regval);
++ temp = (regval >> 21) * 125;
++
++ return sprintf(buf, "%u\n", temp);
+ }
+
+ static ssize_t temp1_max_show(struct device *dev,
+@@ -98,11 +111,12 @@ static ssize_t show_temp_crit(struct device *dev,
+ struct device_attribute *devattr, char *buf)
+ {
+ struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr);
++ struct k10temp_data *data = dev_get_drvdata(dev);
+ int show_hyst = attr->index;
+ u32 regval;
+ int value;
+
+- pci_read_config_dword(dev_get_drvdata(dev),
++ pci_read_config_dword(data->pdev,
+ REG_HARDWARE_THERMAL_CONTROL, &regval);
+ value = ((regval >> 16) & 0x7f) * 500 + 52000;
+ if (show_hyst)
+@@ -119,7 +133,8 @@ static umode_t k10temp_is_visible(struct kobject *kobj,
+ struct attribute *attr, int index)
+ {
+ struct device *dev = container_of(kobj, struct device, kobj);
+- struct pci_dev *pdev = dev_get_drvdata(dev);
++ struct k10temp_data *data = dev_get_drvdata(dev);
++ struct pci_dev *pdev = data->pdev;
+
+ if (index >= 2) {
+ u32 reg_caps, reg_htc;
+@@ -187,6 +202,7 @@ static int k10temp_probe(struct pci_dev *pdev,
+ {
+ int unreliable = has_erratum_319(pdev);
+ struct device *dev = &pdev->dev;
++ struct k10temp_data *data;
+ struct device *hwmon_dev;
+
+ if (unreliable) {
+@@ -199,7 +215,19 @@ static int k10temp_probe(struct pci_dev *pdev,
+ "unreliable CPU thermal sensor; check erratum 319\n");
+ }
+
+- hwmon_dev = devm_hwmon_device_register_with_groups(dev, "k10temp", pdev,
++ data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
++ if (!data)
++ return -ENOMEM;
++
++ data->pdev = pdev;
++
++ if (boot_cpu_data.x86 == 0x15 && (boot_cpu_data.x86_model == 0x60 ||
++ boot_cpu_data.x86_model == 0x70))
++ data->read_tempreg = read_tempreg_nb_f15;
++ else
++ data->read_tempreg = read_tempreg_pci;
++
++ hwmon_dev = devm_hwmon_device_register_with_groups(dev, "k10temp", data,
+ k10temp_groups);
+ return PTR_ERR_OR_ZERO(hwmon_dev);
+ }
diff --git a/patches.drivers/hwmon-k10temp-only-apply-temperature-offset-if-result-is.patch b/patches.drivers/hwmon-k10temp-only-apply-temperature-offset-if-result-is.patch
new file mode 100644
index 0000000000..3fafff4be7
--- /dev/null
+++ b/patches.drivers/hwmon-k10temp-only-apply-temperature-offset-if-result-is.patch
@@ -0,0 +1,38 @@
+From: Guenter Roeck <linux@roeck-us.net>
+Date: Wed, 7 Feb 2018 17:49:39 -0800
+Subject: hwmon: (k10temp) Only apply temperature offset if result is positive
+Git-commit: aef17ca1271948ee57cc39b2493d31110cc42625
+Patch-mainline: v4.16
+References: FATE#327735
+
+A user reports a really bad temperature on Ryzen 1950X.
+
+k10temp-pci-00cb
+Adapter: PCI adapter
+temp1: +4294948.3°C (high = +70.0°C)
+
+This will happen if the temperature reported by the chip is lower than
+the offset temperature. This has been seen in the field if "Sense MI Skew"
+and/or "Sense MI Offset" BIOS parameters were set to unexpected values.
+Let's report a temperature of 0 degrees C in that case.
+
+Fixes: 1b50b776355f ("hwmon: (k10temp) Add support for temperature offsets")
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Acked-by: Jean Delvare <jdelvare@suse.de>
+
+diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c
+index 06b4e1c78bd8..4c6594a4661d 100644
+--- a/drivers/hwmon/k10temp.c
++++ b/drivers/hwmon/k10temp.c
+@@ -129,7 +129,10 @@ static ssize_t temp1_input_show(struct device *dev,
+
+ data->read_tempreg(data->pdev, &regval);
+ temp = (regval >> 21) * 125;
+- temp -= data->temp_offset;
++ if (temp > data->temp_offset)
++ temp -= data->temp_offset;
++ else
++ temp = 0;
+
+ return sprintf(buf, "%u\n", temp);
+ }
diff --git a/patches.drivers/hwmon-k10temp-support-all-family-15h-model-6xh-and-model.patch b/patches.drivers/hwmon-k10temp-support-all-family-15h-model-6xh-and-model.patch
new file mode 100644
index 0000000000..e0241f3f34
--- /dev/null
+++ b/patches.drivers/hwmon-k10temp-support-all-family-15h-model-6xh-and-model.patch
@@ -0,0 +1,36 @@
+From: Guenter Roeck <linux@roeck-us.net>
+Date: Sun, 2 Sep 2018 12:02:53 -0700
+Subject: hwmon: (k10temp) Support all Family 15h Model 6xh and Model 7xh processors
+Git-commit: 53dfa0088edd2e2793afa21488532b12eb2dae48
+Patch-mainline: v4.20
+References: FATE#327735
+
+BIOS developer guides refer to Family 15h Models 60h-6fh and Family 15h
+Models 70h-7fh. So far the driver only checked for Models 60h and 70h.
+However, there are now processors with other model numbers in the same
+families. Example is A10-9620P family 15h model 65h. Follow the developer
+guides and mask the lower 4 bit of the model number to determine the
+registers to use for reading temperatures and temperature limits.
+
+Reported-by: Guglielmo Fanini <g.fanini@gmail.com>
+Cc: Guglielmo Fanini <g.fanini@gmail.com>
+Acked-by: Clemens Ladisch <clemens@ladisch.de>
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Acked-by: Jean Delvare <jdelvare@suse.de>
+
+diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c
+index bb15d7816a29..2cef0c37ff6f 100644
+--- a/drivers/hwmon/k10temp.c
++++ b/drivers/hwmon/k10temp.c
+@@ -325,8 +325,9 @@ static int k10temp_probe(struct pci_dev *pdev,
+
+ data->pdev = pdev;
+
+- if (boot_cpu_data.x86 == 0x15 && (boot_cpu_data.x86_model == 0x60 ||
+- boot_cpu_data.x86_model == 0x70)) {
++ if (boot_cpu_data.x86 == 0x15 &&
++ ((boot_cpu_data.x86_model & 0xf0) == 0x60 ||
++ (boot_cpu_data.x86_model & 0xf0) == 0x70)) {
+ data->read_htcreg = read_htcreg_nb_f15;
+ data->read_tempreg = read_tempreg_nb_f15;
+ } else if (boot_cpu_data.x86 == 0x17) {
diff --git a/patches.drivers/hwmon-k10temp-support-threadripper-2920x-2970wx-simplify.patch b/patches.drivers/hwmon-k10temp-support-threadripper-2920x-2970wx-simplify.patch
new file mode 100644
index 0000000000..5335679822
--- /dev/null
+++ b/patches.drivers/hwmon-k10temp-support-threadripper-2920x-2970wx-simplify.patch
@@ -0,0 +1,39 @@
+From: Guenter Roeck <linux@roeck-us.net>
+Date: Thu, 9 Aug 2018 11:50:46 -0700
+Subject: hwmon: k10temp: Support Threadripper 2920X, 2970WX; simplify offset table
+Git-commit: cd6a2064dbf9e485b80c54687f0ce91cca91a6df
+Patch-mainline: v4.19
+References: FATE#327735
+
+All announced Threadripper 29xx models have a temperature offset of
+27 degrees C. Simplify temperature offset table to match all 29xx
+Threadripper models with a single entry. Also simplify the table to match
+all 19xx Threadripper models with a single entry. This effectively drops
+entries for Threadripper 1910/1920/1950 which never saw the light of day.
+
+Cc: Michael Larabel <Michael@phoronix.com>
+Cc: Clemens Ladisch <clemens@ladisch.de>
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Acked-by: Jean Delvare <jdelvare@suse.de>
+
+diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c
+index 577e2ede5a1a..bb15d7816a29 100644
+--- a/drivers/hwmon/k10temp.c
++++ b/drivers/hwmon/k10temp.c
+@@ -99,14 +99,8 @@ static const struct tctl_offset tctl_offset_table[] = {
+ { 0x17, "AMD Ryzen 7 1700X", 20000 },
+ { 0x17, "AMD Ryzen 7 1800X", 20000 },
+ { 0x17, "AMD Ryzen 7 2700X", 10000 },
+- { 0x17, "AMD Ryzen Threadripper 1950X", 27000 },
+- { 0x17, "AMD Ryzen Threadripper 1920X", 27000 },
+- { 0x17, "AMD Ryzen Threadripper 1900X", 27000 },
+- { 0x17, "AMD Ryzen Threadripper 1950", 10000 },
+- { 0x17, "AMD Ryzen Threadripper 1920", 10000 },
+- { 0x17, "AMD Ryzen Threadripper 1910", 10000 },
+- { 0x17, "AMD Ryzen Threadripper 2950X", 27000 },
+- { 0x17, "AMD Ryzen Threadripper 2990WX", 27000 },
++ { 0x17, "AMD Ryzen Threadripper 19", 27000 }, /* 19{00,20,50}X */
++ { 0x17, "AMD Ryzen Threadripper 29", 27000 }, /* 29{20,50,70,90}[W]X */
+ };
+
+ static void read_htcreg_pci(struct pci_dev *pdev, u32 *regval)
diff --git a/patches.drivers/hwmon-k10temp-use-api-function-to-access-system-management.patch b/patches.drivers/hwmon-k10temp-use-api-function-to-access-system-management.patch
new file mode 100644
index 0000000000..418b823488
--- /dev/null
+++ b/patches.drivers/hwmon-k10temp-use-api-function-to-access-system-management.patch
@@ -0,0 +1,78 @@
+From: Guenter Roeck <linux@roeck-us.net>
+Date: Fri, 4 May 2018 13:01:33 -0700
+Subject: hwmon: (k10temp) Use API function to access System Management Network
+Git-commit: 3b031622f598481970400519bd5abc2a16708282
+Patch-mainline: v4.17
+References: FATE#327735
+
+The SMN (System Management Network) on Family 17h AMD CPUs is also accessed
+from other drivers, specifically EDAC. Accessing it directly is racy.
+On top of that, accessing the SMN through root bridge 00:00 is wrong on
+multi-die CPUs and may result in reading the temperature from the wrong
+die. Use available API functions to fix the problem.
+
+For this to work, add dependency on AMD_NB. Also change the Raven Ridge
+PCI device ID to point to Data Fabric Function 3, since this ID is used
+by the API functions to find the CPU node.
+
+Cc: stable@vger.kernel.org # v4.16+
+Tested-by: Gabriel Craciunescu <nix.or.die@gmail.com>
+Signed-off-by: Guenter Roeck <linux@roeck-us.net>
+Acked-by: Jean Delvare <jdelvare@suse.de>
+
+diff --git a/drivers/hwmon/Kconfig b/drivers/hwmon/Kconfig
+index f249a4428458..6ec307c93ece 100644
+--- a/drivers/hwmon/Kconfig
++++ b/drivers/hwmon/Kconfig
+@@ -272,7 +272,7 @@ config SENSORS_K8TEMP
+
+ config SENSORS_K10TEMP
+ tristate "AMD Family 10h+ temperature sensor"
+- depends on X86 && PCI
++ depends on X86 && PCI && AMD_NB
+ help
+ If you say yes here you get support for the temperature
+ sensor(s) inside your CPU. Supported are later revisions of
+diff --git a/drivers/hwmon/k10temp.c b/drivers/hwmon/k10temp.c
+index 34b5448b00be..3b73dee6fdc6 100644
+--- a/drivers/hwmon/k10temp.c
++++ b/drivers/hwmon/k10temp.c
+@@ -23,6 +23,7 @@
+ #include <linux/init.h>
+ #include <linux/module.h>
+ #include <linux/pci.h>
++#include <asm/amd_nb.h>
+ #include <asm/processor.h>
+
+ MODULE_DESCRIPTION("AMD Family 10h+ CPU core temperature monitor");
+@@ -40,8 +41,8 @@ static DEFINE_MUTEX(nb_smu_ind_mutex);
+ #define PCI_DEVICE_ID_AMD_17H_DF_F3 0x1463
+ #endif
+
+-#ifndef PCI_DEVICE_ID_AMD_17H_RR_NB
+-#define PCI_DEVICE_ID_AMD_17H_RR_NB 0x15d0
++#ifndef PCI_DEVICE_ID_AMD_17H_M10H_DF_F3
++#define PCI_DEVICE_ID_AMD_17H_M10H_DF_F3 0x15eb
+ #endif
+
+ /* CPUID function 0x80000001, ebx */
+@@ -136,8 +137,8 @@ static void read_tempreg_nb_f15(struct pci_dev *pdev, u32 *regval)
+
+ static void read_tempreg_nb_f17(struct pci_dev *pdev, u32 *regval)
+ {
+- amd_nb_index_read(pdev, PCI_DEVFN(0, 0), 0x60,
+- F17H_M01H_REPORTED_TEMP_CTRL_OFFSET, regval);
++ amd_smn_read(amd_pci_dev_to_node_id(pdev),
++ F17H_M01H_REPORTED_TEMP_CTRL_OFFSET, regval);
+ }
+
+ static ssize_t temp1_input_show(struct device *dev,
+@@ -322,7 +323,7 @@ static const struct pci_device_id k10temp_id_table[] = {
+ { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_NB_F3) },
+ { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_M30H_NB_F3) },
+ { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_17H_DF_F3) },
+- { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_17H_RR_NB) },
++ { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_17H_M10H_DF_F3) },
+ {}
+ };
+ MODULE_DEVICE_TABLE(pci, k10temp_id_table);
diff --git a/patches.drivers/hwmon-k10temp-x86-amd_nb-consolidate-shared-device-ids.patch b/patches.drivers/hwmon-k10temp-x86-amd_nb-consolidate-shared-device-ids.patch
index 5ea776d679..0a1697b980 100644
--- a/patches.drivers/hwmon-k10temp-x86-amd_nb-consolidate-shared-device-ids.patch
+++ b/patches.drivers/hwmon-k10temp-x86-amd_nb-consolidate-shared-device-ids.patch
@@ -3,7 +3,7 @@ Date: Tue, 6 Nov 2018 20:08:14 +0000
Subject: hwmon/k10temp, x86/amd_nb: Consolidate shared device IDs
Git-commit: dedf7dce4cec5c0abe69f4fa6938d5100398220b
Patch-mainline: v5.0-rc1
-References: fate#326884
+References: FATE#326884 FATE#327735
Consolidate shared PCI_DEVICE_IDs that were scattered through k10temp
and amd_nb, and move them into pci_ids.
@@ -24,14 +24,14 @@ CC: Thomas Gleixner <tglx@linutronix.de>
CC: x86-ml <x86@kernel.org>
Link: http://lkml.kernel.org/r/20181106200754.60722-2-brian.woods@amd.com
---
- arch/x86/kernel/amd_nb.c | 2 +-
- drivers/hwmon/k10temp.c | 1 +
+ arch/x86/kernel/amd_nb.c | 3 +--
+ drivers/hwmon/k10temp.c | 9 +--------
include/linux/pci_ids.h | 2 ++
- 3 files changed, 4 insertions(+), 1 deletion(-)
+ 3 files changed, 4 insertions(+), 10 deletions(-)
--- a/arch/x86/kernel/amd_nb.c
+++ b/arch/x86/kernel/amd_nb.c
-@@ -11,10 +11,10 @@
+@@ -11,13 +11,12 @@
#include <linux/errno.h>
#include <linux/export.h>
#include <linux/spinlock.h>
@@ -39,8 +39,11 @@ Link: http://lkml.kernel.org/r/20181106200754.60722-2-brian.woods@amd.com
#include <asm/amd_nb.h>
#define PCI_DEVICE_ID_AMD_17H_ROOT 0x1450
+ #define PCI_DEVICE_ID_AMD_17H_M10H_ROOT 0x15d0
-#define PCI_DEVICE_ID_AMD_17H_DF_F3 0x1463
#define PCI_DEVICE_ID_AMD_17H_DF_F4 0x1464
+-#define PCI_DEVICE_ID_AMD_17H_M10H_DF_F3 0x15eb
+ #define PCI_DEVICE_ID_AMD_17H_M10H_DF_F4 0x15ec
/* Protect the PCI config register pairs used for SMN and DF indirect access. */
--- a/drivers/hwmon/k10temp.c
@@ -50,12 +53,27 @@ Link: http://lkml.kernel.org/r/20181106200754.60722-2-brian.woods@amd.com
#include <linux/module.h>
#include <linux/pci.h>
+#include <linux/pci_ids.h>
+ #include <asm/amd_nb.h>
#include <asm/processor.h>
- MODULE_DESCRIPTION("AMD Family 10h+ CPU core temperature monitor");
+@@ -41,14 +42,6 @@ static DEFINE_MUTEX(nb_smu_ind_mutex);
+ #define PCI_DEVICE_ID_AMD_15H_M70H_NB_F3 0x15b3
+ #endif
+
+-#ifndef PCI_DEVICE_ID_AMD_17H_DF_F3
+-#define PCI_DEVICE_ID_AMD_17H_DF_F3 0x1463
+-#endif
+-
+-#ifndef PCI_DEVICE_ID_AMD_17H_M10H_DF_F3
+-#define PCI_DEVICE_ID_AMD_17H_M10H_DF_F3 0x15eb
+-#endif
+-
+ /* CPUID function 0x80000001, ebx */
+ #define CPUID_PKGTYPE_MASK 0xf0000000
+ #define CPUID_PKGTYPE_F 0x00000000
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
-@@ -537,6 +537,8 @@
+@@ -540,6 +540,8 @@
#define PCI_DEVICE_ID_AMD_16H_NB_F4 0x1534
#define PCI_DEVICE_ID_AMD_16H_M30H_NB_F3 0x1583
#define PCI_DEVICE_ID_AMD_16H_M30H_NB_F4 0x1584
diff --git a/patches.drivers/i2c-piix4-add-hygon-dhyana-smbus-support.patch b/patches.drivers/i2c-piix4-add-hygon-dhyana-smbus-support.patch
new file mode 100644
index 0000000000..0857566a32
--- /dev/null
+++ b/patches.drivers/i2c-piix4-add-hygon-dhyana-smbus-support.patch
@@ -0,0 +1,91 @@
+From: Pu Wen <puwen@hygon.cn>
+Date: Tue, 30 Apr 2019 00:08:43 +0800
+Subject: i2c-piix4: Add Hygon Dhyana SMBus support
+Git-commit: 24beb83ad289c68bce7c01351cb90465bbb1940a
+Patch-mainline: v5.2
+References: FATE#327735
+
+The Hygon Dhyana CPU has the SMBus device with PCI device ID 0x790b,
+which is the same as AMD CZ SMBus device. So add Hygon Dhyana support
+to the i2c-piix4 driver by using the code path of AMD.
+
+Signed-off-by: Pu Wen <puwen@hygon.cn>
+Reviewed-by: Jean Delvare <jdelvare@suse.de>
+Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
+Acked-by: Jean Delvare <jdelvare@suse.de>
+---
+ Documentation/i2c/busses/i2c-piix4 | 2 ++
+ drivers/i2c/busses/Kconfig | 1 +
+ drivers/i2c/busses/i2c-piix4.c | 12 +++++++++---
+ 3 files changed, 12 insertions(+), 3 deletions(-)
+
+--- a/Documentation/i2c/busses/i2c-piix4
++++ b/Documentation/i2c/busses/i2c-piix4
+@@ -15,6 +15,8 @@ Supported adapters:
+ http://support.amd.com/us/Embedded_TechDocs/44413.pdf
+ * AMD Hudson-2, ML, CZ
+ Datasheet: Not publicly available
++ * Hygon CZ
++ Datasheet: Not publicly available
+ * Standard Microsystems (SMSC) SLC90E66 (Victory66) southbridge
+ Datasheet: Publicly available at the SMSC website http://www.smsc.com
+
+--- a/drivers/i2c/busses/Kconfig
++++ b/drivers/i2c/busses/Kconfig
+@@ -176,6 +176,7 @@ config I2C_PIIX4
+ AMD Hudson-2
+ AMD ML
+ AMD CZ
++ Hygon CZ
+ Serverworks OSB4
+ Serverworks CSB5
+ Serverworks CSB6
+--- a/drivers/i2c/busses/i2c-piix4.c
++++ b/drivers/i2c/busses/i2c-piix4.c
+@@ -19,6 +19,7 @@
+ Serverworks OSB4, CSB5, CSB6, HT-1000, HT-1100
+ ATI IXP200, IXP300, IXP400, SB600, SB700/SP5100, SB800
+ AMD Hudson-2, ML, CZ
++ Hygon CZ
+ SMSC Victory66
+
+ Note: we assume there can only be one device, with one or more
+@@ -289,7 +290,9 @@ static int piix4_setup_sb800(struct pci_
+ PIIX4_dev->revision >= 0x41) ||
+ (PIIX4_dev->vendor == PCI_VENDOR_ID_AMD &&
+ PIIX4_dev->device == PCI_DEVICE_ID_AMD_KERNCZ_SMBUS &&
+- PIIX4_dev->revision >= 0x49))
++ PIIX4_dev->revision >= 0x49) ||
++ (PIIX4_dev->vendor == PCI_VENDOR_ID_HYGON &&
++ PIIX4_dev->device == PCI_DEVICE_ID_AMD_KERNCZ_SMBUS))
+ smb_en = 0x00;
+ else
+ smb_en = (aux) ? 0x28 : 0x2c;
+@@ -354,7 +357,8 @@ static int piix4_setup_sb800(struct pci_
+ piix4_smba, i2ccfg >> 4);
+
+ /* Find which register is used for port selection */
+- if (PIIX4_dev->vendor == PCI_VENDOR_ID_AMD) {
++ if (PIIX4_dev->vendor == PCI_VENDOR_ID_AMD ||
++ PIIX4_dev->vendor == PCI_VENDOR_ID_HYGON) {
+ switch (PIIX4_dev->device) {
+ case PCI_DEVICE_ID_AMD_KERNCZ_SMBUS:
+ piix4_port_sel_sb800 = SB800_PIIX4_PORT_IDX_KERNCZ;
+@@ -682,6 +686,7 @@ static const struct pci_device_id piix4_
+ { PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_SBX00_SMBUS) },
+ { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_HUDSON2_SMBUS) },
+ { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_KERNCZ_SMBUS) },
++ { PCI_DEVICE(PCI_VENDOR_ID_HYGON, PCI_DEVICE_ID_AMD_KERNCZ_SMBUS) },
+ { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS,
+ PCI_DEVICE_ID_SERVERWORKS_OSB4) },
+ { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS,
+@@ -790,7 +795,8 @@ static int piix4_probe(struct pci_dev *d
+ if ((dev->vendor == PCI_VENDOR_ID_ATI &&
+ dev->device == PCI_DEVICE_ID_ATI_SBX00_SMBUS &&
+ dev->revision >= 0x40) ||
+- dev->vendor == PCI_VENDOR_ID_AMD) {
++ dev->vendor == PCI_VENDOR_ID_AMD ||
++ dev->vendor == PCI_VENDOR_ID_HYGON) {
+ is_sb800 = true;
+
+ if (!request_region(SB800_PIIX4_SMB_IDX, 2, "smba_idx")) {
diff --git a/patches.drivers/qmi_wwan-add-network-device-usage-statistics-for-qmi.patch b/patches.drivers/qmi_wwan-add-network-device-usage-statistics-for-qmi.patch
new file mode 100644
index 0000000000..cf1c813bef
--- /dev/null
+++ b/patches.drivers/qmi_wwan-add-network-device-usage-statistics-for-qmi.patch
@@ -0,0 +1,156 @@
+From 44f82312fe9113bab6642f4d0eab6b1b7902b6e1 Mon Sep 17 00:00:00 2001
+From: Reinhard Speyerer <rspmn@arcor.de>
+Date: Wed, 12 Jun 2019 19:02:46 +0200
+Subject: [PATCH] qmi_wwan: add network device usage statistics for qmimux devices
+Git-commit: 44f82312fe9113bab6642f4d0eab6b1b7902b6e1
+Patch-mainline: v5.2-rc6
+References: bsc#1051510
+
+Add proper network device usage statistics for qmimux devices
+instead of reporting all-zero values for them.
+
+Fixes: c6adf77953bc ("net: usb: qmi_wwan: add qmap mux protocol support")
+Cc: Daniele Palmas <dnlplm@gmail.com>
+Signed-off-by: Reinhard Speyerer <rspmn@arcor.de>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/net/usb/qmi_wwan.c | 76 +++++++++++++++++++++++++++++++++++++++++++---
+ 1 file changed, 71 insertions(+), 5 deletions(-)
+
+diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
+index fd3d078a1923..b0a96459621f 100644
+--- a/drivers/net/usb/qmi_wwan.c
++++ b/drivers/net/usb/qmi_wwan.c
+@@ -22,6 +22,7 @@
+ #include <linux/usb/cdc.h>
+ #include <linux/usb/usbnet.h>
+ #include <linux/usb/cdc-wdm.h>
++#include <linux/u64_stats_sync.h>
+
+ /* This driver supports wwan (3G/LTE/?) devices using a vendor
+ * specific management protocol called Qualcomm MSM Interface (QMI) -
+@@ -75,6 +76,7 @@ struct qmimux_hdr {
+ struct qmimux_priv {
+ struct net_device *real_dev;
+ u8 mux_id;
++ struct pcpu_sw_netstats __percpu *stats64;
+ };
+
+ static int qmimux_open(struct net_device *dev)
+@@ -101,19 +103,65 @@ static netdev_tx_t qmimux_start_xmit(struct sk_buff *skb, struct net_device *dev
+ struct qmimux_priv *priv = netdev_priv(dev);
+ unsigned int len = skb->len;
+ struct qmimux_hdr *hdr;
++ netdev_tx_t ret;
+
+ hdr = skb_push(skb, sizeof(struct qmimux_hdr));
+ hdr->pad = 0;
+ hdr->mux_id = priv->mux_id;
+ hdr->pkt_len = cpu_to_be16(len);
+ skb->dev = priv->real_dev;
+- return dev_queue_xmit(skb);
++ ret = dev_queue_xmit(skb);
++
++ if (likely(ret == NET_XMIT_SUCCESS || ret == NET_XMIT_CN)) {
++ struct pcpu_sw_netstats *stats64 = this_cpu_ptr(priv->stats64);
++
++ u64_stats_update_begin(&stats64->syncp);
++ stats64->tx_packets++;
++ stats64->tx_bytes += len;
++ u64_stats_update_end(&stats64->syncp);
++ } else {
++ dev->stats.tx_dropped++;
++ }
++
++ return ret;
++}
++
++static void qmimux_get_stats64(struct net_device *net,
++ struct rtnl_link_stats64 *stats)
++{
++ struct qmimux_priv *priv = netdev_priv(net);
++ unsigned int start;
++ int cpu;
++
++ netdev_stats_to_stats64(stats, &net->stats);
++
++ for_each_possible_cpu(cpu) {
++ struct pcpu_sw_netstats *stats64;
++ u64 rx_packets, rx_bytes;
++ u64 tx_packets, tx_bytes;
++
++ stats64 = per_cpu_ptr(priv->stats64, cpu);
++
++ do {
++ start = u64_stats_fetch_begin_irq(&stats64->syncp);
++ rx_packets = stats64->rx_packets;
++ rx_bytes = stats64->rx_bytes;
++ tx_packets = stats64->tx_packets;
++ tx_bytes = stats64->tx_bytes;
++ } while (u64_stats_fetch_retry_irq(&stats64->syncp, start));
++
++ stats->rx_packets += rx_packets;
++ stats->rx_bytes += rx_bytes;
++ stats->tx_packets += tx_packets;
++ stats->tx_bytes += tx_bytes;
++ }
+ }
+
+ static const struct net_device_ops qmimux_netdev_ops = {
+- .ndo_open = qmimux_open,
+- .ndo_stop = qmimux_stop,
+- .ndo_start_xmit = qmimux_start_xmit,
++ .ndo_open = qmimux_open,
++ .ndo_stop = qmimux_stop,
++ .ndo_start_xmit = qmimux_start_xmit,
++ .ndo_get_stats64 = qmimux_get_stats64,
+ };
+
+ static void qmimux_setup(struct net_device *dev)
+@@ -198,8 +246,19 @@ static int qmimux_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
+ }
+
+ skb_put_data(skbn, skb->data + offset + qmimux_hdr_sz, pkt_len);
+- if (netif_rx(skbn) != NET_RX_SUCCESS)
++ if (netif_rx(skbn) != NET_RX_SUCCESS) {
++ net->stats.rx_errors++;
+ return 0;
++ } else {
++ struct pcpu_sw_netstats *stats64;
++ struct qmimux_priv *priv = netdev_priv(net);
++
++ stats64 = this_cpu_ptr(priv->stats64);
++ u64_stats_update_begin(&stats64->syncp);
++ stats64->rx_packets++;
++ stats64->rx_bytes += pkt_len;
++ u64_stats_update_end(&stats64->syncp);
++ }
+
+ skip:
+ offset += len + qmimux_hdr_sz;
+@@ -223,6 +282,12 @@ static int qmimux_register_device(struct net_device *real_dev, u8 mux_id)
+ priv->mux_id = mux_id;
+ priv->real_dev = real_dev;
+
++ priv->stats64 = netdev_alloc_pcpu_stats(struct pcpu_sw_netstats);
++ if (!priv->stats64) {
++ err = -ENOBUFS;
++ goto out_free_newdev;
++ }
++
+ err = register_netdevice(new_dev);
+ if (err < 0)
+ goto out_free_newdev;
+@@ -252,6 +317,7 @@ static void qmimux_unregister_device(struct net_device *dev)
+ struct qmimux_priv *priv = netdev_priv(dev);
+ struct net_device *real_dev = priv->real_dev;
+
++ free_percpu(priv->stats64);
+ netdev_upper_dev_unlink(real_dev, dev);
+ unregister_netdevice(dev);
+
+--
+2.16.4
+
diff --git a/patches.drivers/qmi_wwan-add-support-for-QMAP-padding-in-the-RX-path.patch b/patches.drivers/qmi_wwan-add-support-for-QMAP-padding-in-the-RX-path.patch
new file mode 100644
index 0000000000..eb9c32520e
--- /dev/null
+++ b/patches.drivers/qmi_wwan-add-support-for-QMAP-padding-in-the-RX-path.patch
@@ -0,0 +1,66 @@
+From 61356088ace1866a847a727d4d40da7bf00b67fc Mon Sep 17 00:00:00 2001
+From: Reinhard Speyerer <rspmn@arcor.de>
+Date: Wed, 12 Jun 2019 19:02:13 +0200
+Subject: [PATCH] qmi_wwan: add support for QMAP padding in the RX path
+Git-commit: 61356088ace1866a847a727d4d40da7bf00b67fc
+Patch-mainline: v5.2-rc6
+References: bsc#1051510
+
+The QMAP code in the qmi_wwan driver is based on the CodeAurora GobiNet
+driver which does not process QMAP padding in the RX path correctly.
+Add support for QMAP padding to qmimux_rx_fixup() according to the
+description of the rmnet driver.
+
+Fixes: c6adf77953bc ("net: usb: qmi_wwan: add qmap mux protocol support")
+Cc: Daniele Palmas <dnlplm@gmail.com>
+Signed-off-by: Reinhard Speyerer <rspmn@arcor.de>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/net/usb/qmi_wwan.c | 12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
+index d9a6699abe59..fd3d078a1923 100644
+--- a/drivers/net/usb/qmi_wwan.c
++++ b/drivers/net/usb/qmi_wwan.c
+@@ -153,7 +153,7 @@ static bool qmimux_has_slaves(struct usbnet *dev)
+
+ static int qmimux_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
+ {
+- unsigned int len, offset = 0;
++ unsigned int len, offset = 0, pad_len, pkt_len;
+ struct qmimux_hdr *hdr;
+ struct net_device *net;
+ struct sk_buff *skbn;
+@@ -171,10 +171,16 @@ static int qmimux_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
+ if (hdr->pad & 0x80)
+ goto skip;
+
++ /* extract padding length and check for valid length info */
++ pad_len = hdr->pad & 0x3f;
++ if (len == 0 || pad_len >= len)
++ goto skip;
++ pkt_len = len - pad_len;
++
+ net = qmimux_find_dev(dev, hdr->mux_id);
+ if (!net)
+ goto skip;
+- skbn = netdev_alloc_skb(net, len);
++ skbn = netdev_alloc_skb(net, pkt_len);
+ if (!skbn)
+ return 0;
+ skbn->dev = net;
+@@ -191,7 +197,7 @@ static int qmimux_rx_fixup(struct usbnet *dev, struct sk_buff *skb)
+ goto skip;
+ }
+
+- skb_put_data(skbn, skb->data + offset + qmimux_hdr_sz, len);
++ skb_put_data(skbn, skb->data + offset + qmimux_hdr_sz, pkt_len);
+ if (netif_rx(skbn) != NET_RX_SUCCESS)
+ return 0;
+
+--
+2.16.4
+
diff --git a/patches.drivers/qmi_wwan-avoid-RCU-stalls-on-device-disconnect-when-.patch b/patches.drivers/qmi_wwan-avoid-RCU-stalls-on-device-disconnect-when-.patch
new file mode 100644
index 0000000000..b2c402d76c
--- /dev/null
+++ b/patches.drivers/qmi_wwan-avoid-RCU-stalls-on-device-disconnect-when-.patch
@@ -0,0 +1,76 @@
+From a8fdde1cb830e560208af42b6c10750137f53eb3 Mon Sep 17 00:00:00 2001
+From: Reinhard Speyerer <rspmn@arcor.de>
+Date: Wed, 12 Jun 2019 19:03:15 +0200
+Subject: [PATCH] qmi_wwan: avoid RCU stalls on device disconnect when in QMAP mode
+Git-commit: a8fdde1cb830e560208af42b6c10750137f53eb3
+Patch-mainline: v5.2-rc6
+References: bsc#1051510
+
+Switch qmimux_unregister_device() and qmi_wwan_disconnect() to
+use unregister_netdevice_queue() and unregister_netdevice_many()
+instead of unregister_netdevice(). This avoids RCU stalls which
+have been observed on device disconnect in certain setups otherwise.
+
+Fixes: c6adf77953bc ("net: usb: qmi_wwan: add qmap mux protocol support")
+Cc: Daniele Palmas <dnlplm@gmail.com>
+Signed-off-by: Reinhard Speyerer <rspmn@arcor.de>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/net/usb/qmi_wwan.c | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
+index b0a96459621f..c6fbc2a2a785 100644
+--- a/drivers/net/usb/qmi_wwan.c
++++ b/drivers/net/usb/qmi_wwan.c
+@@ -312,14 +312,15 @@ static int qmimux_register_device(struct net_device *real_dev, u8 mux_id)
+ return err;
+ }
+
+-static void qmimux_unregister_device(struct net_device *dev)
++static void qmimux_unregister_device(struct net_device *dev,
++ struct list_head *head)
+ {
+ struct qmimux_priv *priv = netdev_priv(dev);
+ struct net_device *real_dev = priv->real_dev;
+
+ free_percpu(priv->stats64);
+ netdev_upper_dev_unlink(real_dev, dev);
+- unregister_netdevice(dev);
++ unregister_netdevice_queue(dev, head);
+
+ /* Get rid of the reference to real_dev */
+ dev_put(real_dev);
+@@ -490,7 +491,7 @@ static ssize_t del_mux_store(struct device *d, struct device_attribute *attr, c
+ ret = -EINVAL;
+ goto err;
+ }
+- qmimux_unregister_device(del_dev);
++ qmimux_unregister_device(del_dev, NULL);
+
+ if (!qmimux_has_slaves(dev))
+ info->flags &= ~QMI_WWAN_FLAG_MUX;
+@@ -1500,6 +1501,7 @@ static void qmi_wwan_disconnect(struct usb_interface *intf)
+ struct qmi_wwan_state *info;
+ struct list_head *iter;
+ struct net_device *ldev;
++ LIST_HEAD(list);
+
+ /* called twice if separate control and data intf */
+ if (!dev)
+@@ -1512,8 +1514,9 @@ static void qmi_wwan_disconnect(struct usb_interface *intf)
+ }
+ rcu_read_lock();
+ netdev_for_each_upper_dev_rcu(dev->net, ldev, iter)
+- qmimux_unregister_device(ldev);
++ qmimux_unregister_device(ldev, &list);
+ rcu_read_unlock();
++ unregister_netdevice_many(&list);
+ rtnl_unlock();
+ info->flags &= ~QMI_WWAN_FLAG_MUX;
+ }
+--
+2.16.4
+
diff --git a/patches.drivers/qmi_wwan-extend-permitted-QMAP-mux_id-value-range.patch b/patches.drivers/qmi_wwan-extend-permitted-QMAP-mux_id-value-range.patch
new file mode 100644
index 0000000000..fb1b7ef206
--- /dev/null
+++ b/patches.drivers/qmi_wwan-extend-permitted-QMAP-mux_id-value-range.patch
@@ -0,0 +1,60 @@
+From 36815b416fa48766ac5a98e4b2dc3ebc5887222e Mon Sep 17 00:00:00 2001
+From: Reinhard Speyerer <rspmn@arcor.de>
+Date: Wed, 12 Jun 2019 19:03:50 +0200
+Subject: [PATCH] qmi_wwan: extend permitted QMAP mux_id value range
+Git-commit: 36815b416fa48766ac5a98e4b2dc3ebc5887222e
+Patch-mainline: v5.2-rc6
+References: bsc#1051510
+
+Permit mux_id values up to 254 to be used in qmimux_register_device()
+for compatibility with ip(8) and the rmnet driver.
+
+Fixes: c6adf77953bc ("net: usb: qmi_wwan: add qmap mux protocol support")
+Cc: Daniele Palmas <dnlplm@gmail.com>
+Signed-off-by: Reinhard Speyerer <rspmn@arcor.de>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ Documentation/ABI/testing/sysfs-class-net-qmi | 4 ++--
+ drivers/net/usb/qmi_wwan.c | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/Documentation/ABI/testing/sysfs-class-net-qmi b/Documentation/ABI/testing/sysfs-class-net-qmi
+index 7122d6264c49..c310db4ccbc2 100644
+--- a/Documentation/ABI/testing/sysfs-class-net-qmi
++++ b/Documentation/ABI/testing/sysfs-class-net-qmi
+@@ -29,7 +29,7 @@ Contact: Bjørn Mork <bjorn@mork.no>
+ Description:
+ Unsigned integer.
+
+- Write a number ranging from 1 to 127 to add a qmap mux
++ Write a number ranging from 1 to 254 to add a qmap mux
+ based network device, supported by recent Qualcomm based
+ modems.
+
+@@ -46,5 +46,5 @@ Contact: Bjørn Mork <bjorn@mork.no>
+ Description:
+ Unsigned integer.
+
+- Write a number ranging from 1 to 127 to delete a previously
++ Write a number ranging from 1 to 254 to delete a previously
+ created qmap mux based network device.
+diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c
+index c6fbc2a2a785..780c10ee359b 100644
+--- a/drivers/net/usb/qmi_wwan.c
++++ b/drivers/net/usb/qmi_wwan.c
+@@ -429,8 +429,8 @@ static ssize_t add_mux_store(struct device *d, struct device_attribute *attr, c
+ if (kstrtou8(buf, 0, &mux_id))
+ return -EINVAL;
+
+- /* mux_id [1 - 0x7f] range empirically found */
+- if (mux_id < 1 || mux_id > 0x7f)
++ /* mux_id [1 - 254] for compatibility with ip(8) and the rmnet driver */
++ if (mux_id < 1 || mux_id > 254)
+ return -EINVAL;
+
+ if (!rtnl_trylock())
+--
+2.16.4
+
diff --git a/patches.drivers/rapidio-fix-a-NULL-pointer-dereference-when-create_w.patch b/patches.drivers/rapidio-fix-a-NULL-pointer-dereference-when-create_w.patch
new file mode 100644
index 0000000000..5990ffd7ff
--- /dev/null
+++ b/patches.drivers/rapidio-fix-a-NULL-pointer-dereference-when-create_w.patch
@@ -0,0 +1,44 @@
+From 23015b22e47c5409620b1726a677d69e5cd032ba Mon Sep 17 00:00:00 2001
+From: Kangjie Lu <kjlu@umn.edu>
+Date: Tue, 14 May 2019 15:44:49 -0700
+Subject: [PATCH] rapidio: fix a NULL pointer dereference when create_workqueue() fails
+Git-commit: 23015b22e47c5409620b1726a677d69e5cd032ba
+Patch-mainline: v5.2-rc1
+References: bsc#1051510
+
+In case create_workqueue fails, the fix releases resources and returns
+-ENOMEM to avoid NULL pointer dereference.
+
+Signed-off-by: Kangjie Lu <kjlu@umn.edu>
+Acked-by: Alexandre Bounine <alex.bou9@gmail.com>
+Cc: Matt Porter <mporter@kernel.crashing.org>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/rapidio/rio_cm.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/drivers/rapidio/rio_cm.c b/drivers/rapidio/rio_cm.c
+index cf45829585cb..b29fc258eeba 100644
+--- a/drivers/rapidio/rio_cm.c
++++ b/drivers/rapidio/rio_cm.c
+@@ -2147,6 +2147,14 @@ static int riocm_add_mport(struct device *dev,
+ mutex_init(&cm->rx_lock);
+ riocm_rx_fill(cm, RIOCM_RX_RING_SIZE);
+ cm->rx_wq = create_workqueue(DRV_NAME "/rxq");
++ if (!cm->rx_wq) {
++ riocm_error("failed to allocate IBMBOX_%d on %s",
++ cmbox, mport->name);
++ rio_release_outb_mbox(mport, cmbox);
++ kfree(cm);
++ return -ENOMEM;
++ }
++
+ INIT_WORK(&cm->rx_work, rio_ibmsg_handler);
+
+ cm->tx_slot = 0;
+--
+2.16.4
+
diff --git a/patches.drivers/ras-cec-convert-the-timer-callback-to-a-workqueue.patch b/patches.drivers/ras-cec-convert-the-timer-callback-to-a-workqueue.patch
new file mode 100644
index 0000000000..dcfec72517
--- /dev/null
+++ b/patches.drivers/ras-cec-convert-the-timer-callback-to-a-workqueue.patch
@@ -0,0 +1,141 @@
+From: Cong Wang <xiyou.wangcong@gmail.com>
+Date: Tue, 16 Apr 2019 14:33:51 -0700
+Subject: RAS/CEC: Convert the timer callback to a workqueue
+Git-commit: 0ade0b6240c4853cf9725924c46c10f4251639d7
+Patch-mainline: v5.2-rc5
+References: bsc#1114279
+
+cec_timer_fn() is a timer callback which reads ce_arr.array[] and
+updates its decay values. However, it runs in interrupt context and the
+mutex protection the CEC uses for that array, is inadequate. Convert the
+used timer to a workqueue to keep the tasks the CEC performs preemptible
+and thus low-prio.
+
+ [ bp: Rewrite commit message.
+ s/timer/decay/gi to make it agnostic as to what facility is used. ]
+
+Fixes: 011d82611172 ("RAS: Add a Corrected Errors Collector")
+Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
+Signed-off-by: Borislav Petkov <bp@suse.de>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Cc: Tony Luck <tony.luck@intel.com>
+Cc: linux-edac <linux-edac@vger.kernel.org>
+Cc: <stable@vger.kernel.org>
+Link: https://lkml.kernel.org/r/20190416213351.28999-2-xiyou.wangcong@gmail.com
+---
+ drivers/ras/cec.c | 50 +++++++++++++++++++++++---------------------------
+ 1 file changed, 23 insertions(+), 27 deletions(-)
+
+--- a/drivers/ras/cec.c
++++ b/drivers/ras/cec.c
+@@ -1,6 +1,7 @@
+ #include <linux/mm.h>
+ #include <linux/gfp.h>
+ #include <linux/kernel.h>
++#include <linux/workqueue.h>
+
+ #include <asm/mce.h>
+
+@@ -122,16 +123,12 @@ static u64 dfs_pfn;
+ /* Amount of errors after which we offline */
+ static unsigned int count_threshold = COUNT_MASK;
+
+-/*
+- * The timer "decays" element count each timer_interval which is 24hrs by
+- * default.
+- */
+-
+-#define CEC_TIMER_DEFAULT_INTERVAL 24 * 60 * 60 /* 24 hrs */
+-#define CEC_TIMER_MIN_INTERVAL 1 * 60 * 60 /* 1h */
+-#define CEC_TIMER_MAX_INTERVAL 30 * 24 * 60 * 60 /* one month */
+-static struct timer_list cec_timer;
+-static u64 timer_interval = CEC_TIMER_DEFAULT_INTERVAL;
++/* Each element "decays" each decay_interval which is 24hrs by default. */
++#define CEC_DECAY_DEFAULT_INTERVAL 24 * 60 * 60 /* 24 hrs */
++#define CEC_DECAY_MIN_INTERVAL 1 * 60 * 60 /* 1h */
++#define CEC_DECAY_MAX_INTERVAL 30 * 24 * 60 * 60 /* one month */
++static struct delayed_work cec_work;
++static u64 decay_interval = CEC_DECAY_DEFAULT_INTERVAL;
+
+ /*
+ * Decrement decay value. We're using DECAY_BITS bits to denote decay of an
+@@ -159,22 +156,21 @@ static void do_spring_cleaning(struct ce
+ /*
+ * @interval in seconds
+ */
+-static void cec_mod_timer(struct timer_list *t, unsigned long interval)
++static void cec_mod_work(unsigned long interval)
+ {
+ unsigned long iv;
+
+- iv = interval * HZ + jiffies;
+-
+- mod_timer(t, round_jiffies(iv));
++ iv = interval * HZ;
++ mod_delayed_work(system_wq, &cec_work, round_jiffies(iv));
+ }
+
+-static void cec_timer_fn(unsigned long data)
++static void cec_work_fn(struct work_struct *work)
+ {
+- struct ce_array *ca = (struct ce_array *)data;
+-
+- do_spring_cleaning(ca);
++ mutex_lock(&ce_mutex);
++ do_spring_cleaning(&ce_arr);
++ mutex_unlock(&ce_mutex);
+
+- cec_mod_timer(&cec_timer, timer_interval);
++ cec_mod_work(decay_interval);
+ }
+
+ /*
+@@ -381,15 +377,15 @@ static int decay_interval_set(void *data
+ {
+ *(u64 *)data = val;
+
+- if (val < CEC_TIMER_MIN_INTERVAL)
++ if (val < CEC_DECAY_MIN_INTERVAL)
+ return -EINVAL;
+
+- if (val > CEC_TIMER_MAX_INTERVAL)
++ if (val > CEC_DECAY_MAX_INTERVAL)
+ return -EINVAL;
+
+- timer_interval = val;
++ decay_interval = val;
+
+- cec_mod_timer(&cec_timer, timer_interval);
++ cec_mod_work(decay_interval);
+ return 0;
+ }
+ DEFINE_DEBUGFS_ATTRIBUTE(decay_interval_ops, u64_get, decay_interval_set, "%lld\n");
+@@ -433,7 +429,7 @@ static int array_dump(struct seq_file *m
+
+ seq_printf(m, "Flags: 0x%x\n", ca->flags);
+
+- seq_printf(m, "Timer interval: %lld seconds\n", timer_interval);
++ seq_printf(m, "Decay interval: %lld seconds\n", decay_interval);
+ seq_printf(m, "Decays: %lld\n", ca->decays_done);
+
+ seq_printf(m, "Action threshold: %d\n", count_threshold);
+@@ -479,7 +475,7 @@ static int __init create_debugfs_nodes(v
+ }
+
+ decay = debugfs_create_file("decay_interval", S_IRUSR | S_IWUSR, d,
+- &timer_interval, &decay_interval_ops);
++ &decay_interval, &decay_interval_ops);
+ if (!decay) {
+ pr_warn("Error creating decay_interval debugfs node!\n");
+ goto err;
+@@ -515,8 +511,8 @@ void __init cec_init(void)
+ if (create_debugfs_nodes())
+ return;
+
+- setup_timer(&cec_timer, cec_timer_fn, (unsigned long)&ce_arr);
+- cec_mod_timer(&cec_timer, CEC_TIMER_DEFAULT_INTERVAL);
++ INIT_DELAYED_WORK(&cec_work, cec_work_fn);
++ schedule_delayed_work(&cec_work, CEC_DECAY_DEFAULT_INTERVAL);
+
+ pr_info("Correctable Errors collector initialized.\n");
+ }
diff --git a/patches.drivers/ras-cec-fix-binary-search-function.patch b/patches.drivers/ras-cec-fix-binary-search-function.patch
new file mode 100644
index 0000000000..ea4580d069
--- /dev/null
+++ b/patches.drivers/ras-cec-fix-binary-search-function.patch
@@ -0,0 +1,90 @@
+From: Borislav Petkov <bp@suse.de>
+Date: Sat, 20 Apr 2019 13:27:51 +0200
+Subject: RAS/CEC: Fix binary search function
+Git-commit: f3c74b38a55aefe1004200d15a83f109b510068c
+Patch-mainline: v5.2-rc5
+References: bsc#1114279
+
+Switch to using Donald Knuth's binary search algorithm (The Art of
+Computer Programming, vol. 3, section 6.2.1). This should've been done
+from the very beginning but the author must've been smoking something
+very potent at the time.
+
+The problem with the current one was that it would return the wrong
+element index in certain situations:
+
+ https://lkml.kernel.org/r/CAM_iQpVd02zkVJ846cj-Fg1yUNuz6tY5q1Vpj4LrXmE06dPYYg@mail.gmail.com
+
+and the noodling code after the loop was fishy at best.
+
+So switch to using Knuth's binary search. The final result is much
+cleaner and straightforward.
+
+Fixes: 011d82611172 ("RAS: Add a Corrected Errors Collector")
+Reported-by: Cong Wang <xiyou.wangcong@gmail.com>
+Signed-off-by: Borislav Petkov <bp@suse.de>
+Cc: Tony Luck <tony.luck@intel.com>
+Cc: linux-edac <linux-edac@vger.kernel.org>
+Cc: <stable@vger.kernel.org>
+---
+ drivers/ras/cec.c | 34 ++++++++++++++++++++--------------
+ 1 file changed, 20 insertions(+), 14 deletions(-)
+
+diff --git a/drivers/ras/cec.c b/drivers/ras/cec.c
+index 88e4f3ff0cb8..dbfe3e61d2c2 100644
+--- a/drivers/ras/cec.c
++++ b/drivers/ras/cec.c
+@@ -183,32 +183,38 @@ static void cec_timer_fn(struct timer_list *unused)
+ */
+ static int __find_elem(struct ce_array *ca, u64 pfn, unsigned int *to)
+ {
++ int min = 0, max = ca->n - 1;
+ u64 this_pfn;
+- int min = 0, max = ca->n;
+
+- while (min < max) {
+- int tmp = (max + min) >> 1;
++ while (min <= max) {
++ int i = (min + max) >> 1;
+
+- this_pfn = PFN(ca->array[tmp]);
++ this_pfn = PFN(ca->array[i]);
+
+ if (this_pfn < pfn)
+- min = tmp + 1;
++ min = i + 1;
+ else if (this_pfn > pfn)
+- max = tmp;
+- else {
+- min = tmp;
+- break;
++ max = i - 1;
++ else if (this_pfn == pfn) {
++ if (to)
++ *to = i;
++
++ return i;
+ }
+ }
+
++ /*
++ * When the loop terminates without finding @pfn, min has the index of
++ * the element slot where the new @pfn should be inserted. The loop
++ * terminates when min > max, which means the min index points to the
++ * bigger element while the max index to the smaller element, in-between
++ * which the new @pfn belongs to.
++ *
++ * For more details, see exercise 1, Section 6.2.1 in TAOCP, vol. 3.
++ */
+ if (to)
+ *to = min;
+
+- this_pfn = PFN(ca->array[min]);
+-
+- if (this_pfn == pfn)
+- return min;
+-
+ return -ENOKEY;
+ }
+
+
diff --git a/patches.drivers/soc-mediatek-pwrap-Zero-initialize-rdata-in-pwrap_in.patch b/patches.drivers/soc-mediatek-pwrap-Zero-initialize-rdata-in-pwrap_in.patch
new file mode 100644
index 0000000000..1702aba2ed
--- /dev/null
+++ b/patches.drivers/soc-mediatek-pwrap-Zero-initialize-rdata-in-pwrap_in.patch
@@ -0,0 +1,46 @@
+From 89e28da82836530f1ac7a3a32fecc31f22d79b3e Mon Sep 17 00:00:00 2001
+From: Nathan Chancellor <natechancellor@gmail.com>
+Date: Thu, 7 Mar 2019 15:56:51 -0700
+Subject: [PATCH] soc: mediatek: pwrap: Zero initialize rdata in pwrap_init_cipher
+Git-commit: 89e28da82836530f1ac7a3a32fecc31f22d79b3e
+Patch-mainline: v5.2-rc1
+References: bsc#1051510
+
+When building with -Wsometimes-uninitialized, Clang warns:
+
+drivers/soc/mediatek/mtk-pmic-wrap.c:1358:6: error: variable 'rdata' is
+used uninitialized whenever '||' condition is true
+[-Werror,-Wsometimes-uninitialized]
+
+If pwrap_write returns non-zero, pwrap_read will not be called to
+initialize rdata, meaning that we will use some random uninitialized
+stack value in our print statement. Zero initialize rdata in case this
+happens.
+
+Link: https://github.com/ClangBuiltLinux/linux/issues/401
+Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
+Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
+Reviewed-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/soc/mediatek/mtk-pmic-wrap.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/soc/mediatek/mtk-pmic-wrap.c b/drivers/soc/mediatek/mtk-pmic-wrap.c
+index 73f0be0567bd..c4449a163991 100644
+--- a/drivers/soc/mediatek/mtk-pmic-wrap.c
++++ b/drivers/soc/mediatek/mtk-pmic-wrap.c
+@@ -1371,7 +1371,7 @@ static bool pwrap_is_pmic_cipher_ready(struct pmic_wrapper *wrp)
+ static int pwrap_init_cipher(struct pmic_wrapper *wrp)
+ {
+ int ret;
+- u32 rdata;
++ u32 rdata = 0;
+
+ pwrap_writel(wrp, 0x1, PWRAP_CIPHER_SWRST);
+ pwrap_writel(wrp, 0x0, PWRAP_CIPHER_SWRST);
+--
+2.16.4
+
diff --git a/patches.drivers/soc-rockchip-Set-the-proper-PWM-for-rk3288.patch b/patches.drivers/soc-rockchip-Set-the-proper-PWM-for-rk3288.patch
new file mode 100644
index 0000000000..a4a6078842
--- /dev/null
+++ b/patches.drivers/soc-rockchip-Set-the-proper-PWM-for-rk3288.patch
@@ -0,0 +1,57 @@
+From bbdc00a7de24cc90315b1775fb74841373fe12f7 Mon Sep 17 00:00:00 2001
+From: Douglas Anderson <dianders@chromium.org>
+Date: Tue, 9 Apr 2019 13:49:05 -0700
+Subject: [PATCH] soc: rockchip: Set the proper PWM for rk3288
+Git-commit: bbdc00a7de24cc90315b1775fb74841373fe12f7
+Patch-mainline: v5.2-rc1
+References: bsc#1051510
+
+The rk3288 SoC has two PWM implementations available, the "old"
+implementation and the "new" one. You can switch between the two of
+them by flipping a bit in the grf.
+
+The "old" implementation is the default at chip power up but isn't the
+one that's officially supposed to be used. ...and, in fact, the
+driver that gets selected in Linux using the rk3288 device tree only
+supports the "new" implementation.
+
+Long ago I tried to get a switch to the right IP block landed in the
+PWM driver (search for "rk3288: Switch to use the proper PWM IP") but
+that got rejected. In the mean time the grf has grown a full-fledged
+driver that already sets other random bits like this. That means we
+can now get the fix landed.
+
+For those wondering how things could have possibly worked for the last
+4.5 years, folks have mostly been relying on the bootloader to set
+this bit. ...but occasionally folks have pointed back to my old patch
+series [1] in downstream kernels.
+
+[1] https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1391597.html
+
+Signed-off-by: Douglas Anderson <dianders@chromium.org>
+Signed-off-by: Heiko Stuebner <heiko@sntech.de>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/soc/rockchip/grf.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/drivers/soc/rockchip/grf.c b/drivers/soc/rockchip/grf.c
+index 96882ffde67e..3b81e1d75a97 100644
+--- a/drivers/soc/rockchip/grf.c
++++ b/drivers/soc/rockchip/grf.c
+@@ -66,9 +66,11 @@ static const struct rockchip_grf_info rk3228_grf __initconst = {
+ };
+
+ #define RK3288_GRF_SOC_CON0 0x244
++#define RK3288_GRF_SOC_CON2 0x24c
+
+ static const struct rockchip_grf_value rk3288_defaults[] __initconst = {
+ { "jtag switching", RK3288_GRF_SOC_CON0, HIWORD_UPDATE(0, 1, 12) },
++ { "pwm select", RK3288_GRF_SOC_CON2, HIWORD_UPDATE(1, 1, 0) },
+ };
+
+ static const struct rockchip_grf_info rk3288_grf __initconst = {
+--
+2.16.4
+
diff --git a/patches.drivers/tty-max310x-Fix-external-crystal-register-setup.patch b/patches.drivers/tty-max310x-Fix-external-crystal-register-setup.patch
new file mode 100644
index 0000000000..367a6290e5
--- /dev/null
+++ b/patches.drivers/tty-max310x-Fix-external-crystal-register-setup.patch
@@ -0,0 +1,47 @@
+From 5d24f455c182d5116dd5db8e1dc501115ecc9c2c Mon Sep 17 00:00:00 2001
+From: Joe Burmeister <joe.burmeister@devtank.co.uk>
+Date: Mon, 13 May 2019 11:23:57 +0100
+Subject: [PATCH] tty: max310x: Fix external crystal register setup
+Git-commit: 5d24f455c182d5116dd5db8e1dc501115ecc9c2c
+Patch-mainline: v5.2-rc3
+References: bsc#1051510
+
+The datasheet states:
+
+ Bit 4: ClockEnSet the ClockEn bit high to enable an external clocking
+(crystal or clock generator at XIN). Set the ClockEn bit to 0 to disable
+clocking
+ Bit 1: CrystalEnSet the CrystalEn bit high to enable the crystal
+oscillator. When using an external clock source at XIN, CrystalEn must
+be set low.
+
+The bit 4, MAX310X_CLKSRC_EXTCLK_BIT, should be set and was not.
+
+This was required to make the MAX3107 with an external crystal on our
+board able to send or receive data.
+
+Signed-off-by: Joe Burmeister <joe.burmeister@devtank.co.uk>
+Cc: stable <stable@vger.kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/tty/serial/max310x.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/tty/serial/max310x.c b/drivers/tty/serial/max310x.c
+index 450ba6d7996c..e5aebbf5f302 100644
+--- a/drivers/tty/serial/max310x.c
++++ b/drivers/tty/serial/max310x.c
+@@ -581,7 +581,7 @@ static int max310x_set_ref_clk(struct device *dev, struct max310x_port *s,
+ }
+
+ /* Configure clock source */
+- clksrc = xtal ? MAX310X_CLKSRC_CRYST_BIT : MAX310X_CLKSRC_EXTCLK_BIT;
++ clksrc = MAX310X_CLKSRC_EXTCLK_BIT | (xtal ? MAX310X_CLKSRC_CRYST_BIT : 0);
+
+ /* Configure PLL */
+ if (pllcfg) {
+--
+2.16.4
+
diff --git a/patches.fixes/0001-USB-serial-pl2303-fix-tranceiver-suspend-mode.patch b/patches.fixes/0001-USB-serial-pl2303-fix-tranceiver-suspend-mode.patch
new file mode 100644
index 0000000000..416506349f
--- /dev/null
+++ b/patches.fixes/0001-USB-serial-pl2303-fix-tranceiver-suspend-mode.patch
@@ -0,0 +1,83 @@
+From f64c3ab230682e8395a7fbd01f3eb5140c837d4e Mon Sep 17 00:00:00 2001
+From: Johan Hovold <johan@kernel.org>
+Date: Tue, 2 Apr 2019 10:19:31 +0200
+Subject: [PATCH] USB: serial: pl2303: fix tranceiver suspend mode
+Git-commit: f64c3ab230682e8395a7fbd01f3eb5140c837d4e
+Patch-mainline: v5.2-rc1
+References: bsc#1135642
+
+Add helper function to update register bits instead of overwriting the
+entire control register when updating the flow-control settings.
+
+This specifically avoids having the tranceiver suspend mode (bit 0)
+depend on the flow control setting.
+
+The tranceiver is currently configured at probe to be disabled during
+suspend, but this was overridden when disabling flow control or enabling
+xon/xoff.
+
+Fixes: 715f9527c1c1 ("USB: flow control fix for pl2303")
+Fixes: 7041d9c3f01b ("USB: serial: pl2303: add support for tx xon/xoff flow control")
+Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Oliver Neukum <oneukum@suse.com>
+---
+ drivers/usb/serial/pl2303.c | 31 ++++++++++++++++++++++++++++---
+ 1 file changed, 28 insertions(+), 3 deletions(-)
+
+--- a/drivers/usb/serial/pl2303.c
++++ b/drivers/usb/serial/pl2303.c
+@@ -148,6 +148,8 @@ MODULE_DEVICE_TABLE(usb, id_table);
+ #define UART_OVERRUN_ERROR 0x40
+ #define UART_CTS 0x80
+
++#define PL2303_FLOWCTRL_MASK 0xf0
++
+ static void pl2303_set_break(struct usb_serial_port *port, bool enable);
+
+ enum pl2303_type {
+@@ -226,6 +228,29 @@ static int pl2303_vendor_write(struct us
+ return 0;
+ }
+
++static int pl2303_update_reg(struct usb_serial *serial, u8 reg, u8 mask, u8 val)
++{
++ int ret = 0;
++ u8 *buf;
++
++ buf = kmalloc(1, GFP_KERNEL);
++ if (!buf)
++ return -ENOMEM;
++
++ ret = pl2303_vendor_read(serial, reg | 0x80, buf);
++ if (ret)
++ goto out_free;
++
++ *buf &= ~mask;
++ *buf |= val & mask;
++
++ ret = pl2303_vendor_write(serial, reg, *buf);
++out_free:
++ kfree(buf);
++
++ return ret;
++}
++
+ static int pl2303_probe(struct usb_serial *serial,
+ const struct usb_device_id *id)
+ {
+@@ -670,11 +695,11 @@ static void pl2303_set_termios(struct tt
+
+ if (C_CRTSCTS(tty)) {
+ if (spriv->quirks & PL2303_QUIRK_LEGACY)
+- pl2303_vendor_write(serial, 0x0, 0x41);
++ pl2303_update_reg(serial, 0, PL2303_FLOWCTRL_MASK, 0x40);
+ else
+- pl2303_vendor_write(serial, 0x0, 0x61);
++ pl2303_update_reg(serial, 0, PL2303_FLOWCTRL_MASK, 0x60);
+ } else {
+- pl2303_vendor_write(serial, 0x0, 0x0);
++ pl2303_update_reg(serial, 0, PL2303_FLOWCTRL_MASK, 0);
+ }
+
+ kfree(buf);
diff --git a/patches.fixes/0001-mwifiex-Abort-at-too-short-BSS-descriptor-element.patch b/patches.fixes/0001-mwifiex-Abort-at-too-short-BSS-descriptor-element.patch
index 62221e8979..245da31cdd 100644
--- a/patches.fixes/0001-mwifiex-Abort-at-too-short-BSS-descriptor-element.patch
+++ b/patches.fixes/0001-mwifiex-Abort-at-too-short-BSS-descriptor-element.patch
@@ -2,8 +2,9 @@ From 685c9b7750bfacd6fc1db50d86579980593b7869 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Wed, 29 May 2019 14:52:20 +0200
Subject: [PATCH] mwifiex: Abort at too short BSS descriptor element
-Patch-mainline: Submitted, https://lore.kernel.org/linux-wireless/20190529125220.17066-3-tiwai@suse.de/
References: bsc#1136424 CVE-2019-3846
+Git-commit: 685c9b7750bfacd6fc1db50d86579980593b7869
+Patch-mainline: v5.2-rc5
Currently mwifiex_update_bss_desc_with_ie() implicitly assumes that
the source descriptor entries contain the enough size for each type
diff --git a/patches.fixes/0001-mwifiex-Fix-heap-overflow-in-mwifiex_uap_parse_tail_.patch b/patches.fixes/0001-mwifiex-Fix-heap-overflow-in-mwifiex_uap_parse_tail_.patch
index 8b2f4d2d0e..bfb3f90103 100644
--- a/patches.fixes/0001-mwifiex-Fix-heap-overflow-in-mwifiex_uap_parse_tail_.patch
+++ b/patches.fixes/0001-mwifiex-Fix-heap-overflow-in-mwifiex_uap_parse_tail_.patch
@@ -2,8 +2,9 @@ From 69ae4f6aac1578575126319d3f55550e7e440449 Mon Sep 17 00:00:00 2001
From: Takashi Iwai <tiwai@suse.de>
Date: Fri, 31 May 2019 15:18:41 +0200
Subject: [PATCH] mwifiex: Fix heap overflow in mwifiex_uap_parse_tail_ies()
-Patch-mainline: Submitted, https://www.spinics.net/lists/linux-wireless/msg186667.html
References: bsc#1136935
+Patch-mainline: v5.2-rc5
+Git-commit: 69ae4f6aac1578575126319d3f55550e7e440449
A few places in mwifiex_uap_parse_tail_ies() perform memcpy()
unconditionally, which may lead to either buffer overflow or read over
diff --git a/patches.fixes/0001-mwifiex-Fix-possible-buffer-overflows-at-parsing-bss.patch b/patches.fixes/0001-mwifiex-Fix-possible-buffer-overflows-at-parsing-bss.patch
index 0bbe3b355d..c1375d52a3 100644
--- a/patches.fixes/0001-mwifiex-Fix-possible-buffer-overflows-at-parsing-bss.patch
+++ b/patches.fixes/0001-mwifiex-Fix-possible-buffer-overflows-at-parsing-bss.patch
@@ -3,8 +3,9 @@ From: Takashi Iwai <tiwai@suse.de>
Date: Wed, 29 May 2019 14:52:19 +0200
Subject: [PATCH] mwifiex: Fix possible buffer overflows at parsing bss
descriptor
-Patch-mainline: Submitted, https://lore.kernel.org/linux-wireless/20190529125220.17066-1-tiwai@suse.de/
References: bsc#1136424 CVE-2019-3846
+Patch-mainline: v5.2-rc5
+Git-commit: 13ec7f10b87f5fc04c4ccbd491c94c7980236a74
mwifiex_update_bss_desc_with_ie() calls memcpy() unconditionally in
a couple places without checking the destination size. Since the
diff --git a/patches.fixes/0001-usb-xhci-avoid-null-pointer-deref-when-bos-field-is-.patch b/patches.fixes/0001-usb-xhci-avoid-null-pointer-deref-when-bos-field-is-.patch
new file mode 100644
index 0000000000..ffe54af93e
--- /dev/null
+++ b/patches.fixes/0001-usb-xhci-avoid-null-pointer-deref-when-bos-field-is-.patch
@@ -0,0 +1,105 @@
+From 7aa1bb2ffd84d6b9b5f546b079bb15cd0ab6e76e Mon Sep 17 00:00:00 2001
+From: Carsten Schmid <carsten_schmid@mentor.com>
+Date: Wed, 22 May 2019 14:33:59 +0300
+Subject: [PATCH] usb: xhci: avoid null pointer deref when bos field is NULL
+Git-commit: 7aa1bb2ffd84d6b9b5f546b079bb15cd0ab6e76e
+Patch-mainline: v5.2-rc3
+References: bsc#1135642
+
+With defective USB sticks we see the following error happen:
+usb 1-3: new high-speed USB device number 6 using xhci_hcd
+usb 1-3: device descriptor read/64, error -71
+usb 1-3: device descriptor read/64, error -71
+usb 1-3: new high-speed USB device number 7 using xhci_hcd
+usb 1-3: device descriptor read/64, error -71
+usb 1-3: unable to get BOS descriptor set
+usb 1-3: New USB device found, idVendor=0781, idProduct=5581
+usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
+...
+BUG: unable to handle kernel NULL pointer dereference at 0000000000000008
+
+This comes from the following place:
+[ 1660.215380] IP: xhci_set_usb2_hardware_lpm+0xdf/0x3d0 [xhci_hcd]
+[ 1660.222092] PGD 0 P4D 0
+[ 1660.224918] Oops: 0000 [#1] PREEMPT SMP NOPTI
+[ 1660.425520] CPU: 1 PID: 38 Comm: kworker/1:1 Tainted: P U W O 4.14.67-apl #1
+[ 1660.434277] Workqueue: usb_hub_wq hub_event [usbcore]
+[ 1660.439918] task: ffffa295b6ae4c80 task.stack: ffffad4580150000
+[ 1660.446532] RIP: 0010:xhci_set_usb2_hardware_lpm+0xdf/0x3d0 [xhci_hcd]
+[ 1660.453821] RSP: 0018:ffffad4580153c70 EFLAGS: 00010046
+[ 1660.459655] RAX: 0000000000000000 RBX: ffffa295b4d7c000 RCX: 0000000000000002
+[ 1660.467625] RDX: 0000000000000002 RSI: ffffffff984a55b2 RDI: ffffffff984a55b2
+[ 1660.475586] RBP: ffffad4580153cc8 R08: 0000000000d6520a R09: 0000000000000001
+[ 1660.483556] R10: ffffad4580a004a0 R11: 0000000000000286 R12: ffffa295b4d7c000
+[ 1660.491525] R13: 0000000000010648 R14: ffffa295a84e1800 R15: 0000000000000000
+[ 1660.499494] FS: 0000000000000000(0000) GS:ffffa295bfc80000(0000) knlGS:0000000000000000
+[ 1660.508530] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
+[ 1660.514947] CR2: 0000000000000008 CR3: 000000025a114000 CR4: 00000000003406a0
+[ 1660.522917] Call Trace:
+[ 1660.525657] usb_set_usb2_hardware_lpm+0x3d/0x70 [usbcore]
+[ 1660.531792] usb_disable_device+0x242/0x260 [usbcore]
+[ 1660.537439] usb_disconnect+0xc1/0x2b0 [usbcore]
+[ 1660.542600] hub_event+0x596/0x18f0 [usbcore]
+[ 1660.547467] ? trace_preempt_on+0xdf/0x100
+[ 1660.552040] ? process_one_work+0x1c1/0x410
+[ 1660.556708] process_one_work+0x1d2/0x410
+[ 1660.561184] ? preempt_count_add.part.3+0x21/0x60
+[ 1660.566436] worker_thread+0x2d/0x3f0
+[ 1660.570522] kthread+0x122/0x140
+[ 1660.574123] ? process_one_work+0x410/0x410
+[ 1660.578792] ? kthread_create_on_node+0x60/0x60
+[ 1660.583849] ret_from_fork+0x3a/0x50
+[ 1660.587839] Code: 00 49 89 c3 49 8b 84 24 50 16 00 00 8d 4a ff 48 8d 04 c8 48 89 ca 4c 8b 10 45 8b 6a 04 48 8b 00 48 89 45 c0 49 8b 86 80 03 00 00 <48> 8b 40 08 8b 40 03 0f 1f 44 00 00 45 85 ff 0f 84 81 01 00 00
+[ 1660.608980] RIP: xhci_set_usb2_hardware_lpm+0xdf/0x3d0 [xhci_hcd] RSP: ffffad4580153c70
+[ 1660.617921] CR2: 0000000000000008
+
+Tracking this down shows that udev->bos is NULL in the following code:
+(xhci.c, in xhci_set_usb2_hardware_lpm)
+ field = le32_to_cpu(udev->bos->ext_cap->bmAttributes); <<<<<<< here
+
+ xhci_dbg(xhci, "%s port %d USB2 hardware LPM\n",
+ enable ? "enable" : "disable", port_num + 1);
+
+ if (enable) {
+ /* Host supports BESL timeout instead of HIRD */
+ if (udev->usb2_hw_lpm_besl_capable) {
+ /* if device doesn't have a preferred BESL value use a
+ * default one which works with mixed HIRD and BESL
+ * systems. See XHCI_DEFAULT_BESL definition in xhci.h
+ */
+ if ((field & USB_BESL_SUPPORT) &&
+ (field & USB_BESL_BASELINE_VALID))
+ hird = USB_GET_BESL_BASELINE(field);
+ else
+ hird = udev->l1_params.besl;
+
+The failing case is when disabling LPM. So it is sufficient to avoid
+access to udev->bos by moving the instruction into the "enable" clause.
+
+Cc: Stable <stable@vger.kernel.org>
+Signed-off-by: Carsten Schmid <carsten_schmid@mentor.com>
+Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Signed-off-by: Oliver Neukum <oneukum@suse.com>
+---
+ drivers/usb/host/xhci.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/host/xhci.c
++++ b/drivers/usb/host/xhci.c
+@@ -4218,7 +4218,6 @@ static int xhci_set_usb2_hardware_lpm(st
+ pm_addr = port_array[port_num] + PORTPMSC;
+ pm_val = readl(pm_addr);
+ hlpm_addr = port_array[port_num] + PORTHLPMC;
+- field = le32_to_cpu(udev->bos->ext_cap->bmAttributes);
+
+ xhci_dbg(xhci, "%s port %d USB2 hardware LPM\n",
+ enable ? "enable" : "disable", port_num + 1);
+@@ -4230,6 +4229,7 @@ static int xhci_set_usb2_hardware_lpm(st
+ * default one which works with mixed HIRD and BESL
+ * systems. See XHCI_DEFAULT_BESL definition in xhci.h
+ */
++ field = le32_to_cpu(udev->bos->ext_cap->bmAttributes);
+ if ((field & USB_BESL_SUPPORT) &&
+ (field & USB_BESL_BASELINE_VALID))
+ hird = USB_GET_BESL_BASELINE(field);
diff --git a/patches.fixes/6lowpan-Off-by-one-handling-nexthdr.patch b/patches.fixes/6lowpan-Off-by-one-handling-nexthdr.patch
new file mode 100644
index 0000000000..48413b0321
--- /dev/null
+++ b/patches.fixes/6lowpan-Off-by-one-handling-nexthdr.patch
@@ -0,0 +1,41 @@
+From f57c4bbf34439531adccd7d3a4ecc14f409c1399 Mon Sep 17 00:00:00 2001
+From: Dan Carpenter <dan.carpenter@oracle.com>
+Date: Wed, 3 Apr 2019 08:34:16 +0300
+Subject: [PATCH] 6lowpan: Off by one handling ->nexthdr
+Git-commit: f57c4bbf34439531adccd7d3a4ecc14f409c1399
+Patch-mainline: v5.2-rc1
+References: bsc#1051510
+
+NEXTHDR_MAX is 255. What happens here is that we take a u8 value
+"hdr->nexthdr" from the network and then look it up in
+lowpan_nexthdr_nhcs[]. The problem is that if hdr->nexthdr is 0xff then
+we read one element beyond the end of the array so the array needs to
+be one element larger.
+
+Fixes: 92aa7c65d295 ("6lowpan: add generic nhc layer interface")
+Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
+Acked-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
+Acked-by: Alexander Aring <aring@mojatatu.com>
+Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ net/6lowpan/nhc.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/net/6lowpan/nhc.c b/net/6lowpan/nhc.c
+index 4fa2fdda174d..9e56fb98f33c 100644
+--- a/net/6lowpan/nhc.c
++++ b/net/6lowpan/nhc.c
+@@ -18,7 +18,7 @@
+ #include "nhc.h"
+
+ static struct rb_root rb_root = RB_ROOT;
+-static struct lowpan_nhc *lowpan_nexthdr_nhcs[NEXTHDR_MAX];
++static struct lowpan_nhc *lowpan_nexthdr_nhcs[NEXTHDR_MAX + 1];
+ static DEFINE_SPINLOCK(lowpan_nhc_lock);
+
+ static int lowpan_nhc_insert(struct lowpan_nhc *nhc)
+--
+2.16.4
+
diff --git a/patches.fixes/SMB3-Fix-endian-warning.patch b/patches.fixes/SMB3-Fix-endian-warning.patch
new file mode 100644
index 0000000000..23ad8ba478
--- /dev/null
+++ b/patches.fixes/SMB3-Fix-endian-warning.patch
@@ -0,0 +1,40 @@
+From: Steve French <smfrench@gmail.com>
+Date: Tue, 19 Sep 2017 11:43:47 -0500
+Subject: [PATCH] SMB3: Fix endian warning
+References: bsc#1137884
+Patch-mainline: v4.14-rc2
+Git-commit: 590d08d3da45e9fed423b08ab38d71886c07abc8
+
+Multi-dialect negotiate patch had a minor endian error.
+
+Signed-off-by: Steve French <smfrench@gmail.com>
+Reviewed-by: Ronnie Sahlberg <lsahlber@redhat.com>
+Cc: Stable <stable@vger.kernel.org> # 4.13+
+Acked-by: Aurelien Aptel <aaptel@suse.com>
+
+---
+ fs/cifs/smb2pdu.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c
+index b0eaebe627e9..b4c58a1db1ae 100644
+--- a/fs/cifs/smb2pdu.c
++++ b/fs/cifs/smb2pdu.c
+@@ -570,10 +570,11 @@ SMB2_negotiate(const unsigned int xid, struct cifs_ses *ses)
+ /* ops set to 3.0 by default for default so update */
+ ses->server->ops = &smb21_operations;
+ }
+- } else if (rsp->DialectRevision != ses->server->vals->protocol_id) {
++ } else if (le16_to_cpu(rsp->DialectRevision) !=
++ ses->server->vals->protocol_id) {
+ /* if requested single dialect ensure returned dialect matched */
+ cifs_dbg(VFS, "Illegal 0x%x dialect returned: not requested\n",
+- cpu_to_le16(rsp->DialectRevision));
++ le16_to_cpu(rsp->DialectRevision));
+ return -EIO;
+ }
+
+--
+2.16.4
+
+
diff --git a/patches.fixes/af_key-unconditionally-clone-on-broadcast.patch b/patches.fixes/af_key-unconditionally-clone-on-broadcast.patch
new file mode 100644
index 0000000000..518434a9b2
--- /dev/null
+++ b/patches.fixes/af_key-unconditionally-clone-on-broadcast.patch
@@ -0,0 +1,132 @@
+From fc2d5cfdcfe2ab76b263d91429caa22451123085 Mon Sep 17 00:00:00 2001
+From: Sean Tranchetti <stranche@codeaurora.org>
+Date: Thu, 7 Feb 2019 13:33:21 -0700
+Subject: [PATCH] af_key: unconditionally clone on broadcast
+Git-commit: fc2d5cfdcfe2ab76b263d91429caa22451123085
+Patch-mainline: v5.0-rc8
+References: bsc#1051510
+
+Attempting to avoid cloning the skb when broadcasting by inflating
+the refcount with sock_hold/sock_put while under RCU lock is dangerous
+and violates RCU principles. It leads to subtle race conditions when
+attempting to free the SKB, as we may reference sockets that have
+already been freed by the stack.
+
+Unable to handle kernel paging request at virtual address 6b6b6b6b6b6c4b
+[006b6b6b6b6b6c4b] address between user and kernel address ranges
+Internal error: Oops: 96000004 [#1] PREEMPT SMP
+Task: fffffff78f65b380 task.stack: ffffff8049a88000
+pc : sock_rfree+0x38/0x6c
+lr : skb_release_head_state+0x6c/0xcc
+Process repro (pid: 7117, stack limit = 0xffffff8049a88000)
+Call trace:
+ sock_rfree+0x38/0x6c
+ skb_release_head_state+0x6c/0xcc
+ skb_release_all+0x1c/0x38
+ __kfree_skb+0x1c/0x30
+ kfree_skb+0xd0/0xf4
+ pfkey_broadcast+0x14c/0x18c
+ pfkey_sendmsg+0x1d8/0x408
+ sock_sendmsg+0x44/0x60
+ ___sys_sendmsg+0x1d0/0x2a8
+ __sys_sendmsg+0x64/0xb4
+ SyS_sendmsg+0x34/0x4c
+ el0_svc_naked+0x34/0x38
+Kernel panic - not syncing: Fatal exception
+
+Suggested-by: Eric Dumazet <eric.dumazet@gmail.com>
+Signed-off-by: Sean Tranchetti <stranche@codeaurora.org>
+Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ net/key/af_key.c | 40 +++++++++++++++-------------------------
+ 1 file changed, 15 insertions(+), 25 deletions(-)
+
+diff --git a/net/key/af_key.c b/net/key/af_key.c
+index 637030f43b67..5651c29cb5bd 100644
+--- a/net/key/af_key.c
++++ b/net/key/af_key.c
+@@ -196,30 +196,22 @@ static int pfkey_release(struct socket *sock)
+ return 0;
+ }
+
+-static int pfkey_broadcast_one(struct sk_buff *skb, struct sk_buff **skb2,
+- gfp_t allocation, struct sock *sk)
++static int pfkey_broadcast_one(struct sk_buff *skb, gfp_t allocation,
++ struct sock *sk)
+ {
+ int err = -ENOBUFS;
+
+- sock_hold(sk);
+- if (*skb2 == NULL) {
+- if (refcount_read(&skb->users) != 1) {
+- *skb2 = skb_clone(skb, allocation);
+- } else {
+- *skb2 = skb;
+- refcount_inc(&skb->users);
+- }
+- }
+- if (*skb2 != NULL) {
+- if (atomic_read(&sk->sk_rmem_alloc) <= sk->sk_rcvbuf) {
+- skb_set_owner_r(*skb2, sk);
+- skb_queue_tail(&sk->sk_receive_queue, *skb2);
+- sk->sk_data_ready(sk);
+- *skb2 = NULL;
+- err = 0;
+- }
++ if (atomic_read(&sk->sk_rmem_alloc) > sk->sk_rcvbuf)
++ return err;
++
++ skb = skb_clone(skb, allocation);
++
++ if (skb) {
++ skb_set_owner_r(skb, sk);
++ skb_queue_tail(&sk->sk_receive_queue, skb);
++ sk->sk_data_ready(sk);
++ err = 0;
+ }
+- sock_put(sk);
+ return err;
+ }
+
+@@ -234,7 +226,6 @@ static int pfkey_broadcast(struct sk_buff *skb, gfp_t allocation,
+ {
+ struct netns_pfkey *net_pfkey = net_generic(net, pfkey_net_id);
+ struct sock *sk;
+- struct sk_buff *skb2 = NULL;
+ int err = -ESRCH;
+
+ /* XXX Do we need something like netlink_overrun? I think
+@@ -253,7 +244,7 @@ static int pfkey_broadcast(struct sk_buff *skb, gfp_t allocation,
+ * socket.
+ */
+ if (pfk->promisc)
+- pfkey_broadcast_one(skb, &skb2, GFP_ATOMIC, sk);
++ pfkey_broadcast_one(skb, GFP_ATOMIC, sk);
+
+ /* the exact target will be processed later */
+ if (sk == one_sk)
+@@ -268,7 +259,7 @@ static int pfkey_broadcast(struct sk_buff *skb, gfp_t allocation,
+ continue;
+ }
+
+- err2 = pfkey_broadcast_one(skb, &skb2, GFP_ATOMIC, sk);
++ err2 = pfkey_broadcast_one(skb, GFP_ATOMIC, sk);
+
+ /* Error is cleared after successful sending to at least one
+ * registered KM */
+@@ -278,9 +269,8 @@ static int pfkey_broadcast(struct sk_buff *skb, gfp_t allocation,
+ rcu_read_unlock();
+
+ if (one_sk != NULL)
+- err = pfkey_broadcast_one(skb, &skb2, allocation, one_sk);
++ err = pfkey_broadcast_one(skb, allocation, one_sk);
+
+- kfree_skb(skb2);
+ kfree_skb(skb);
+ return err;
+ }
+--
+2.16.4
+
diff --git a/patches.fixes/audit-fix-a-memory-leak-bug.patch b/patches.fixes/audit-fix-a-memory-leak-bug.patch
new file mode 100644
index 0000000000..a17fe82c98
--- /dev/null
+++ b/patches.fixes/audit-fix-a-memory-leak-bug.patch
@@ -0,0 +1,68 @@
+From 70c4cf17e445264453bc5323db3e50aa0ac9e81f Mon Sep 17 00:00:00 2001
+From: Wenwen Wang <wang6495@umn.edu>
+Date: Fri, 19 Apr 2019 20:49:29 -0500
+Subject: [PATCH] audit: fix a memory leak bug
+Git-commit: 70c4cf17e445264453bc5323db3e50aa0ac9e81f
+Patch-mainline: v5.2-rc1
+References: bsc#1051510
+
+In audit_rule_change(), audit_data_to_entry() is firstly invoked to
+translate the payload data to the kernel's rule representation. In
+audit_data_to_entry(), depending on the audit field type, an audit tree may
+be created in audit_make_tree(), which eventually invokes kmalloc() to
+allocate the tree. Since this tree is a temporary tree, it will be then
+freed in the following execution, e.g., audit_add_rule() if the message
+type is AUDIT_ADD_RULE or audit_del_rule() if the message type is
+AUDIT_DEL_RULE. However, if the message type is neither AUDIT_ADD_RULE nor
+AUDIT_DEL_RULE, i.e., the default case of the switch statement, this
+temporary tree is not freed.
+
+To fix this issue, only allocate the tree when the type is AUDIT_ADD_RULE
+or AUDIT_DEL_RULE.
+
+Signed-off-by: Wenwen Wang <wang6495@umn.edu>
+Reviewed-by: Richard Guy Briggs <rgb@redhat.com>
+Signed-off-by: Paul Moore <paul@paul-moore.com>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ kernel/auditfilter.c | 12 +++++++-----
+ 1 file changed, 7 insertions(+), 5 deletions(-)
+
+diff --git a/kernel/auditfilter.c b/kernel/auditfilter.c
+index 2c3c2f349b23..1bc6410413e6 100644
+--- a/kernel/auditfilter.c
++++ b/kernel/auditfilter.c
+@@ -1114,22 +1114,24 @@ int audit_rule_change(int type, int seq, void *data, size_t datasz)
+ int err = 0;
+ struct audit_entry *entry;
+
+- entry = audit_data_to_entry(data, datasz);
+- if (IS_ERR(entry))
+- return PTR_ERR(entry);
+-
+ switch (type) {
+ case AUDIT_ADD_RULE:
++ entry = audit_data_to_entry(data, datasz);
++ if (IS_ERR(entry))
++ return PTR_ERR(entry);
+ err = audit_add_rule(entry);
+ audit_log_rule_change("add_rule", &entry->rule, !err);
+ break;
+ case AUDIT_DEL_RULE:
++ entry = audit_data_to_entry(data, datasz);
++ if (IS_ERR(entry))
++ return PTR_ERR(entry);
+ err = audit_del_rule(entry);
+ audit_log_rule_change("remove_rule", &entry->rule, !err);
+ break;
+ default:
+- err = -EINVAL;
+ WARN_ON(1);
++ return -EINVAL;
+ }
+
+ if (err || type == AUDIT_DEL_RULE) {
+--
+2.16.4
+
diff --git a/patches.fixes/cfg80211-fix-memory-leak-of-wiphy-device-name.patch b/patches.fixes/cfg80211-fix-memory-leak-of-wiphy-device-name.patch
new file mode 100644
index 0000000000..485204fd15
--- /dev/null
+++ b/patches.fixes/cfg80211-fix-memory-leak-of-wiphy-device-name.patch
@@ -0,0 +1,39 @@
+From 4f488fbca2a86cc7714a128952eead92cac279ab Mon Sep 17 00:00:00 2001
+From: Eric Biggers <ebiggers@google.com>
+Date: Mon, 10 Jun 2019 13:02:19 -0700
+Subject: [PATCH] cfg80211: fix memory leak of wiphy device name
+Git-commit: 4f488fbca2a86cc7714a128952eead92cac279ab
+Patch-mainline: v5.2-rc6
+References: bsc#1051510
+
+In wiphy_new_nm(), if an error occurs after dev_set_name() and
+device_initialize() have already been called, it's necessary to call
+put_device() (via wiphy_free()) to avoid a memory leak.
+
+Reported-by: syzbot+7fddca22578bc67c3fe4@syzkaller.appspotmail.com
+Fixes: 1f87f7d3a3b4 ("cfg80211: add rfkill support")
+Cc: stable@vger.kernel.org
+Signed-off-by: Eric Biggers <ebiggers@google.com>
+Signed-off-by: Johannes Berg <johannes.berg@intel.com>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ net/wireless/core.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/net/wireless/core.c b/net/wireless/core.c
+index 4e83892f1ac2..c58acca09301 100644
+--- a/net/wireless/core.c
++++ b/net/wireless/core.c
+@@ -513,7 +513,7 @@ struct wiphy *wiphy_new_nm(const struct cfg80211_ops *ops, int sizeof_priv,
+ &rdev->rfkill_ops, rdev);
+
+ if (!rdev->rfkill) {
+- kfree(rdev);
++ wiphy_free(&rdev->wiphy);
+ return NULL;
+ }
+
+--
+2.16.4
+
diff --git a/patches.fixes/drivers-thermal-tsens-Don-t-print-error-message-on-E.patch b/patches.fixes/drivers-thermal-tsens-Don-t-print-error-message-on-E.patch
new file mode 100644
index 0000000000..d7f310ec64
--- /dev/null
+++ b/patches.fixes/drivers-thermal-tsens-Don-t-print-error-message-on-E.patch
@@ -0,0 +1,38 @@
+From fc7d18cf6a923cde7f5e7ba2c1105bb106d3e29a Mon Sep 17 00:00:00 2001
+From: Amit Kucheria <amit.kucheria@linaro.org>
+Date: Wed, 20 Mar 2019 18:47:52 +0530
+Subject: [PATCH] drivers: thermal: tsens: Don't print error message on -EPROBE_DEFER
+Git-commit: fc7d18cf6a923cde7f5e7ba2c1105bb106d3e29a
+Patch-mainline: v5.2-rc1
+References: bsc#1051510
+
+We print a calibration failure message on -EPROBE_DEFER from
+nvmem/qfprom as follows:
+[ 3.003090] qcom-tsens 4a9000.thermal-sensor: version: 1.4
+[ 3.005376] qcom-tsens 4a9000.thermal-sensor: tsens calibration failed
+[ 3.113248] qcom-tsens 4a9000.thermal-sensor: version: 1.4
+
+This confuses people when, in fact, calibration succeeds later when
+nvmem/qfprom device is available. Don't print this message on a
+-EPROBE_DEFER.
+
+Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
+Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/thermal/qcom/tsens.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/thermal/qcom/tsens.c
++++ b/drivers/thermal/qcom/tsens.c
+@@ -162,7 +162,8 @@ static int tsens_probe(struct platform_d
+ if (tmdev->ops->calibrate) {
+ ret = tmdev->ops->calibrate(tmdev);
+ if (ret < 0) {
+- dev_err(dev, "tsens calibration failed\n");
++ if (ret != -EPROBE_DEFER)
++ dev_err(dev, "tsens calibration failed\n");
+ return ret;
+ }
+ }
diff --git a/patches.fixes/nfsd-COPY-and-CLONE-operations-require-the-saved-fil.patch b/patches.fixes/nfsd-COPY-and-CLONE-operations-require-the-saved-fil.patch
index 9a15e68ae5..e384d991e4 100644
--- a/patches.fixes/nfsd-COPY-and-CLONE-operations-require-the-saved-fil.patch
+++ b/patches.fixes/nfsd-COPY-and-CLONE-operations-require-the-saved-fil.patch
@@ -4,7 +4,7 @@ Subject: [PATCH] nfsd: COPY and CLONE operations require the saved filehandle
to be set
Git-commit: 01310bb7c9c98752cc763b36532fab028e0f8f81
Patch-mainline: v4.20
-References: git-fixes
+References: git-fixes, bsc#1137103, CVE-2018-16871
Make sure we have a saved filehandle, otherwise we'll oops with a null
pointer dereference in nfs4_preprocess_stateid_op().
diff --git a/patches.fixes/sched-topology-Improve-load-balancing-on-AMD-EPYC.patch b/patches.fixes/sched-topology-Improve-load-balancing-on-AMD-EPYC.patch
index 7ae7d8e588..14284cb082 100644
--- a/patches.fixes/sched-topology-Improve-load-balancing-on-AMD-EPYC.patch
+++ b/patches.fixes/sched-topology-Improve-load-balancing-on-AMD-EPYC.patch
@@ -75,9 +75,9 @@ index 57bb2100e05b..bb2f3e98efbf 100644
+ node_reclaim_distance = 32;
+#endif
+
- /* Fix erratum 1076: CPB feature bit not being set in CPUID. */
- if (!cpu_has(c, X86_FEATURE_CPB))
- set_cpu_cap(c, X86_FEATURE_CPB);
+ /*
+ * Fix erratum 1076: CPB feature bit not being set in CPUID.
+ * Always set it, except when running under a hypervisor.
diff --git a/include/linux/topology.h b/include/linux/topology.h
index cb0775e1ee4b..74b484354ac9 100644
--- a/include/linux/topology.h
diff --git a/patches.fixes/scsi-vmw_pscsi-Fix-use-after-free-in-pvscsi_queue_lc.patch b/patches.fixes/scsi-vmw_pscsi-Fix-use-after-free-in-pvscsi_queue_lc.patch
new file mode 100644
index 0000000000..96bb5c711f
--- /dev/null
+++ b/patches.fixes/scsi-vmw_pscsi-Fix-use-after-free-in-pvscsi_queue_lc.patch
@@ -0,0 +1,51 @@
+From 973ce39b8aebfe71d1fcae17ff1dc450699979d5 Mon Sep 17 00:00:00 2001
+From: Jan Kara <jack@suse.cz>
+Date: Tue, 11 Jun 2019 14:33:38 +0200
+Subject: [PATCH] scsi: vmw_pscsi: Fix use-after-free in pvscsi_queue_lck()
+References: bsc#1135296
+Patch-mainline: Submitted 18/06/2019
+
+Once we unlock adapter->hw_lock in pvscsi_queue_lck() nothing prevents just
+queued scsi_cmnd from completing and freeing the request. Thus cmd->cmnd[0]
+dereference can dereference already freed request leading to kernel crashes or
+other issues (which one of our customers observed). Store cmd->cmnd[0] in a
+local variable before unlocking adapter->hw_lock to fix the issue.
+
+CC: stable@vger.kernel.org
+Signed-off-by: Jan Kara <jack@suse.cz>
+---
+ drivers/scsi/vmw_pvscsi.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/scsi/vmw_pvscsi.c b/drivers/scsi/vmw_pvscsi.c
+index ecee4b3ff073..377b07b2feeb 100644
+--- a/drivers/scsi/vmw_pvscsi.c
++++ b/drivers/scsi/vmw_pvscsi.c
+@@ -763,6 +763,7 @@ static int pvscsi_queue_lck(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd
+ struct pvscsi_adapter *adapter = shost_priv(host);
+ struct pvscsi_ctx *ctx;
+ unsigned long flags;
++ unsigned char op;
+
+ spin_lock_irqsave(&adapter->hw_lock, flags);
+
+@@ -775,13 +776,14 @@ static int pvscsi_queue_lck(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd
+ }
+
+ cmd->scsi_done = done;
++ op = cmd->cmnd[0];
+
+ dev_dbg(&cmd->device->sdev_gendev,
+- "queued cmd %p, ctx %p, op=%x\n", cmd, ctx, cmd->cmnd[0]);
++ "queued cmd %p, ctx %p, op=%x\n", cmd, ctx, op);
+
+ spin_unlock_irqrestore(&adapter->hw_lock, flags);
+
+- pvscsi_kick_io(adapter, cmd->cmnd[0]);
++ pvscsi_kick_io(adapter, op);
+
+ return 0;
+ }
+--
+2.16.4
+
diff --git a/patches.fixes/tcp-add-tcp_min_snd_mss-sysctl.patch b/patches.fixes/tcp-add-tcp_min_snd_mss-sysctl.patch
index 1993376b4e..00896db48c 100644
--- a/patches.fixes/tcp-add-tcp_min_snd_mss-sysctl.patch
+++ b/patches.fixes/tcp-add-tcp_min_snd_mss-sysctl.patch
@@ -1,7 +1,8 @@
From: Eric Dumazet <edumazet@google.com>
Date: Thu, 6 Jun 2019 09:38:47 -0700
Subject: tcp: add tcp_min_snd_mss sysctl
-Patch-mainline: Not yet, embargo
+Patch-mainline: v5.2-rc6
+Git-commit: 5f3e2bf008c2221478101ee72f5cb4654b9fc363
References: bsc#1137586 CVE-2019-11479
Some TCP peers announce a very small MSS option in their SYN and/or
diff --git a/patches.fixes/tcp-enforce-tcp_min_snd_mss-in-tcp_mtu_probing.patch b/patches.fixes/tcp-enforce-tcp_min_snd_mss-in-tcp_mtu_probing.patch
index 1a82b48a16..b6e8c3a336 100644
--- a/patches.fixes/tcp-enforce-tcp_min_snd_mss-in-tcp_mtu_probing.patch
+++ b/patches.fixes/tcp-enforce-tcp_min_snd_mss-in-tcp_mtu_probing.patch
@@ -1,7 +1,8 @@
From: Eric Dumazet <edumazet@google.com>
Date: Sat, 8 Jun 2019 10:38:08 -0700
Subject: tcp: enforce tcp_min_snd_mss in tcp_mtu_probing()
-Patch-mainline: Not yet, embargo
+Patch-mainline: v5.2-rc6
+Git-commit: 967c05aee439e6e5d7d805e195b3a20ef5c433d6
References: bsc#1137586 CVE-2019-11479
If mtu probing is enabled tcp_mtu_probing() could very well end up
@@ -18,6 +19,7 @@ Cc: Yuchung Cheng <ycheng@google.com>
Cc: Tyler Hicks <tyhicks@canonical.com>
Cc: Bruce Curtis <brucec@netflix.com>
Acked-by: Michal Kubecek <mkubecek@suse.cz>
+
---
net/ipv4/tcp_timer.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/patches.fixes/tcp-fix-fack_count-accounting-on-tcp_shift_skb_data.patch b/patches.fixes/tcp-fix-fack_count-accounting-on-tcp_shift_skb_data.patch
deleted file mode 100644
index 2ac827286f..0000000000
--- a/patches.fixes/tcp-fix-fack_count-accounting-on-tcp_shift_skb_data.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From: Joao Martins <joao.m.martins@oracle.com>
-Date: Mon, 10 Jun 2019 10:13:23 -0400
-Subject: tcp: fix fack_count accounting on tcp_shift_skb_data()
-Patch-mainline: Not yet, embargo
-References: CVE-2019-11477 bsc#1137586
-
-v4.15 or since commit 737ff314563 ("tcp: use sequence distance to
-detect reordering") had switched from the packet-based FACK tracking and
-switched to sequence-based.
-
-v4.14 and older still have the old logic and hence on
-tcp_skb_shift_data() needs to retain its original logic and have
-@fack_count in sync. In other words, we keep the increment of pcount with
-tcp_skb_pcount(skb) to later used that to update fack_count. To make it
-more explicit we track the new skb that gets incremented to pcount in
-@next_pcount, and we get to avoid the constant invocation of
-tcp_skb_pcount(skb) all together.
-
-Reported-by: Alexey Kodanev <alexey.kodanev@oracle.com>
-Signed-off-by: Joao Martins <joao.m.martins@oracle.com>
-Acked-by: Michal Kubecek <mkubecek@suse.cz>
----
- net/ipv4/tcp_input.c | 9 ++++++---
- 1 file changed, 6 insertions(+), 3 deletions(-)
-
---- a/net/ipv4/tcp_input.c
-+++ b/net/ipv4/tcp_input.c
-@@ -1419,6 +1419,7 @@ static struct sk_buff *tcp_shift_skb_data(struct sock *sk, struct sk_buff *skb,
- struct tcp_sock *tp = tcp_sk(sk);
- struct sk_buff *prev;
- int mss;
-+ int next_pcount;
- int pcount = 0;
- int len;
- int in_sack;
-@@ -1535,9 +1536,11 @@ static struct sk_buff *tcp_shift_skb_data(struct sock *sk, struct sk_buff *skb,
- goto out;
-
- len = skb->len;
-- pcount = tcp_skb_pcount(skb);
-- if (tcp_skb_shift(prev, skb, pcount, len))
-- tcp_shifted_skb(sk, skb, state, pcount, len, mss, 0);
-+ next_pcount = tcp_skb_pcount(skb);
-+ if (tcp_skb_shift(prev, skb, next_pcount, len)) {
-+ pcount += next_pcount;
-+ tcp_shifted_skb(sk, skb, state, next_pcount, len, mss, 0);
-+ }
-
- out:
- state->fack_count += pcount;
diff --git a/patches.fixes/tcp-limit-payload-size-of-sacked-skbs.patch b/patches.fixes/tcp-limit-payload-size-of-sacked-skbs.patch
index 51e93d80af..dc0601ca36 100644
--- a/patches.fixes/tcp-limit-payload-size-of-sacked-skbs.patch
+++ b/patches.fixes/tcp-limit-payload-size-of-sacked-skbs.patch
@@ -1,7 +1,8 @@
From: Eric Dumazet <edumazet@google.com>
Date: Thu, 6 Jun 2019 09:38:45 -0700
Subject: tcp: limit payload size of sacked skbs
-Patch-mainline: Not yet, embargo
+Patch-mainline: v5.2-rc6
+Git-commit: 3b4929f65b0d8249f19a50245cd88ed1a2f78cff
References: bsc#1137586 CVE-2019-11477
Jonathan Looney reported that TCP can trigger the following crash
@@ -36,9 +37,9 @@ Acked-by: Michal Kubecek <mkubecek@suse.cz>
include/linux/tcp.h | 4 ++++
include/net/tcp.h | 2 ++
net/ipv4/tcp.c | 1 +
- net/ipv4/tcp_input.c | 26 ++++++++++++++++++++------
+ net/ipv4/tcp_input.c | 27 ++++++++++++++++++++++-----
net/ipv4/tcp_output.c | 6 +++---
- 5 files changed, 30 insertions(+), 9 deletions(-)
+ 5 files changed, 32 insertions(+), 8 deletions(-)
--- a/include/linux/tcp.h
+++ b/include/linux/tcp.h
@@ -105,7 +106,15 @@ Acked-by: Michal Kubecek <mkubecek@suse.cz>
/* Try collapsing SACK blocks spanning across multiple skbs to a single
* skb.
*/
-@@ -1501,7 +1516,7 @@ static struct sk_buff *tcp_shift_skb_data(struct sock *sk, struct sk_buff *skb,
+@@ -1404,6 +1419,7 @@ static struct sk_buff *tcp_shift_skb_data(struct sock *sk, struct sk_buff *skb,
+ struct tcp_sock *tp = tcp_sk(sk);
+ struct sk_buff *prev;
+ int mss;
++ int next_pcount;
+ int pcount = 0;
+ int len;
+ int in_sack;
+@@ -1501,7 +1517,7 @@ static struct sk_buff *tcp_shift_skb_data(struct sock *sk, struct sk_buff *skb,
if (!after(TCP_SKB_CB(skb)->seq + len, tp->snd_una))
goto fallback;
@@ -114,20 +123,20 @@ Acked-by: Michal Kubecek <mkubecek@suse.cz>
goto fallback;
if (!tcp_shifted_skb(sk, skb, state, pcount, len, mss, dup_sack))
goto out;
-@@ -1520,10 +1535,9 @@ static struct sk_buff *tcp_shift_skb_data(struct sock *sk, struct sk_buff *skb,
+@@ -1520,9 +1536,10 @@ static struct sk_buff *tcp_shift_skb_data(struct sock *sk, struct sk_buff *skb,
goto out;
len = skb->len;
- if (skb_shift(prev, skb, len)) {
- pcount += tcp_skb_pcount(skb);
- tcp_shifted_skb(sk, skb, state, tcp_skb_pcount(skb), len, mss, 0);
-- }
-+ pcount = tcp_skb_pcount(skb);
-+ if (tcp_skb_shift(prev, skb, pcount, len))
-+ tcp_shifted_skb(sk, skb, state, pcount, len, mss, 0);
++ next_pcount = tcp_skb_pcount(skb);
++ if (tcp_skb_shift(prev, skb, next_pcount, len)) {
++ pcount += next_pcount;
++ tcp_shifted_skb(sk, skb, state, next_pcount, len, mss, 0);
+ }
out:
- state->fack_count += pcount;
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -1443,8 +1443,8 @@ static inline int __tcp_mtu_to_mss(struct sock *sk, int pmtu)
diff --git a/patches.fixes/tcp-tcp_fragment-should-apply-sane-memory-limits.patch b/patches.fixes/tcp-tcp_fragment-should-apply-sane-memory-limits.patch
index 46fa950840..cee78584d6 100644
--- a/patches.fixes/tcp-tcp_fragment-should-apply-sane-memory-limits.patch
+++ b/patches.fixes/tcp-tcp_fragment-should-apply-sane-memory-limits.patch
@@ -1,7 +1,8 @@
From: Eric Dumazet <edumazet@google.com>
Date: Thu, 6 Jun 2019 09:38:46 -0700
Subject: tcp: tcp_fragment() should apply sane memory limits
-Patch-mainline: Not yet, embargo
+Patch-mainline: v5.2-rc6
+Git-commit: f070ef2ac66716357066b683fb0baf55f8191a2e
References: bsc#1137586 CVE-2019-11478
Jonathan Looney reported that a malicious peer can force a sender
diff --git a/patches.fixes/thermal-rcar_gen3_thermal-disable-interrupt-in-.remo.patch b/patches.fixes/thermal-rcar_gen3_thermal-disable-interrupt-in-.remo.patch
new file mode 100644
index 0000000000..d10e892240
--- /dev/null
+++ b/patches.fixes/thermal-rcar_gen3_thermal-disable-interrupt-in-.remo.patch
@@ -0,0 +1,42 @@
+From 63f55fcea50c25ae5ad45af92d08dae3b84534c2 Mon Sep 17 00:00:00 2001
+From: Jiada Wang <jiada_wang@mentor.com>
+Date: Wed, 24 Apr 2019 14:11:45 +0900
+Subject: [PATCH] thermal: rcar_gen3_thermal: disable interrupt in .remove
+Git-commit: 63f55fcea50c25ae5ad45af92d08dae3b84534c2
+Patch-mainline: v5.2-rc1
+References: bsc#1051510
+
+Currently IRQ remains enabled after .remove, later if device is probed,
+IRQ is requested before .thermal_init, this may cause IRQ function be
+called before device is initialized.
+
+this patch disables interrupt in .remove, to ensure irq function
+only be called after device is fully initialized.
+
+Signed-off-by: Jiada Wang <jiada_wang@mentor.com>
+Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
+Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>
+Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/thermal/rcar_gen3_thermal.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/drivers/thermal/rcar_gen3_thermal.c b/drivers/thermal/rcar_gen3_thermal.c
+index cf5ae8f6e8ed..e6727bd09f86 100644
+--- a/drivers/thermal/rcar_gen3_thermal.c
++++ b/drivers/thermal/rcar_gen3_thermal.c
+@@ -307,6 +307,9 @@ MODULE_DEVICE_TABLE(of, rcar_gen3_thermal_dt_ids);
+ static int rcar_gen3_thermal_remove(struct platform_device *pdev)
+ {
+ struct device *dev = &pdev->dev;
++ struct rcar_gen3_thermal_priv *priv = dev_get_drvdata(dev);
++
++ rcar_thermal_irq_set(priv, false);
+
+ pm_runtime_put(dev);
+ pm_runtime_disable(dev);
+--
+2.16.4
+
diff --git a/patches.fixes/tmpfs-fix-link-accounting-when-a-tmpfile-is-linked-i.patch b/patches.fixes/tmpfs-fix-link-accounting-when-a-tmpfile-is-linked-i.patch
new file mode 100644
index 0000000000..13f7743b9a
--- /dev/null
+++ b/patches.fixes/tmpfs-fix-link-accounting-when-a-tmpfile-is-linked-i.patch
@@ -0,0 +1,64 @@
+From 1062af920c07f5b54cf5060fde3339da6df0cf6b Mon Sep 17 00:00:00 2001
+From: "Darrick J. Wong" <darrick.wong@oracle.com>
+Date: Thu, 21 Feb 2019 08:48:09 -0800
+Subject: [PATCH] tmpfs: fix link accounting when a tmpfile is linked in
+Git-commit: 1062af920c07f5b54cf5060fde3339da6df0cf6b
+Patch-mainline: v5.0-rc8
+References: bsc#1051510
+
+tmpfs has a peculiarity of accounting hard links as if they were
+separate inodes: so that when the number of inodes is limited, as it is
+by default, a user cannot soak up an unlimited amount of unreclaimable
+dcache memory just by repeatedly linking a file.
+
+But when v3.11 added O_TMPFILE, and the ability to use linkat() on the
+fd, we missed accommodating this new case in tmpfs: "df -i" shows that
+an extra "inode" remains accounted after the file is unlinked and the fd
+closed and the actual inode evicted. If a user repeatedly links
+tmpfiles into a tmpfs, the limit will be hit (ENOSPC) even after they
+are deleted.
+
+Just skip the extra reservation from shmem_link() in this case: there's
+a sense in which this first link of a tmpfile is then cheaper than a
+hard link of another file, but the accounting works out, and there's
+still good limiting, so no need to do anything more complicated.
+
+Link: http://lkml.kernel.org/r/alpine.LSU.2.11.1902182134370.7035@eggly.anvils
+Fixes: f4e0c30c191 ("allow the temp files created by open() to be linked to")
+Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
+Signed-off-by: Hugh Dickins <hughd@google.com>
+Reported-by: Matej Kupljen <matej.kupljen@gmail.com>
+Acked-by: Al Viro <viro@zeniv.linux.org.uk>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ mm/shmem.c | 10 +++++++---
+ 1 file changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/mm/shmem.c b/mm/shmem.c
+index 6ece1e2fe76e..0905215fb016 100644
+--- a/mm/shmem.c
++++ b/mm/shmem.c
+@@ -2854,10 +2854,14 @@ static int shmem_link(struct dentry *old_dentry, struct inode *dir, struct dentr
+ * No ordinary (disk based) filesystem counts links as inodes;
+ * but each new link needs a new dentry, pinning lowmem, and
+ * tmpfs dentries cannot be pruned until they are unlinked.
++ * But if an O_TMPFILE file is linked into the tmpfs, the
++ * first link must skip that, to get the accounting right.
+ */
+- ret = shmem_reserve_inode(inode->i_sb);
+- if (ret)
+- goto out;
++ if (inode->i_nlink) {
++ ret = shmem_reserve_inode(inode->i_sb);
++ if (ret)
++ goto out;
++ }
+
+ dir->i_size += BOGO_DIRENT_SIZE;
+ inode->i_ctime = dir->i_ctime = dir->i_mtime = current_time(inode);
+--
+2.16.4
+
diff --git a/patches.fixes/tmpfs-fix-uninitialized-return-value-in-shmem_link.patch b/patches.fixes/tmpfs-fix-uninitialized-return-value-in-shmem_link.patch
new file mode 100644
index 0000000000..a04de9ba19
--- /dev/null
+++ b/patches.fixes/tmpfs-fix-uninitialized-return-value-in-shmem_link.patch
@@ -0,0 +1,42 @@
+From 29b00e609960ae0fcff382f4c7079dd0874a5311 Mon Sep 17 00:00:00 2001
+From: "Darrick J. Wong" <darrick.wong@oracle.com>
+Date: Fri, 22 Feb 2019 22:35:32 -0800
+Subject: [PATCH] tmpfs: fix uninitialized return value in shmem_link
+Git-commit: 29b00e609960ae0fcff382f4c7079dd0874a5311
+Patch-mainline: v5.0
+References: bsc#1051510
+
+When we made the shmem_reserve_inode call in shmem_link conditional, we
+forgot to update the declaration for ret so that it always has a known
+value. Dan Carpenter pointed out this deficiency in the original patch.
+
+Fixes: 1062af920c07 ("tmpfs: fix link accounting when a tmpfile is linked in")
+Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
+Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
+Signed-off-by: Hugh Dickins <hughd@google.com>
+Cc: Matej Kupljen <matej.kupljen@gmail.com>
+Cc: Al Viro <viro@zeniv.linux.org.uk>
+Cc: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ mm/shmem.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/mm/shmem.c b/mm/shmem.c
+index 0905215fb016..2c012eee133d 100644
+--- a/mm/shmem.c
++++ b/mm/shmem.c
+@@ -2848,7 +2848,7 @@ static int shmem_create(struct inode *dir, struct dentry *dentry, umode_t mode,
+ static int shmem_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry)
+ {
+ struct inode *inode = d_inode(old_dentry);
+- int ret;
++ int ret = 0;
+
+ /*
+ * No ordinary (disk based) filesystem counts links as inodes;
+--
+2.16.4
+
diff --git a/patches.fixes/vlan-disable-SIOCSHWTSTAMP-in-container.patch b/patches.fixes/vlan-disable-SIOCSHWTSTAMP-in-container.patch
new file mode 100644
index 0000000000..5436a3754d
--- /dev/null
+++ b/patches.fixes/vlan-disable-SIOCSHWTSTAMP-in-container.patch
@@ -0,0 +1,44 @@
+From 873017af778439f2f8e3d87f28ddb1fcaf244a76 Mon Sep 17 00:00:00 2001
+From: Hangbin Liu <liuhangbin@gmail.com>
+Date: Thu, 9 May 2019 14:55:07 +0800
+Subject: [PATCH] vlan: disable SIOCSHWTSTAMP in container
+Git-commit: 873017af778439f2f8e3d87f28ddb1fcaf244a76
+Patch-mainline: v5.2-rc1
+References: bsc#1051510
+
+With NET_ADMIN enabled in container, a normal user could be mapped to
+root and is able to change the real device's rx filter via ioctl on
+vlan, which would affect the other ptp process on host. Fix it by
+disabling SIOCSHWTSTAMP in container.
+
+Fixes: a6111d3c93d0 ("vlan: Pass SIOC[SG]HWTSTAMP ioctls to real device")
+Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
+Acked-by: Richard Cochran <richardcochran@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ net/8021q/vlan_dev.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
+index f044ae56a313..2a9a60733594 100644
+--- a/net/8021q/vlan_dev.c
++++ b/net/8021q/vlan_dev.c
+@@ -370,10 +370,12 @@ static int vlan_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
+ ifrr.ifr_ifru = ifr->ifr_ifru;
+
+ switch (cmd) {
++ case SIOCSHWTSTAMP:
++ if (!net_eq(dev_net(dev), &init_net))
++ break;
+ case SIOCGMIIPHY:
+ case SIOCGMIIREG:
+ case SIOCSMIIREG:
+- case SIOCSHWTSTAMP:
+ case SIOCGHWTSTAMP:
+ if (netif_device_present(real_dev) && ops->ndo_do_ioctl)
+ err = ops->ndo_do_ioctl(real_dev, &ifrr, cmd);
+--
+2.16.4
+
diff --git a/patches.kabi/kabi-x86-microcode-hotplug-state-fix.patch b/patches.kabi/kabi-x86-microcode-hotplug-state-fix.patch
new file mode 100644
index 0000000000..e180f9a6e5
--- /dev/null
+++ b/patches.kabi/kabi-x86-microcode-hotplug-state-fix.patch
@@ -0,0 +1,40 @@
+From: Borislav Petkov <bp@suse.de>
+Date: Wed Jun 19 10:19:19 CEST 2019
+Subject: x86/microcode: Fix microcode hotplug state
+References: bsc#1114279
+Patch-mainline: never, kabi
+
+Make the new hotplug state alias to an already existing one so that KABI doesn't
+complain.
+
+Signed-off-by: Borislav Petkov <bp@suse.de>
+--
+---
+ arch/x86/kernel/cpu/microcode/core.c | 3 +++
+ include/linux/cpuhotplug.h | 3 +--
+ 2 files changed, 4 insertions(+), 2 deletions(-)
+
+--- a/arch/x86/kernel/cpu/microcode/core.c
++++ b/arch/x86/kernel/cpu/microcode/core.c
+@@ -853,6 +853,9 @@ int __init microcode_init(void)
+ goto out_ucode_group;
+
+ register_syscore_ops(&mc_syscore_ops);
++
++#define CPUHP_AP_MICROCODE_LOADER CPUHP_AP_ARM_MVEBU_COHERENCY
++
+ cpuhp_setup_state_nocalls(CPUHP_AP_MICROCODE_LOADER, "x86/microcode:online",
+ mc_cpu_online, mc_cpu_down_prep);
+
+--- a/include/linux/cpuhotplug.h
++++ b/include/linux/cpuhotplug.h
+@@ -83,8 +83,7 @@ enum cpuhp_state {
+ CPUHP_AP_IRQ_HIP04_STARTING,
+ CPUHP_AP_IRQ_ARMADA_XP_STARTING,
+ CPUHP_AP_IRQ_BCM2836_STARTING,
+- CPUHP_AP_ARM_MVEBU_COHERENCY,
+- CPUHP_AP_MICROCODE_LOADER,
++ CPUHP_AP_ARM_MVEBU_COHERENCY, /* == CPUHP_AP_MICROCODE_LOADER, for KABI */
+ CPUHP_AP_PERF_X86_AMD_UNCORE_STARTING,
+ CPUHP_AP_PERF_X86_STARTING,
+ CPUHP_AP_PERF_X86_AMD_IBS_STARTING,
diff --git a/patches.kabi/x86-topology-Add-CPUID.1F-multi-die-package-support.patch b/patches.kabi/x86-topology-Add-CPUID.1F-multi-die-package-support.patch
new file mode 100644
index 0000000000..e2cdc000d7
--- /dev/null
+++ b/patches.kabi/x86-topology-Add-CPUID.1F-multi-die-package-support.patch
@@ -0,0 +1,36 @@
+From: Jiri Slaby <jslaby@suse.cz>
+Subject: kabi: x86/topology: Add CPUID.1F multi-die/package support
+Patch-mainline: never, kabi
+References: jsc#SLE-5454
+
+This is a fix for patch:
+patches.suse/x86-topology-Add-CPUID.1F-multi-die-package-support.patch
+
+It added a member to struct cpuinfo_x86. Move it to the end along with
+other kabi fixups.
+
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ arch/x86/include/asm/processor.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/x86/include/asm/processor.h
++++ b/arch/x86/include/asm/processor.h
+@@ -128,7 +128,6 @@ struct cpuinfo_x86 {
+ u16 logical_proc_id;
+ /* Core id: */
+ u16 cpu_core_id;
+- u16 cpu_die_id;
+ u16 logical_die_id;
+ /* Index into per_cpu list: */
+ u16 cpu_index;
+@@ -140,6 +139,9 @@ struct cpuinfo_x86 {
+ */
+ u8 x86_cache_bits;
+ unsigned initialized : 1;
++#ifndef __GENKSYMS__
++ u16 cpu_die_id;
++#endif
+ };
+
+ struct cpuid_regs {
diff --git a/patches.kabi/x86-topology-Define-topology_logical_die_id.patch b/patches.kabi/x86-topology-Define-topology_logical_die_id.patch
new file mode 100644
index 0000000000..182e7574df
--- /dev/null
+++ b/patches.kabi/x86-topology-Define-topology_logical_die_id.patch
@@ -0,0 +1,34 @@
+From: Jiri Slaby <jslaby@suse.cz>
+Subject: kabi: x86/topology: Define topology_logical_die_id()
+Patch-mainline: never, kabi
+References: jsc#SLE-5454
+
+This is a fix for patch:
+patches.suse/x86-topology-Define-topology_logical_die_id.patch
+
+It added a member to struct cpuinfo_x86. Move it to the end along with
+other kabi fixups.
+
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ arch/x86/include/asm/processor.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/x86/include/asm/processor.h
++++ b/arch/x86/include/asm/processor.h
+@@ -128,7 +128,6 @@ struct cpuinfo_x86 {
+ u16 logical_proc_id;
+ /* Core id: */
+ u16 cpu_core_id;
+- u16 logical_die_id;
+ /* Index into per_cpu list: */
+ u16 cpu_index;
+ u32 microcode;
+@@ -140,6 +139,7 @@ struct cpuinfo_x86 {
+ unsigned initialized : 1;
+ #ifndef __GENKSYMS__
+ u16 cpu_die_id;
++ u16 logical_die_id;
+ #endif
+ };
+
diff --git a/patches.suse/NFS-optional-NFSv4_2-fix.patch b/patches.suse/NFS-optional-NFSv4_2-fix.patch
new file mode 100644
index 0000000000..a7c0760075
--- /dev/null
+++ b/patches.suse/NFS-optional-NFSv4_2-fix.patch
@@ -0,0 +1,30 @@
+From: NeilBrown <neilb@suse.com>
+Subject: Don't restrict NFSv4.2 on openSUSE
+Patch-mainline: Never, suse specific
+References: bsc#1138719
+
+We default the nfs.max_minor_version to 1 on some SLE kernels,
+but don't need to do that for openSUSE - Leap or Tumbleweed
+
+---
+ fs/nfs/super.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/fs/nfs/super.c
++++ b/fs/nfs/super.c
+@@ -76,11 +76,15 @@
+ #define NFS_DEFAULT_VERSION 2
+ #endif
+
++#ifdef CONFIG_SUSE_PRODUCT_SLE
+ #if CONFIG_SUSE_VERSION < 15 || (CONFIG_SUSE_VERSION == 15 && CONFIG_SUSE_PATCHLEVEL == 0)
+ static int max_minor_version = 1;
+ #else
+ static int max_minor_version = 2;
+ #endif
++#else
++static int max_minor_version = 2;
++#endif
+
+ #define NFS_MAX_CONNECTIONS 16
+
diff --git a/patches.suse/cpu-topology-Export-die_id.patch b/patches.suse/cpu-topology-Export-die_id.patch
new file mode 100644
index 0000000000..ad1c92a26b
--- /dev/null
+++ b/patches.suse/cpu-topology-Export-die_id.patch
@@ -0,0 +1,94 @@
+From: Len Brown <len.brown@intel.com>
+Date: Mon, 13 May 2019 13:58:47 -0400
+Subject: cpu/topology: Export die_id
+Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
+Git-commit: 0e344d8c709fe01d882fc0fb5452bedfe5eba67a
+Patch-mainline: Queued in subsystem maintainer repository
+References: jsc#SLE-5454
+
+Export die_id in cpu topology, for the benefit of hardware that has
+multiple-die/package.
+
+Signed-off-by: Len Brown <len.brown@intel.com>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Reviewed-by: Ingo Molnar <mingo@kernel.org>
+Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Cc: linux-doc@vger.kernel.org
+Link: https://lkml.kernel.org/r/e7d1caaf4fbd24ee40db6d557ab28d7d83298900.1557769318.git.len.brown@intel.com
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ Documentation/cputopology.txt | 15 ++++++++++++---
+ drivers/base/topology.c | 4 ++++
+ include/linux/topology.h | 3 +++
+ 3 files changed, 19 insertions(+), 3 deletions(-)
+
+--- a/Documentation/cputopology.txt
++++ b/Documentation/cputopology.txt
+@@ -8,6 +8,12 @@ to /proc/cpuinfo output of some architec
+ socket number, but the actual value is architecture and platform
+ dependent.
+
++die_id:
++
++ the CPU die ID of cpuX. Typically it is the hardware platform's
++ identifier (rather than the kernel's). The actual value is
++ architecture and platform dependent.
++
+ 2) /sys/devices/system/cpu/cpuX/topology/core_id:
+
+ the CPU core ID of cpuX. Typically it is the hardware platform's
+@@ -77,6 +83,7 @@ they reflect the cpu and cache hierarchy
+ For an architecture to support this feature, it must define some of
+ these macros in include/asm-XXX/topology.h:
+ #define topology_physical_package_id(cpu)
++#define topology_die_id(cpu)
+ #define topology_core_id(cpu)
+ #define topology_book_id(cpu)
+ #define topology_drawer_id(cpu)
+@@ -94,9 +101,11 @@ To be consistent on all architectures, i
+ provides default definitions for any of the above macros that are
+ not defined by include/asm-XXX/topology.h:
+ 1) physical_package_id: -1
+-2) core_id: 0
+-3) sibling_cpumask: just the given CPU
+-4) core_cpumask: just the given CPU
++2) die_id: -1
++3) core_id: 0
++4) sibling_cpumask: just the given CPU
++5) core_cpumask: just the given CPU
++6) die_cpumask: just the given CPU
+
+ For architectures that don't support books (CONFIG_SCHED_BOOK) there are no
+ default definitions for topology_book_id() and topology_book_cpumask().
+--- a/drivers/base/topology.c
++++ b/drivers/base/topology.c
+@@ -58,6 +58,9 @@ static ssize_t name##_list_show(struct d
+ define_id_show_func(physical_package_id);
+ static DEVICE_ATTR_RO(physical_package_id);
+
++define_id_show_func(die_id);
++static DEVICE_ATTR_RO(die_id);
++
+ define_id_show_func(core_id);
+ static DEVICE_ATTR_RO(core_id);
+
+@@ -87,6 +90,7 @@ static DEVICE_ATTR_RO(drawer_siblings_li
+
+ static struct attribute *default_attrs[] = {
+ &dev_attr_physical_package_id.attr,
++ &dev_attr_die_id.attr,
+ &dev_attr_core_id.attr,
+ &dev_attr_thread_siblings.attr,
+ &dev_attr_thread_siblings_list.attr,
+--- a/include/linux/topology.h
++++ b/include/linux/topology.h
+@@ -184,6 +184,9 @@ static inline int cpu_to_mem(int cpu)
+ #ifndef topology_physical_package_id
+ #define topology_physical_package_id(cpu) ((void)(cpu), -1)
+ #endif
++#ifndef topology_die_id
++#define topology_die_id(cpu) ((void)(cpu), -1)
++#endif
+ #ifndef topology_core_id
+ #define topology_core_id(cpu) ((void)(cpu), 0)
+ #endif
diff --git a/patches.suse/hwmon-coretemp-Cosmetic-Rename-internal-variables-to.patch b/patches.suse/hwmon-coretemp-Cosmetic-Rename-internal-variables-to.patch
new file mode 100644
index 0000000000..6ce07122c5
--- /dev/null
+++ b/patches.suse/hwmon-coretemp-Cosmetic-Rename-internal-variables-to.patch
@@ -0,0 +1,133 @@
+From: Len Brown <len.brown@intel.com>
+Date: Mon, 13 May 2019 13:59:01 -0400
+Subject: hwmon/coretemp: Cosmetic: Rename internal variables to zones from
+ packages
+Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
+Git-commit: 835896a59b9577d0bc2131e027c37bdde5b979af
+Patch-mainline: Queued in subsystem maintainer repository
+References: jsc#SLE-5454
+
+Syntax update only -- no logical or functional change.
+
+In response to the new multi-die/package changes, update variable names to
+use the more generic thermal "zone" terminology, instead of "package", as
+the zones can refer to either packages or die.
+
+Signed-off-by: Len Brown <len.brown@intel.com>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Reviewed-by: Ingo Molnar <mingo@kernel.org>
+Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Cc: Zhang Rui <rui.zhang@intel.com>
+Link: https://lkml.kernel.org/r/facecfd3525d55c2051f63a7ec709aeb03cc1dc1.1557769318.git.len.brown@intel.com
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ drivers/hwmon/coretemp.c | 36 ++++++++++++++++++------------------
+ 1 file changed, 18 insertions(+), 18 deletions(-)
+
+--- a/drivers/hwmon/coretemp.c
++++ b/drivers/hwmon/coretemp.c
+@@ -109,10 +109,10 @@ struct platform_data {
+ struct device_attribute name_attr;
+ };
+
+-/* Keep track of how many package pointers we allocated in init() */
+-static int max_packages __read_mostly;
+-/* Array of package pointers. Serialized by cpu hotplug lock */
+-static struct platform_device **pkg_devices;
++/* Keep track of how many zone pointers we allocated in init() */
++static int max_zones __read_mostly;
++/* Array of zone pointers. Serialized by cpu hotplug lock */
++static struct platform_device **zone_devices;
+
+ static ssize_t show_label(struct device *dev,
+ struct device_attribute *devattr, char *buf)
+@@ -434,10 +434,10 @@ static int chk_ucode_version(unsigned in
+
+ static struct platform_device *coretemp_get_pdev(unsigned int cpu)
+ {
+- int pkgid = topology_logical_die_id(cpu);
++ int id = topology_logical_die_id(cpu);
+
+- if (pkgid >= 0 && pkgid < max_packages)
+- return pkg_devices[pkgid];
++ if (id >= 0 && id < max_zones)
++ return zone_devices[id];
+ return NULL;
+ }
+
+@@ -543,7 +543,7 @@ static int coretemp_probe(struct platfor
+ struct device *dev = &pdev->dev;
+ struct platform_data *pdata;
+
+- /* Initialize the per-package data structures */
++ /* Initialize the per-zone data structures */
+ pdata = devm_kzalloc(dev, sizeof(struct platform_data), GFP_KERNEL);
+ if (!pdata)
+ return -ENOMEM;
+@@ -578,13 +578,13 @@ static struct platform_driver coretemp_d
+
+ static struct platform_device *coretemp_device_add(unsigned int cpu)
+ {
+- int err, pkgid = topology_logical_die_id(cpu);
++ int err, zoneid = topology_logical_die_id(cpu);
+ struct platform_device *pdev;
+
+- if (pkgid < 0)
++ if (zoneid < 0)
+ return ERR_PTR(-ENOMEM);
+
+- pdev = platform_device_alloc(DRVNAME, pkgid);
++ pdev = platform_device_alloc(DRVNAME, zoneid);
+ if (!pdev)
+ return ERR_PTR(-ENOMEM);
+
+@@ -594,7 +594,7 @@ static struct platform_device *coretemp_
+ return ERR_PTR(err);
+ }
+
+- pkg_devices[pkgid] = pdev;
++ zone_devices[zoneid] = pdev;
+ return pdev;
+ }
+
+@@ -702,7 +702,7 @@ static int coretemp_cpu_offline(unsigned
+ * the rest.
+ */
+ if (cpumask_empty(&pd->cpumask)) {
+- pkg_devices[topology_logical_die_id(cpu)] = NULL;
++ zone_devices[topology_logical_die_id(cpu)] = NULL;
+ platform_device_unregister(pdev);
+ return 0;
+ }
+@@ -740,10 +740,10 @@ static int __init coretemp_init(void)
+ if (!x86_match_cpu(coretemp_ids))
+ return -ENODEV;
+
+- max_packages = topology_max_packages() * topology_max_die_per_package();
+- pkg_devices = kzalloc(max_packages * sizeof(struct platform_device *),
++ max_zones = topology_max_packages() * topology_max_die_per_package();
++ zone_devices = kcalloc(max_zones, sizeof(struct platform_device *),
+ GFP_KERNEL);
+- if (!pkg_devices)
++ if (!zone_devices)
+ return -ENOMEM;
+
+ err = platform_driver_register(&coretemp_driver);
+@@ -759,7 +759,7 @@ static int __init coretemp_init(void)
+
+ outdrv:
+ platform_driver_unregister(&coretemp_driver);
+- kfree(pkg_devices);
++ kfree(zone_devices);
+ return err;
+ }
+ module_init(coretemp_init)
+@@ -768,7 +768,7 @@ static void __exit coretemp_exit(void)
+ {
+ cpuhp_remove_state(coretemp_hp_online);
+ platform_driver_unregister(&coretemp_driver);
+- kfree(pkg_devices);
++ kfree(zone_devices);
+ }
+ module_exit(coretemp_exit)
+
diff --git a/patches.suse/hwmon-coretemp-Support-multi-die-package.patch b/patches.suse/hwmon-coretemp-Support-multi-die-package.patch
new file mode 100644
index 0000000000..15882a891d
--- /dev/null
+++ b/patches.suse/hwmon-coretemp-Support-multi-die-package.patch
@@ -0,0 +1,65 @@
+From: Zhang Rui <rui.zhang@intel.com>
+Date: Mon, 13 May 2019 13:58:54 -0400
+Subject: hwmon/coretemp: Support multi-die/package
+Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
+Git-commit: cfcd82e632882372db960b50782a439a8ba56c09
+Patch-mainline: Queued in subsystem maintainer repository
+References: jsc#SLE-5454
+
+Package temperature sensors are actually implemented in hardware per-die.
+
+Update coretemp to be "die-aware", so it can expose mulitple sensors per
+package, instead of just one. No change to single-die/package systems.
+
+Signed-off-by: Zhang Rui <rui.zhang@intel.com>
+Signed-off-by: Len Brown <len.brown@intel.com>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Reviewed-by: Ingo Molnar <mingo@kernel.org>
+Acked-by: Guenter Roeck <linux@roeck-us.net>
+Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Cc: linux-pm@vger.kernel.org
+Cc: linux-hwmon@vger.kernel.org
+Link: https://lkml.kernel.org/r/ec2868f35113a01ff72d9041e0b97fc6a1c7df84.1557769318.git.len.brown@intel.com
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ drivers/hwmon/coretemp.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/drivers/hwmon/coretemp.c
++++ b/drivers/hwmon/coretemp.c
+@@ -434,7 +434,7 @@ static int chk_ucode_version(unsigned in
+
+ static struct platform_device *coretemp_get_pdev(unsigned int cpu)
+ {
+- int pkgid = topology_logical_package_id(cpu);
++ int pkgid = topology_logical_die_id(cpu);
+
+ if (pkgid >= 0 && pkgid < max_packages)
+ return pkg_devices[pkgid];
+@@ -578,7 +578,7 @@ static struct platform_driver coretemp_d
+
+ static struct platform_device *coretemp_device_add(unsigned int cpu)
+ {
+- int err, pkgid = topology_logical_package_id(cpu);
++ int err, pkgid = topology_logical_die_id(cpu);
+ struct platform_device *pdev;
+
+ if (pkgid < 0)
+@@ -702,7 +702,7 @@ static int coretemp_cpu_offline(unsigned
+ * the rest.
+ */
+ if (cpumask_empty(&pd->cpumask)) {
+- pkg_devices[topology_logical_package_id(cpu)] = NULL;
++ pkg_devices[topology_logical_die_id(cpu)] = NULL;
+ platform_device_unregister(pdev);
+ return 0;
+ }
+@@ -740,7 +740,7 @@ static int __init coretemp_init(void)
+ if (!x86_match_cpu(coretemp_ids))
+ return -ENODEV;
+
+- max_packages = topology_max_packages();
++ max_packages = topology_max_packages() * topology_max_die_per_package();
+ pkg_devices = kzalloc(max_packages * sizeof(struct platform_device *),
+ GFP_KERNEL);
+ if (!pkg_devices)
diff --git a/patches.suse/ibmveth-Update-ethtool-settings-to-reflect-virtual-p.patch b/patches.suse/ibmveth-Update-ethtool-settings-to-reflect-virtual-p.patch
new file mode 100644
index 0000000000..6327bb002a
--- /dev/null
+++ b/patches.suse/ibmveth-Update-ethtool-settings-to-reflect-virtual-p.patch
@@ -0,0 +1,162 @@
+From 3417314b96d0a872057942f928e08a35460f0153 Mon Sep 17 00:00:00 2001
+From: Thomas Falcon <tlfalcon@linux.ibm.com>
+Date: Fri, 3 May 2019 09:28:33 -0500
+Subject: [PATCH net-next] ibmveth: Update ethtool settings to reflect virtual
+ properties
+
+References: bsc#1136157, LTC#177197
+Patch-mainline: no, tbd
+
+As a paravirtual ethernet adapter, the current hardcoded ethtool
+link settings no longer reflect the actual capable speed of the
+interface. There is no way for the virtual adapter to determine
+the true speed, duplex, and other backing hardware specifications
+at this time.
+
+To avoid confusion, initially define them as unknown or other.
+Finally allow the user to alter speed and duplex settings to match
+the capabilities of underlying hardware and to allow some features
+that rely on certain ethtool reporting, such as LACP. This is based
+on the implementation in virtio_net.
+
+Signed-off-by: Thomas Falcon <tlfalcon@linux.ibm.com>
+Acked-by: Michal Suchanek <msuchanek@suse.de>
+---
+ drivers/net/ethernet/ibm/ibmveth.c | 83 ++++++++++++++++++++++++++++----------
+ drivers/net/ethernet/ibm/ibmveth.h | 3 ++
+ 2 files changed, 64 insertions(+), 22 deletions(-)
+
+diff --git a/drivers/net/ethernet/ibm/ibmveth.c b/drivers/net/ethernet/ibm/ibmveth.c
+index d654c234aaf7..77af9c2c0571 100644
+--- a/drivers/net/ethernet/ibm/ibmveth.c
++++ b/drivers/net/ethernet/ibm/ibmveth.c
+@@ -712,31 +712,68 @@ static int ibmveth_close(struct net_device *netdev)
+ return 0;
+ }
+
+-static int netdev_get_link_ksettings(struct net_device *dev,
+- struct ethtool_link_ksettings *cmd)
++static bool
++ibmveth_validate_ethtool_cmd(const struct ethtool_link_ksettings *cmd)
+ {
+- u32 supported, advertising;
+-
+- supported = (SUPPORTED_1000baseT_Full | SUPPORTED_Autoneg |
+- SUPPORTED_FIBRE);
+- advertising = (ADVERTISED_1000baseT_Full | ADVERTISED_Autoneg |
+- ADVERTISED_FIBRE);
+- cmd->base.speed = SPEED_1000;
+- cmd->base.duplex = DUPLEX_FULL;
+- cmd->base.port = PORT_FIBRE;
+- cmd->base.phy_address = 0;
+- cmd->base.autoneg = AUTONEG_ENABLE;
+-
+- ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.supported,
+- supported);
+- ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.advertising,
+- advertising);
++ struct ethtool_link_ksettings diff1 = *cmd;
++ struct ethtool_link_ksettings diff2 = {};
++
++ diff2.base.port = PORT_OTHER;
++ diff1.base.speed = 0;
++ diff1.base.duplex = 0;
++ diff1.base.cmd = 0;
++ diff1.base.link_mode_masks_nwords = 0;
++ ethtool_link_ksettings_zero_link_mode(&diff1, advertising);
++
++ return !memcmp(&diff1.base, &diff2.base, sizeof(diff1.base)) &&
++ bitmap_empty(diff1.link_modes.supported,
++ __ETHTOOL_LINK_MODE_MASK_NBITS) &&
++ bitmap_empty(diff1.link_modes.advertising,
++ __ETHTOOL_LINK_MODE_MASK_NBITS) &&
++ bitmap_empty(diff1.link_modes.lp_advertising,
++ __ETHTOOL_LINK_MODE_MASK_NBITS);
++}
++
++static int ibmveth_set_link_ksettings(struct net_device *dev,
++ const struct ethtool_link_ksettings *cmd)
++{
++ struct ibmveth_adapter *adapter = netdev_priv(dev);
++ u32 speed;
++ u8 duplex;
++
++ speed = cmd->base.speed;
++ duplex = cmd->base.duplex;
++ /* don't allow custom speed and duplex */
++ if (!ethtool_validate_speed(speed) ||
++ !ethtool_validate_duplex(duplex) ||
++ !ibmveth_validate_ethtool_cmd(cmd))
++ return -EINVAL;
++ adapter->speed = speed;
++ adapter->duplex = duplex;
+
+ return 0;
+ }
+
+-static void netdev_get_drvinfo(struct net_device *dev,
+- struct ethtool_drvinfo *info)
++static int ibmveth_get_link_ksettings(struct net_device *dev,
++ struct ethtool_link_ksettings *cmd)
++{
++ struct ibmveth_adapter *adapter = netdev_priv(dev);
++
++ cmd->base.speed = adapter->speed;
++ cmd->base.duplex = adapter->duplex;
++ cmd->base.port = PORT_OTHER;
++
++ return 0;
++}
++
++static void ibmveth_init_link_settings(struct ibmveth_adapter *adapter)
++{
++ adapter->duplex = DUPLEX_UNKNOWN;
++ adapter->speed = SPEED_UNKNOWN;
++}
++
++static void ibmveth_get_drvinfo(struct net_device *dev,
++ struct ethtool_drvinfo *info)
+ {
+ strlcpy(info->driver, ibmveth_driver_name, sizeof(info->driver));
+ strlcpy(info->version, ibmveth_driver_version, sizeof(info->version));
+@@ -965,12 +1002,13 @@ static void ibmveth_get_ethtool_stats(struct net_device *dev,
+ }
+
+ static const struct ethtool_ops netdev_ethtool_ops = {
+- .get_drvinfo = netdev_get_drvinfo,
++ .get_drvinfo = ibmveth_get_drvinfo,
+ .get_link = ethtool_op_get_link,
+ .get_strings = ibmveth_get_strings,
+ .get_sset_count = ibmveth_get_sset_count,
+ .get_ethtool_stats = ibmveth_get_ethtool_stats,
+- .get_link_ksettings = netdev_get_link_ksettings,
++ .get_link_ksettings = ibmveth_get_link_ksettings,
++ .set_link_ksettings = ibmveth_set_link_ksettings
+ };
+
+ static int ibmveth_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
+@@ -1647,6 +1685,7 @@ static int ibmveth_probe(struct vio_dev *dev, const struct vio_device_id *id)
+ adapter->netdev = netdev;
+ adapter->mcastFilterSize = *mcastFilterSize_p;
+ adapter->pool_config = 0;
++ ibmveth_init_link_settings(adapter);
+
+ netif_napi_add(netdev, &adapter->napi, ibmveth_poll, 16);
+
+diff --git a/drivers/net/ethernet/ibm/ibmveth.h b/drivers/net/ethernet/ibm/ibmveth.h
+index 4e9bf3421f4f..db96c8812d18 100644
+--- a/drivers/net/ethernet/ibm/ibmveth.h
++++ b/drivers/net/ethernet/ibm/ibmveth.h
+@@ -162,6 +162,9 @@ struct ibmveth_adapter {
+ u64 tx_send_failed;
+ u64 tx_large_packets;
+ u64 rx_large_packets;
++ /* Ethtool settings */
++ u8 duplex;
++ u32 speed;
+ };
+
+ /*
+--
+2.12.3
+
diff --git a/patches.suse/module-fix-livepatch-ftrace-module-text-permissions-race.patch b/patches.suse/module-fix-livepatch-ftrace-module-text-permissions-race.patch
new file mode 100644
index 0000000000..66088c57bc
--- /dev/null
+++ b/patches.suse/module-fix-livepatch-ftrace-module-text-permissions-race.patch
@@ -0,0 +1,170 @@
+From: Josh Poimboeuf <jpoimboe@redhat.com>
+Date: Thu, 13 Jun 2019 20:07:22 -0500
+Subject: module: Fix livepatch/ftrace module text permissions race
+Git-commit: 9f255b632bf12c4dd7fc31caee89aa991ef75176
+Patch-mainline: v5.2-rc5
+References: bsc#1071995 fate#323487
+
+It's possible for livepatch and ftrace to be toggling a module's text
+permissions at the same time, resulting in the following panic:
+
+ BUG: unable to handle page fault for address: ffffffffc005b1d9
+ #PF: supervisor write access in kernel mode
+ #PF: error_code(0x0003) - permissions violation
+ PGD 3ea0c067 P4D 3ea0c067 PUD 3ea0e067 PMD 3cc13067 PTE 3b8a1061
+ Oops: 0003 [#1] PREEMPT SMP PTI
+ CPU: 1 PID: 453 Comm: insmod Tainted: G O K 5.2.0-rc1-a188339ca5 #1
+ Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-20181126_142135-anatol 04/01/2014
+ RIP: 0010:apply_relocate_add+0xbe/0x14c
+ Code: fa 0b 74 21 48 83 fa 18 74 38 48 83 fa 0a 75 40 eb 08 48 83 38 00 74 33 eb 53 83 38 00 75 4e 89 08 89 c8 eb 0a 83 38 00 75 43 <89> 08 48 63 c1 48 39 c8 74 2e eb 48 83 38 00 75 32 48 29 c1 89 08
+ RSP: 0018:ffffb223c00dbb10 EFLAGS: 00010246
+ RAX: ffffffffc005b1d9 RBX: 0000000000000000 RCX: ffffffff8b200060
+ RDX: 000000000000000b RSI: 0000004b0000000b RDI: ffff96bdfcd33000
+ RBP: ffffb223c00dbb38 R08: ffffffffc005d040 R09: ffffffffc005c1f0
+ R10: ffff96bdfcd33c40 R11: ffff96bdfcd33b80 R12: 0000000000000018
+ R13: ffffffffc005c1f0 R14: ffffffffc005e708 R15: ffffffff8b2fbc74
+ FS: 00007f5f447beba8(0000) GS:ffff96bdff900000(0000) knlGS:0000000000000000
+ CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
+ CR2: ffffffffc005b1d9 CR3: 000000003cedc002 CR4: 0000000000360ea0
+ DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
+ DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
+ Call Trace:
+ klp_init_object_loaded+0x10f/0x219
+ ? preempt_latency_start+0x21/0x57
+ klp_enable_patch+0x662/0x809
+ ? virt_to_head_page+0x3a/0x3c
+ ? kfree+0x8c/0x126
+ patch_init+0x2ed/0x1000 [livepatch_test02]
+ ? 0xffffffffc0060000
+ do_one_initcall+0x9f/0x1c5
+ ? kmem_cache_alloc_trace+0xc4/0xd4
+ ? do_init_module+0x27/0x210
+ do_init_module+0x5f/0x210
+ load_module+0x1c41/0x2290
+ ? fsnotify_path+0x3b/0x42
+ ? strstarts+0x2b/0x2b
+ ? kernel_read+0x58/0x65
+ __do_sys_finit_module+0x9f/0xc3
+ ? __do_sys_finit_module+0x9f/0xc3
+ __x64_sys_finit_module+0x1a/0x1c
+ do_syscall_64+0x52/0x61
+ entry_SYSCALL_64_after_hwframe+0x44/0xa9
+
+The above panic occurs when loading two modules at the same time with
+ftrace enabled, where at least one of the modules is a livepatch module:
+
+CPU0 CPU1
+klp_enable_patch()
+ klp_init_object_loaded()
+ module_disable_ro()
+ ftrace_module_enable()
+ ftrace_arch_code_modify_post_process()
+ set_all_modules_text_ro()
+ klp_write_object_relocations()
+ apply_relocate_add()
+ *patches read-only code* - BOOM
+
+A similar race exists when toggling ftrace while loading a livepatch
+module.
+
+Fix it by ensuring that the livepatch and ftrace code patching
+operations -- and their respective permissions changes -- are protected
+by the text_mutex.
+
+Link: http://lkml.kernel.org/r/ab43d56ab909469ac5d2520c5d944ad6d4abd476.1560474114.git.jpoimboe@redhat.com
+
+Reported-by: Johannes Erdfelt <johannes@erdfelt.com>
+Fixes: 444d13ff10fb ("modules: add ro_after_init support")
+Acked-by: Jessica Yu <jeyu@kernel.org>
+Reviewed-by: Petr Mladek <pmladek@suse.com>
+Reviewed-by: Miroslav Benes <mbenes@suse.cz>
+Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
+Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
+Acked-by: Miroslav Benes <mbenes@suse.cz>
+---
+ kernel/livepatch/core.c | 6 ++++++
+ kernel/trace/ftrace.c | 10 +++++++++-
+ 2 files changed, 15 insertions(+), 1 deletion(-)
+
+--- a/kernel/livepatch/core.c
++++ b/kernel/livepatch/core.c
+@@ -30,6 +30,7 @@
+ #include <linux/elf.h>
+ #include <linux/moduleloader.h>
+ #include <linux/completion.h>
++#include <linux/memory.h>
+ #include <asm/cacheflush.h>
+ #include "core.h"
+ #include "patch.h"
+@@ -729,16 +730,21 @@ static int klp_init_object_loaded(struct
+ struct klp_func *func;
+ int ret;
+
++ mutex_lock(&text_mutex);
++
+ module_disable_ro(patch->mod);
+ ret = klp_write_object_relocations(patch->mod, obj);
+ if (ret) {
+ module_enable_ro(patch->mod, true);
++ mutex_unlock(&text_mutex);
+ return ret;
+ }
+
+ arch_klp_init_object_loaded(patch, obj);
+ module_enable_ro(patch->mod, true);
+
++ mutex_unlock(&text_mutex);
++
+ klp_for_each_func(obj, func) {
+ ret = klp_find_object_symbol(obj->name, func->old_name,
+ func->old_sympos,
+--- a/kernel/trace/ftrace.c
++++ b/kernel/trace/ftrace.c
+@@ -33,6 +33,7 @@
+ #include <linux/list.h>
+ #include <linux/hash.h>
+ #include <linux/rcupdate.h>
++#include <linux/memory.h>
+
+ #include <trace/events/sched.h>
+
+@@ -2629,10 +2630,12 @@ static void ftrace_run_update_code(int c
+ {
+ int ret;
+
++ mutex_lock(&text_mutex);
++
+ ret = ftrace_arch_code_modify_prepare();
+ FTRACE_WARN_ON(ret);
+ if (ret)
+- return;
++ goto out_unlock;
+
+ /*
+ * By default we use stop_machine() to modify the code.
+@@ -2644,6 +2647,9 @@ static void ftrace_run_update_code(int c
+
+ ret = ftrace_arch_code_modify_post_process();
+ FTRACE_WARN_ON(ret);
++
++out_unlock:
++ mutex_unlock(&text_mutex);
+ }
+
+ static void ftrace_run_modify_code(struct ftrace_ops *ops, int command,
+@@ -5409,6 +5415,7 @@ void ftrace_module_enable(struct module
+ struct ftrace_page *pg;
+
+ mutex_lock(&ftrace_lock);
++ mutex_lock(&text_mutex);
+
+ if (ftrace_disabled)
+ goto out_unlock;
+@@ -5469,6 +5476,7 @@ void ftrace_module_enable(struct module
+ ftrace_arch_code_modify_post_process();
+
+ out_unlock:
++ mutex_unlock(&text_mutex);
+ mutex_unlock(&ftrace_lock);
+ }
+
diff --git a/patches.suse/perf-x86-intel-cstate-Support-multi-die-package.patch b/patches.suse/perf-x86-intel-cstate-Support-multi-die-package.patch
new file mode 100644
index 0000000000..f6e2c811cb
--- /dev/null
+++ b/patches.suse/perf-x86-intel-cstate-Support-multi-die-package.patch
@@ -0,0 +1,73 @@
+From: Kan Liang <kan.liang@linux.intel.com>
+Date: Mon, 13 May 2019 13:58:59 -0400
+Subject: perf/x86/intel/cstate: Support multi-die/package
+Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
+Git-commit: cb63ba0f670df1f0ddf21c6cc4bbe74db398742c
+Patch-mainline: Queued in subsystem maintainer repository
+References: jsc#SLE-5454
+
+Some cstate counters become die-scoped on Xeon Cascade Lake-AP. Perf cstate
+driver needs to support die-scope cstate counters.
+
+Use topology_die_cpumask() to replace topology_core_cpumask(). For
+previous platforms which doesn't have multi-die, topology_die_cpumask() is
+identical as topology_core_cpumask(). There is no functional change for
+previous platforms.
+
+Name the die-scope PMU "cstate_die".
+
+Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
+Signed-off-by: Len Brown <len.brown@intel.com>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Reviewed-by: Ingo Molnar <mingo@kernel.org>
+Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Link: https://lkml.kernel.org/r/acb5e483287280eeb2b6daabe04a600b85e72a78.1557769318.git.len.brown@intel.com
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ arch/x86/events/intel/cstate.c | 14 ++++++++++----
+ 1 file changed, 10 insertions(+), 4 deletions(-)
+
+--- a/arch/x86/events/intel/cstate.c
++++ b/arch/x86/events/intel/cstate.c
+@@ -306,7 +306,7 @@ static int cstate_pmu_event_init(struct
+ return -EINVAL;
+ event->hw.event_base = pkg_msr[cfg].msr;
+ cpu = cpumask_any_and(&cstate_pkg_cpu_mask,
+- topology_core_cpumask(event->cpu));
++ topology_die_cpumask(event->cpu));
+ } else {
+ return -ENOENT;
+ }
+@@ -389,7 +389,7 @@ static int cstate_cpu_exit(unsigned int
+ if (has_cstate_pkg &&
+ cpumask_test_and_clear_cpu(cpu, &cstate_pkg_cpu_mask)) {
+
+- target = cpumask_any_but(topology_core_cpumask(cpu), cpu);
++ target = cpumask_any_but(topology_die_cpumask(cpu), cpu);
+ /* Migrate events if there is a valid target */
+ if (target < nr_cpu_ids) {
+ cpumask_set_cpu(target, &cstate_pkg_cpu_mask);
+@@ -418,7 +418,7 @@ static int cstate_cpu_init(unsigned int
+ * in the package cpu mask as the designated reader.
+ */
+ target = cpumask_any_and(&cstate_pkg_cpu_mask,
+- topology_core_cpumask(cpu));
++ topology_die_cpumask(cpu));
+ if (has_cstate_pkg && target >= nr_cpu_ids)
+ cpumask_set_cpu(cpu, &cstate_pkg_cpu_mask);
+
+@@ -631,7 +631,13 @@ static int __init cstate_init(void)
+ }
+
+ if (has_cstate_pkg) {
+- err = perf_pmu_register(&cstate_pkg_pmu, cstate_pkg_pmu.name, -1);
++ if (topology_max_die_per_package() > 1) {
++ err = perf_pmu_register(&cstate_pkg_pmu,
++ "cstate_die", -1);
++ } else {
++ err = perf_pmu_register(&cstate_pkg_pmu,
++ cstate_pkg_pmu.name, -1);
++ }
+ if (err) {
+ has_cstate_pkg = false;
+ pr_info("Failed to register cstate pkg pmu\n");
diff --git a/patches.suse/perf-x86-intel-rapl-Cosmetic-rename-internal-variabl.patch b/patches.suse/perf-x86-intel-rapl-Cosmetic-rename-internal-variabl.patch
new file mode 100644
index 0000000000..5cc98f2cbe
--- /dev/null
+++ b/patches.suse/perf-x86-intel-rapl-Cosmetic-rename-internal-variabl.patch
@@ -0,0 +1,82 @@
+From: Kan Liang <kan.liang@linux.intel.com>
+Date: Mon, 13 May 2019 13:59:03 -0400
+Subject: perf/x86/intel/rapl: Cosmetic rename internal variables in response
+ to multi-die/pkg support
+Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
+Git-commit: eb876fbc248e6eb4773a5bc80d205ff7262b1bb5
+Patch-mainline: Queued in subsystem maintainer repository
+References: jsc#SLE-5454
+
+Syntax update only -- no logical or functional change.
+
+In response to the new multi-die/package changes, update variable names to
+use "die" terminology, instead of "pkg".
+
+For previous platforms which doesn't have multi-die, "die" is identical as
+"pkg".
+
+Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
+Signed-off-by: Len Brown <len.brown@intel.com>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Reviewed-by: Ingo Molnar <mingo@kernel.org>
+Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Link: https://lkml.kernel.org/r/0ddb97e121397d37933233da303556141814fa47.1557769318.git.len.brown@intel.com
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ arch/x86/events/intel/rapl.c | 14 +++++++-------
+ 1 file changed, 7 insertions(+), 7 deletions(-)
+
+--- a/arch/x86/events/intel/rapl.c
++++ b/arch/x86/events/intel/rapl.c
+@@ -148,7 +148,7 @@ struct rapl_pmu {
+
+ struct rapl_pmus {
+ struct pmu pmu;
+- unsigned int maxpkg;
++ unsigned int maxdie;
+ struct rapl_pmu *pmus[];
+ };
+
+@@ -161,13 +161,13 @@ static u64 rapl_timer_ms;
+
+ static inline struct rapl_pmu *cpu_to_rapl_pmu(unsigned int cpu)
+ {
+- unsigned int pkgid = topology_logical_die_id(cpu);
++ unsigned int dieid = topology_logical_die_id(cpu);
+
+ /*
+ * The unsigned check also catches the '-1' return value for non
+ * existent mappings in the topology map.
+ */
+- return pkgid < rapl_pmus->maxpkg ? rapl_pmus->pmus[pkgid] : NULL;
++ return dieid < rapl_pmus->maxdie ? rapl_pmus->pmus[dieid] : NULL;
+ }
+
+ static inline u64 rapl_read_counter(struct perf_event *event)
+@@ -674,22 +674,22 @@ static void cleanup_rapl_pmus(void)
+ {
+ int i;
+
+- for (i = 0; i < rapl_pmus->maxpkg; i++)
++ for (i = 0; i < rapl_pmus->maxdie; i++)
+ kfree(rapl_pmus->pmus[i]);
+ kfree(rapl_pmus);
+ }
+
+ static int __init init_rapl_pmus(void)
+ {
+- int maxpkg = topology_max_packages() * topology_max_die_per_package();
++ int maxdie = topology_max_packages() * topology_max_die_per_package();
+ size_t size;
+
+- size = sizeof(*rapl_pmus) + maxpkg * sizeof(struct rapl_pmu *);
++ size = sizeof(*rapl_pmus) + maxdie * sizeof(struct rapl_pmu *);
+ rapl_pmus = kzalloc(size, GFP_KERNEL);
+ if (!rapl_pmus)
+ return -ENOMEM;
+
+- rapl_pmus->maxpkg = maxpkg;
++ rapl_pmus->maxdie = maxdie;
+ rapl_pmus->pmu.attr_groups = rapl_attr_groups;
+ rapl_pmus->pmu.task_ctx_nr = perf_invalid_context;
+ rapl_pmus->pmu.event_init = rapl_pmu_event_init;
diff --git a/patches.suse/perf-x86-intel-rapl-Support-multi-die-package.patch b/patches.suse/perf-x86-intel-rapl-Support-multi-die-package.patch
new file mode 100644
index 0000000000..08ad428cea
--- /dev/null
+++ b/patches.suse/perf-x86-intel-rapl-Support-multi-die-package.patch
@@ -0,0 +1,78 @@
+From: Kan Liang <kan.liang@linux.intel.com>
+Date: Mon, 13 May 2019 13:58:58 -0400
+Subject: perf/x86/intel/rapl: Support multi-die/package
+Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
+Git-commit: b10b3efb88e7bba12f09f71740bab9b7225631c9
+Patch-mainline: Queued in subsystem maintainer repository
+References: jsc#SLE-5454
+
+RAPL becomes die-scope on Xeon Cascade Lake-AP. Perf RAPL driver needs to
+support die-scope RAPL domain.
+
+Use topology_logical_die_id() to replace topology_logical_package_id().
+For previous platforms which doesn't have multi-die,
+topology_logical_die_id() is identical as topology_logical_package_id().
+
+Use topology_die_cpumask() to replace topology_core_cpumask(). For
+previous platforms which doesn't have multi-die, topology_die_cpumask() is
+identical as topology_core_cpumask().
+
+There is no functional change for previous platforms.
+
+Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
+Signed-off-by: Len Brown <len.brown@intel.com>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Reviewed-by: Ingo Molnar <mingo@kernel.org>
+Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Link: https://lkml.kernel.org/r/851320c8c87ba7a54e58ee8579c1bf566ce23cbb.1557769318.git.len.brown@intel.com
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ arch/x86/events/intel/rapl.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+--- a/arch/x86/events/intel/rapl.c
++++ b/arch/x86/events/intel/rapl.c
+@@ -161,7 +161,7 @@ static u64 rapl_timer_ms;
+
+ static inline struct rapl_pmu *cpu_to_rapl_pmu(unsigned int cpu)
+ {
+- unsigned int pkgid = topology_logical_package_id(cpu);
++ unsigned int pkgid = topology_logical_die_id(cpu);
+
+ /*
+ * The unsigned check also catches the '-1' return value for non
+@@ -577,7 +577,7 @@ static int rapl_cpu_offline(unsigned int
+
+ pmu->cpu = -1;
+ /* Find a new cpu to collect rapl events */
+- target = cpumask_any_but(topology_core_cpumask(cpu), cpu);
++ target = cpumask_any_but(topology_die_cpumask(cpu), cpu);
+
+ /* Migrate rapl events to the new target */
+ if (target < nr_cpu_ids) {
+@@ -604,14 +604,14 @@ static int rapl_cpu_online(unsigned int
+ pmu->timer_interval = ms_to_ktime(rapl_timer_ms);
+ rapl_hrtimer_init(pmu);
+
+- rapl_pmus->pmus[topology_logical_package_id(cpu)] = pmu;
++ rapl_pmus->pmus[topology_logical_die_id(cpu)] = pmu;
+ }
+
+ /*
+ * Check if there is an online cpu in the package which collects rapl
+ * events already.
+ */
+- target = cpumask_any_and(&rapl_cpu_mask, topology_core_cpumask(cpu));
++ target = cpumask_any_and(&rapl_cpu_mask, topology_die_cpumask(cpu));
+ if (target < nr_cpu_ids)
+ return 0;
+
+@@ -681,7 +681,7 @@ static void cleanup_rapl_pmus(void)
+
+ static int __init init_rapl_pmus(void)
+ {
+- int maxpkg = topology_max_packages();
++ int maxpkg = topology_max_packages() * topology_max_die_per_package();
+ size_t size;
+
+ size = sizeof(*rapl_pmus) + maxpkg * sizeof(struct rapl_pmu *);
diff --git a/patches.suse/perf-x86-intel-uncore-Cosmetic-renames-in-response-t.patch b/patches.suse/perf-x86-intel-uncore-Cosmetic-renames-in-response-t.patch
new file mode 100644
index 0000000000..8f661739f6
--- /dev/null
+++ b/patches.suse/perf-x86-intel-uncore-Cosmetic-renames-in-response-t.patch
@@ -0,0 +1,326 @@
+From: Kan Liang <kan.liang@linux.intel.com>
+Date: Mon, 13 May 2019 13:59:02 -0400
+Subject: perf/x86/intel/uncore: Cosmetic renames in response to multi-die/pkg
+ support
+Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
+Git-commit: b0529b9cafacfd054837ea6b8c4ef7b402716744
+Patch-mainline: Queued in subsystem maintainer repository
+References: jsc#SLE-5454
+
+Syntax update only -- no logical or functional change.
+
+In response to the new multi-die/package changes, update variable names to
+use "die" terminology, instead of "pkg".
+
+For previous platforms which doesn't have multi-die, "die" is identical as
+"pkg".
+
+Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
+Signed-off-by: Len Brown <len.brown@intel.com>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Reviewed-by: Ingo Molnar <mingo@kernel.org>
+Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Link: https://lkml.kernel.org/r/f0ea5e501288329135e94f51969ff54a03c50e2e.1557769318.git.len.brown@intel.com
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ arch/x86/events/intel/uncore.c | 74 +++++++++++++++++------------------
+ arch/x86/events/intel/uncore.h | 4 -
+ arch/x86/events/intel/uncore_snbep.c | 4 -
+ 3 files changed, 41 insertions(+), 41 deletions(-)
+
+--- a/arch/x86/events/intel/uncore.c
++++ b/arch/x86/events/intel/uncore.c
+@@ -14,7 +14,7 @@ struct pci_driver *uncore_pci_driver;
+ DEFINE_RAW_SPINLOCK(pci2phy_map_lock);
+ struct list_head pci2phy_map_head = LIST_HEAD_INIT(pci2phy_map_head);
+ struct pci_extra_dev *uncore_extra_pci_dev;
+-static int max_packages;
++static int max_dies;
+
+ /* mask of cpus that collect uncore events */
+ static cpumask_t uncore_cpu_mask;
+@@ -100,13 +100,13 @@ ssize_t uncore_event_show(struct kobject
+
+ struct intel_uncore_box *uncore_pmu_to_box(struct intel_uncore_pmu *pmu, int cpu)
+ {
+- unsigned int pkgid = topology_logical_die_id(cpu);
++ unsigned int dieid = topology_logical_die_id(cpu);
+
+ /*
+ * The unsigned check also catches the '-1' return value for non
+ * existent mappings in the topology map.
+ */
+- return pkgid < max_packages ? pmu->boxes[pkgid] : NULL;
++ return dieid < max_dies ? pmu->boxes[dieid] : NULL;
+ }
+
+ u64 uncore_msr_read_counter(struct intel_uncore_box *box, struct perf_event *event)
+@@ -311,7 +311,7 @@ static struct intel_uncore_box *uncore_a
+ uncore_pmu_init_hrtimer(box);
+ box->cpu = -1;
+ box->pci_phys_id = -1;
+- box->pkgid = -1;
++ box->dieid = -1;
+
+ /* set default hrtimer timeout */
+ box->hrtimer_duration = UNCORE_PMU_HRTIMER_INTERVAL;
+@@ -832,10 +832,10 @@ static void uncore_pmu_unregister(struct
+
+ static void uncore_free_boxes(struct intel_uncore_pmu *pmu)
+ {
+- int pkg;
++ int die;
+
+- for (pkg = 0; pkg < max_packages; pkg++)
+- kfree(pmu->boxes[pkg]);
++ for (die = 0; die < max_dies; die++)
++ kfree(pmu->boxes[die]);
+ kfree(pmu->boxes);
+ }
+
+@@ -874,7 +874,7 @@ static int __init uncore_type_init(struc
+ if (!pmus)
+ return -ENOMEM;
+
+- size = max_packages * sizeof(struct intel_uncore_box *);
++ size = max_dies * sizeof(struct intel_uncore_box *);
+
+ for (i = 0; i < type->num_boxes; i++) {
+ pmus[i].func_id = setid ? i : -1;
+@@ -941,21 +941,21 @@ static int uncore_pci_probe(struct pci_d
+ struct intel_uncore_type *type;
+ struct intel_uncore_pmu *pmu = NULL;
+ struct intel_uncore_box *box;
+- int phys_id, pkg, ret;
++ int phys_id, die, ret;
+
+ phys_id = uncore_pcibus_to_physid(pdev->bus);
+ if (phys_id < 0)
+ return -ENODEV;
+
+- pkg = (topology_max_die_per_package() > 1) ? phys_id :
++ die = (topology_max_die_per_package() > 1) ? phys_id :
+ topology_phys_to_logical_pkg(phys_id);
+- if (pkg < 0)
++ if (die < 0)
+ return -EINVAL;
+
+ if (UNCORE_PCI_DEV_TYPE(id->driver_data) == UNCORE_EXTRA_PCI_DEV) {
+ int idx = UNCORE_PCI_DEV_IDX(id->driver_data);
+
+- uncore_extra_pci_dev[pkg].dev[idx] = pdev;
++ uncore_extra_pci_dev[die].dev[idx] = pdev;
+ pci_set_drvdata(pdev, NULL);
+ return 0;
+ }
+@@ -994,7 +994,7 @@ static int uncore_pci_probe(struct pci_d
+ pmu = &type->pmus[UNCORE_PCI_DEV_IDX(id->driver_data)];
+ }
+
+- if (WARN_ON_ONCE(pmu->boxes[pkg] != NULL))
++ if (WARN_ON_ONCE(pmu->boxes[die] != NULL))
+ return -EINVAL;
+
+ box = uncore_alloc_box(type, NUMA_NO_NODE);
+@@ -1008,13 +1008,13 @@ static int uncore_pci_probe(struct pci_d
+
+ atomic_inc(&box->refcnt);
+ box->pci_phys_id = phys_id;
+- box->pkgid = pkg;
++ box->dieid = die;
+ box->pci_dev = pdev;
+ box->pmu = pmu;
+ uncore_box_init(box);
+ pci_set_drvdata(pdev, box);
+
+- pmu->boxes[pkg] = box;
++ pmu->boxes[die] = box;
+ if (atomic_inc_return(&pmu->activeboxes) > 1)
+ return 0;
+
+@@ -1022,7 +1022,7 @@ static int uncore_pci_probe(struct pci_d
+ ret = uncore_pmu_register(pmu);
+ if (ret) {
+ pci_set_drvdata(pdev, NULL);
+- pmu->boxes[pkg] = NULL;
++ pmu->boxes[die] = NULL;
+ uncore_box_exit(box);
+ kfree(box);
+ }
+@@ -1033,17 +1033,17 @@ static void uncore_pci_remove(struct pci
+ {
+ struct intel_uncore_box *box;
+ struct intel_uncore_pmu *pmu;
+- int i, phys_id, pkg;
++ int i, phys_id, die;
+
+ phys_id = uncore_pcibus_to_physid(pdev->bus);
+- pkg = (topology_max_die_per_package() > 1) ? phys_id :
++ die = (topology_max_die_per_package() > 1) ? phys_id :
+ topology_phys_to_logical_pkg(phys_id);
+
+ box = pci_get_drvdata(pdev);
+ if (!box) {
+ for (i = 0; i < UNCORE_EXTRA_PCI_DEV_MAX; i++) {
+- if (uncore_extra_pci_dev[pkg].dev[i] == pdev) {
+- uncore_extra_pci_dev[pkg].dev[i] = NULL;
++ if (uncore_extra_pci_dev[die].dev[i] == pdev) {
++ uncore_extra_pci_dev[die].dev[i] = NULL;
+ break;
+ }
+ }
+@@ -1056,7 +1056,7 @@ static void uncore_pci_remove(struct pci
+ return;
+
+ pci_set_drvdata(pdev, NULL);
+- pmu->boxes[pkg] = NULL;
++ pmu->boxes[die] = NULL;
+ if (atomic_dec_return(&pmu->activeboxes) == 0)
+ uncore_pmu_unregister(pmu);
+ uncore_box_exit(box);
+@@ -1068,7 +1068,7 @@ static int __init uncore_pci_init(void)
+ size_t size;
+ int ret;
+
+- size = max_packages * sizeof(struct pci_extra_dev);
++ size = max_dies * sizeof(struct pci_extra_dev);
+ uncore_extra_pci_dev = kzalloc(size, GFP_KERNEL);
+ if (!uncore_extra_pci_dev) {
+ ret = -ENOMEM;
+@@ -1115,11 +1115,11 @@ static void uncore_change_type_ctx(struc
+ {
+ struct intel_uncore_pmu *pmu = type->pmus;
+ struct intel_uncore_box *box;
+- int i, pkg;
++ int i, die;
+
+- pkg = topology_logical_die_id(old_cpu < 0 ? new_cpu : old_cpu);
++ die = topology_logical_die_id(old_cpu < 0 ? new_cpu : old_cpu);
+ for (i = 0; i < type->num_boxes; i++, pmu++) {
+- box = pmu->boxes[pkg];
++ box = pmu->boxes[die];
+ if (!box)
+ continue;
+
+@@ -1152,7 +1152,7 @@ static int uncore_event_cpu_offline(unsi
+ struct intel_uncore_type *type, **types = uncore_msr_uncores;
+ struct intel_uncore_pmu *pmu;
+ struct intel_uncore_box *box;
+- int i, pkg, target;
++ int i, die, target;
+
+ /* Check if exiting cpu is used for collecting uncore events */
+ if (!cpumask_test_and_clear_cpu(cpu, &uncore_cpu_mask))
+@@ -1171,12 +1171,12 @@ static int uncore_event_cpu_offline(unsi
+
+ unref:
+ /* Clear the references */
+- pkg = topology_logical_die_id(cpu);
++ die = topology_logical_die_id(cpu);
+ for (; *types; types++) {
+ type = *types;
+ pmu = type->pmus;
+ for (i = 0; i < type->num_boxes; i++, pmu++) {
+- box = pmu->boxes[pkg];
++ box = pmu->boxes[die];
+ if (box && atomic_dec_return(&box->refcnt) == 0)
+ uncore_box_exit(box);
+ }
+@@ -1185,7 +1185,7 @@ unref:
+ }
+
+ static int allocate_boxes(struct intel_uncore_type **types,
+- unsigned int pkg, unsigned int cpu)
++ unsigned int die, unsigned int cpu)
+ {
+ struct intel_uncore_box *box, *tmp;
+ struct intel_uncore_type *type;
+@@ -1198,20 +1198,20 @@ static int allocate_boxes(struct intel_u
+ type = *types;
+ pmu = type->pmus;
+ for (i = 0; i < type->num_boxes; i++, pmu++) {
+- if (pmu->boxes[pkg])
++ if (pmu->boxes[die])
+ continue;
+ box = uncore_alloc_box(type, cpu_to_node(cpu));
+ if (!box)
+ goto cleanup;
+ box->pmu = pmu;
+- box->pkgid = pkg;
++ box->dieid = die;
+ list_add(&box->active_list, &allocated);
+ }
+ }
+ /* Install them in the pmus */
+ list_for_each_entry_safe(box, tmp, &allocated, active_list) {
+ list_del_init(&box->active_list);
+- box->pmu->boxes[pkg] = box;
++ box->pmu->boxes[die] = box;
+ }
+ return 0;
+
+@@ -1228,10 +1228,10 @@ static int uncore_event_cpu_online(unsig
+ struct intel_uncore_type *type, **types = uncore_msr_uncores;
+ struct intel_uncore_pmu *pmu;
+ struct intel_uncore_box *box;
+- int i, ret, pkg, target;
++ int i, ret, die, target;
+
+- pkg = topology_logical_die_id(cpu);
+- ret = allocate_boxes(types, pkg, cpu);
++ die = topology_logical_die_id(cpu);
++ ret = allocate_boxes(types, die, cpu);
+ if (ret)
+ return ret;
+
+@@ -1239,7 +1239,7 @@ static int uncore_event_cpu_online(unsig
+ type = *types;
+ pmu = type->pmus;
+ for (i = 0; i < type->num_boxes; i++, pmu++) {
+- box = pmu->boxes[pkg];
++ box = pmu->boxes[die];
+ if (box && atomic_inc_return(&box->refcnt) == 1)
+ uncore_box_init(box);
+ }
+@@ -1418,7 +1418,7 @@ static int __init intel_uncore_init(void
+ if (boot_cpu_has(X86_FEATURE_HYPERVISOR))
+ return -ENODEV;
+
+- max_packages = topology_max_packages() * topology_max_die_per_package();
++ max_dies = topology_max_packages() * topology_max_die_per_package();
+
+ uncore_init = (struct intel_uncore_init_fun *)id->driver_data;
+ if (uncore_init->pci_init) {
+--- a/arch/x86/events/intel/uncore.h
++++ b/arch/x86/events/intel/uncore.h
+@@ -107,7 +107,7 @@ struct intel_uncore_extra_reg {
+
+ struct intel_uncore_box {
+ int pci_phys_id;
+- int pkgid;
++ int dieid; /* Logical die ID */
+ int n_active; /* number of active events */
+ int n_events;
+ int cpu; /* cpu to collect events */
+@@ -466,7 +466,7 @@ static inline void uncore_box_exit(struc
+
+ static inline bool uncore_box_is_fake(struct intel_uncore_box *box)
+ {
+- return (box->pkgid < 0);
++ return (box->dieid < 0);
+ }
+
+ static inline struct intel_uncore_pmu *uncore_event_to_pmu(struct perf_event *event)
+--- a/arch/x86/events/intel/uncore_snbep.c
++++ b/arch/x86/events/intel/uncore_snbep.c
+@@ -1056,8 +1056,8 @@ static void snbep_qpi_enable_event(struc
+
+ if (reg1->idx != EXTRA_REG_NONE) {
+ int idx = box->pmu->pmu_idx + SNBEP_PCI_QPI_PORT0_FILTER;
+- int pkg = topology_phys_to_logical_pkg(box->pci_phys_id);
+- struct pci_dev *filter_pdev = uncore_extra_pci_dev[pkg].dev[idx];
++ int die = topology_phys_to_logical_pkg(box->pci_phys_id);
++ struct pci_dev *filter_pdev = uncore_extra_pci_dev[die].dev[idx];
+
+ if (filter_pdev) {
+ pci_write_config_dword(filter_pdev, reg1->reg,
diff --git a/patches.suse/perf-x86-intel-uncore-Support-multi-die-package.patch b/patches.suse/perf-x86-intel-uncore-Support-multi-die-package.patch
new file mode 100644
index 0000000000..65a67f2462
--- /dev/null
+++ b/patches.suse/perf-x86-intel-uncore-Support-multi-die-package.patch
@@ -0,0 +1,120 @@
+From: Kan Liang <kan.liang@linux.intel.com>
+Date: Mon, 13 May 2019 13:58:57 -0400
+Subject: perf/x86/intel/uncore: Support multi-die/package
+Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
+Git-commit: 1ff4a47b2d0c13b755b2eeeb0e23be6c056d5dd9
+Patch-mainline: Queued in subsystem maintainer repository
+References: jsc#SLE-5454
+
+Uncore becomes die-scope on Xeon Cascade Lake-AP. Uncore driver needs to
+support die-scope uncore units.
+
+Use topology_logical_die_id() to replace topology_logical_package_id().
+For previous platforms which doesn't have multi-die,
+topology_logical_die_id() is identical as topology_logical_package_id().
+
+In pci_probe()/remove(), the group id reads from PCI BUS is logical die id
+for multi-die systems.
+
+Use topology_die_cpumask() to replace topology_core_cpumask().
+For previous platforms which doesn't have multi-die,
+topology_die_cpumask() is identical as topology_core_cpumask().
+
+There is no functional change for previous platforms.
+
+Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
+Signed-off-by: Len Brown <len.brown@intel.com>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Reviewed-by: Ingo Molnar <mingo@kernel.org>
+Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Link: https://lkml.kernel.org/r/a25bba4a5b480aa4e9f8190005d7f5f53e29c8da.1557769318.git.len.brown@intel.com
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ arch/x86/events/intel/uncore.c | 20 +++++++++++---------
+ 1 file changed, 11 insertions(+), 9 deletions(-)
+
+--- a/arch/x86/events/intel/uncore.c
++++ b/arch/x86/events/intel/uncore.c
+@@ -100,7 +100,7 @@ ssize_t uncore_event_show(struct kobject
+
+ struct intel_uncore_box *uncore_pmu_to_box(struct intel_uncore_pmu *pmu, int cpu)
+ {
+- unsigned int pkgid = topology_logical_package_id(cpu);
++ unsigned int pkgid = topology_logical_die_id(cpu);
+
+ /*
+ * The unsigned check also catches the '-1' return value for non
+@@ -947,7 +947,8 @@ static int uncore_pci_probe(struct pci_d
+ if (phys_id < 0)
+ return -ENODEV;
+
+- pkg = topology_phys_to_logical_pkg(phys_id);
++ pkg = (topology_max_die_per_package() > 1) ? phys_id :
++ topology_phys_to_logical_pkg(phys_id);
+ if (pkg < 0)
+ return -EINVAL;
+
+@@ -1035,7 +1036,8 @@ static void uncore_pci_remove(struct pci
+ int i, phys_id, pkg;
+
+ phys_id = uncore_pcibus_to_physid(pdev->bus);
+- pkg = topology_phys_to_logical_pkg(phys_id);
++ pkg = (topology_max_die_per_package() > 1) ? phys_id :
++ topology_phys_to_logical_pkg(phys_id);
+
+ box = pci_get_drvdata(pdev);
+ if (!box) {
+@@ -1115,7 +1117,7 @@ static void uncore_change_type_ctx(struc
+ struct intel_uncore_box *box;
+ int i, pkg;
+
+- pkg = topology_logical_package_id(old_cpu < 0 ? new_cpu : old_cpu);
++ pkg = topology_logical_die_id(old_cpu < 0 ? new_cpu : old_cpu);
+ for (i = 0; i < type->num_boxes; i++, pmu++) {
+ box = pmu->boxes[pkg];
+ if (!box)
+@@ -1156,7 +1158,7 @@ static int uncore_event_cpu_offline(unsi
+ if (!cpumask_test_and_clear_cpu(cpu, &uncore_cpu_mask))
+ goto unref;
+ /* Find a new cpu to collect uncore events */
+- target = cpumask_any_but(topology_core_cpumask(cpu), cpu);
++ target = cpumask_any_but(topology_die_cpumask(cpu), cpu);
+
+ /* Migrate uncore events to the new target */
+ if (target < nr_cpu_ids)
+@@ -1169,7 +1171,7 @@ static int uncore_event_cpu_offline(unsi
+
+ unref:
+ /* Clear the references */
+- pkg = topology_logical_package_id(cpu);
++ pkg = topology_logical_die_id(cpu);
+ for (; *types; types++) {
+ type = *types;
+ pmu = type->pmus;
+@@ -1228,7 +1230,7 @@ static int uncore_event_cpu_online(unsig
+ struct intel_uncore_box *box;
+ int i, ret, pkg, target;
+
+- pkg = topology_logical_package_id(cpu);
++ pkg = topology_logical_die_id(cpu);
+ ret = allocate_boxes(types, pkg, cpu);
+ if (ret)
+ return ret;
+@@ -1247,7 +1249,7 @@ static int uncore_event_cpu_online(unsig
+ * Check if there is an online cpu in the package
+ * which collects uncore events already.
+ */
+- target = cpumask_any_and(&uncore_cpu_mask, topology_core_cpumask(cpu));
++ target = cpumask_any_and(&uncore_cpu_mask, topology_die_cpumask(cpu));
+ if (target < nr_cpu_ids)
+ return 0;
+
+@@ -1416,7 +1418,7 @@ static int __init intel_uncore_init(void
+ if (boot_cpu_has(X86_FEATURE_HYPERVISOR))
+ return -ENODEV;
+
+- max_packages = topology_max_packages();
++ max_packages = topology_max_packages() * topology_max_die_per_package();
+
+ uncore_init = (struct intel_uncore_init_fun *)id->driver_data;
+ if (uncore_init->pci_init) {
diff --git a/patches.suse/powercap-intel_rapl-Simplify-rapl_find_package.patch b/patches.suse/powercap-intel_rapl-Simplify-rapl_find_package.patch
new file mode 100644
index 0000000000..c867a0a6f7
--- /dev/null
+++ b/patches.suse/powercap-intel_rapl-Simplify-rapl_find_package.patch
@@ -0,0 +1,96 @@
+From: Zhang Rui <rui.zhang@intel.com>
+Date: Mon, 13 May 2019 13:58:50 -0400
+Subject: powercap/intel_rapl: Simplify rapl_find_package()
+Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
+Git-commit: aadf7b38337108627b014fb285147aacdfafe42e
+Patch-mainline: Queued in subsystem maintainer repository
+References: jsc#SLE-5454
+
+Simplify how the code to discover a package is called. Rename
+find_package_by_id() to rapl_find_package_domain()
+
+Syntax only, no functional or semantic change.
+
+Signed-off-by: Zhang Rui <rui.zhang@intel.com>
+Signed-off-by: Len Brown <len.brown@intel.com>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Reviewed-by: Ingo Molnar <mingo@kernel.org>
+Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Cc: linux-pm@vger.kernel.org
+Link: https://lkml.kernel.org/r/ae3d1903407fd6e3684234b674f4f0e62c2ab54c.1557769318.git.len.brown@intel.com
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ drivers/powercap/intel_rapl.c | 18 +++++++++---------
+ 1 file changed, 9 insertions(+), 9 deletions(-)
+
+--- a/drivers/powercap/intel_rapl.c
++++ b/drivers/powercap/intel_rapl.c
+@@ -262,8 +262,9 @@ static struct powercap_control_type *con
+ static struct rapl_domain *platform_rapl_domain; /* Platform (PSys) domain */
+
+ /* caller to ensure CPU hotplug lock is held */
+-static struct rapl_package *find_package_by_id(int id)
++static struct rapl_package *rapl_find_package_domain(int cpu)
+ {
++ int id = topology_physical_package_id(cpu);
+ struct rapl_package *rp;
+
+ list_for_each_entry(rp, &rapl_packages, plist) {
+@@ -1302,7 +1303,7 @@ static int __init rapl_register_psys(voi
+ rd->rpl[0].name = pl1_name;
+ rd->rpl[1].prim_id = PL2_ENABLE;
+ rd->rpl[1].name = pl2_name;
+- rd->rp = find_package_by_id(0);
++ rd->rp = rapl_find_package_domain(0);
+
+ power_zone = powercap_register_zone(&rd->power_zone, control_type,
+ "psys", NULL,
+@@ -1458,8 +1459,9 @@ static void rapl_remove_package(struct r
+ }
+
+ /* called from CPU hotplug notifier, hotplug lock held */
+-static struct rapl_package *rapl_add_package(int cpu, int pkgid)
++static struct rapl_package *rapl_add_package(int cpu)
+ {
++ int id = topology_physical_package_id(cpu);
+ struct rapl_package *rp;
+ int ret;
+
+@@ -1468,7 +1470,7 @@ static struct rapl_package *rapl_add_pac
+ return ERR_PTR(-ENOMEM);
+
+ /* add the new package to the list */
+- rp->id = pkgid;
++ rp->id = id;
+ rp->lead_cpu = cpu;
+
+ /* check if the package contains valid domains */
+@@ -1499,12 +1501,11 @@ err_free_package:
+ */
+ static int rapl_cpu_online(unsigned int cpu)
+ {
+- int pkgid = topology_physical_package_id(cpu);
+ struct rapl_package *rp;
+
+- rp = find_package_by_id(pkgid);
++ rp = rapl_find_package_domain(cpu);
+ if (!rp) {
+- rp = rapl_add_package(cpu, pkgid);
++ rp = rapl_add_package(cpu);
+ if (IS_ERR(rp))
+ return PTR_ERR(rp);
+ }
+@@ -1514,11 +1515,10 @@ static int rapl_cpu_online(unsigned int
+
+ static int rapl_cpu_down_prep(unsigned int cpu)
+ {
+- int pkgid = topology_physical_package_id(cpu);
+ struct rapl_package *rp;
+ int lead_cpu;
+
+- rp = find_package_by_id(pkgid);
++ rp = rapl_find_package_domain(cpu);
+ if (!rp)
+ return 0;
+
diff --git a/patches.suse/powercap-intel_rapl-Support-multi-die-package.patch b/patches.suse/powercap-intel_rapl-Support-multi-die-package.patch
new file mode 100644
index 0000000000..2eb7a21daa
--- /dev/null
+++ b/patches.suse/powercap-intel_rapl-Support-multi-die-package.patch
@@ -0,0 +1,49 @@
+From: Zhang Rui <rui.zhang@intel.com>
+Date: Mon, 13 May 2019 13:58:51 -0400
+Subject: powercap/intel_rapl: Support multi-die/package
+Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
+Git-commit: 32fb480e0a2cf1f71e4174d6477198c94dbc746c
+Patch-mainline: Queued in subsystem maintainer repository
+References: jsc#SLE-5454
+
+RAPL "package" domains are actually implemented in hardware per-die.
+Thus, the new multi-die/package systems have mulitple domains
+within each physical package.
+
+Update the intel_rapl driver to be "die aware" -- exporting multiple
+domains within a single package, when present. No change on single
+die/package systems.
+
+Signed-off-by: Zhang Rui <rui.zhang@intel.com>
+Signed-off-by: Len Brown <len.brown@intel.com>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Reviewed-by: Ingo Molnar <mingo@kernel.org>
+Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Cc: linux-pm@vger.kernel.org
+Link: https://lkml.kernel.org/r/9fcb4719aeb7efccf3bc75ed8dd559e46121649f.1557769318.git.len.brown@intel.com
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ drivers/powercap/intel_rapl.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/powercap/intel_rapl.c
++++ b/drivers/powercap/intel_rapl.c
+@@ -264,7 +264,7 @@ static struct rapl_domain *platform_rapl
+ /* caller to ensure CPU hotplug lock is held */
+ static struct rapl_package *rapl_find_package_domain(int cpu)
+ {
+- int id = topology_physical_package_id(cpu);
++ int id = topology_logical_die_id(cpu);
+ struct rapl_package *rp;
+
+ list_for_each_entry(rp, &rapl_packages, plist) {
+@@ -1461,7 +1461,7 @@ static void rapl_remove_package(struct r
+ /* called from CPU hotplug notifier, hotplug lock held */
+ static struct rapl_package *rapl_add_package(int cpu)
+ {
+- int id = topology_physical_package_id(cpu);
++ int id = topology_logical_die_id(cpu);
+ struct rapl_package *rp;
+ int ret;
+
diff --git a/patches.suse/powercap-intel_rapl-Update-RAPL-domain-name-and-debu.patch b/patches.suse/powercap-intel_rapl-Update-RAPL-domain-name-and-debu.patch
new file mode 100644
index 0000000000..d471e3f571
--- /dev/null
+++ b/patches.suse/powercap-intel_rapl-Update-RAPL-domain-name-and-debu.patch
@@ -0,0 +1,199 @@
+From: Zhang Rui <rui.zhang@intel.com>
+Date: Mon, 13 May 2019 13:58:53 -0400
+Subject: powercap/intel_rapl: Update RAPL domain name and debug messages
+Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
+Git-commit: 9ea7612c46586d9eacfd517e73ff76ef294feca0
+Patch-mainline: Queued in subsystem maintainer repository
+References: jsc#SLE-5454
+
+The RAPL domain "name" attribute contains "Package-N", which is ambiguous
+on multi-die per-package systems.
+
+Update the name to "package-X-die-Y" on those systems.
+
+No change on systems without multi-die/package.
+
+Update driver debug messages.
+
+Signed-off-by: Zhang Rui <rui.zhang@intel.com>
+Signed-off-by: Len Brown <len.brown@intel.com>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Reviewed-by: Ingo Molnar <mingo@kernel.org>
+Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Cc: linux-pm@vger.kernel.org
+Link: https://lkml.kernel.org/r/6510b784e16374447965925588ec6e46d5d007d8.1557769318.git.len.brown@intel.com
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ drivers/powercap/intel_rapl.c | 57 +++++++++++++++++++++++-------------------
+ 1 file changed, 32 insertions(+), 25 deletions(-)
+
+--- a/drivers/powercap/intel_rapl.c
++++ b/drivers/powercap/intel_rapl.c
+@@ -176,12 +176,15 @@ struct rapl_domain {
+ #define power_zone_to_rapl_domain(_zone) \
+ container_of(_zone, struct rapl_domain, power_zone)
+
++/* maximum rapl package domain name: package-%d-die-%d */
++#define PACKAGE_DOMAIN_NAME_LENGTH 30
+
+-/* Each physical package contains multiple domains, these are the common
++
++/* Each rapl package contains multiple domains, these are the common
+ * data across RAPL domains within a package.
+ */
+ struct rapl_package {
+- unsigned int id; /* physical package/socket id */
++ unsigned int id; /* logical die id, equals physical 1-die systems */
+ unsigned int nr_domains;
+ unsigned long domain_map; /* bit map of active domains */
+ unsigned int power_unit;
+@@ -196,6 +199,7 @@ struct rapl_package {
+ int lead_cpu; /* one active cpu per package for access */
+ /* Track active cpus */
+ struct cpumask cpumask;
++ char name[PACKAGE_DOMAIN_NAME_LENGTH];
+ };
+
+ struct rapl_defaults {
+@@ -922,8 +926,8 @@ static int rapl_check_unit_core(struct r
+ value = (msr_val & TIME_UNIT_MASK) >> TIME_UNIT_OFFSET;
+ rp->time_unit = 1000000 / (1 << value);
+
+- pr_debug("Core CPU package %d energy=%dpJ, time=%dus, power=%duW\n",
+- rp->id, rp->energy_unit, rp->time_unit, rp->power_unit);
++ pr_debug("Core CPU %s energy=%dpJ, time=%dus, power=%duW\n",
++ rp->name, rp->energy_unit, rp->time_unit, rp->power_unit);
+
+ return 0;
+ }
+@@ -947,8 +951,8 @@ static int rapl_check_unit_atom(struct r
+ value = (msr_val & TIME_UNIT_MASK) >> TIME_UNIT_OFFSET;
+ rp->time_unit = 1000000 / (1 << value);
+
+- pr_debug("Atom package %d energy=%dpJ, time=%dus, power=%duW\n",
+- rp->id, rp->energy_unit, rp->time_unit, rp->power_unit);
++ pr_debug("Atom %s energy=%dpJ, time=%dus, power=%duW\n",
++ rp->name, rp->energy_unit, rp->time_unit, rp->power_unit);
+
+ return 0;
+ }
+@@ -1183,7 +1187,7 @@ static void rapl_update_domain_data(stru
+ u64 val;
+
+ for (dmn = 0; dmn < rp->nr_domains; dmn++) {
+- pr_debug("update package %d domain %s data\n", rp->id,
++ pr_debug("update %s domain %s data\n", rp->name,
+ rp->domains[dmn].name);
+ /* exclude non-raw primitives */
+ for (prim = 0; prim < NR_RAW_PRIMITIVES; prim++) {
+@@ -1208,7 +1212,6 @@ static void rapl_unregister_powercap(voi
+ static int rapl_package_register_powercap(struct rapl_package *rp)
+ {
+ struct rapl_domain *rd;
+- char dev_name[17]; /* max domain name = 7 + 1 + 8 for int + 1 for null*/
+ struct powercap_zone *power_zone = NULL;
+ int nr_pl, ret;;
+
+@@ -1219,20 +1222,16 @@ static int rapl_package_register_powerca
+ for (rd = rp->domains; rd < rp->domains + rp->nr_domains; rd++) {
+ if (rd->id == RAPL_DOMAIN_PACKAGE) {
+ nr_pl = find_nr_power_limit(rd);
+- pr_debug("register socket %d package domain %s\n",
+- rp->id, rd->name);
+- memset(dev_name, 0, sizeof(dev_name));
+- snprintf(dev_name, sizeof(dev_name), "%s-%d",
+- rd->name, rp->id);
++ pr_debug("register package domain %s\n", rp->name);
+ power_zone = powercap_register_zone(&rd->power_zone,
+ control_type,
+- dev_name, NULL,
++ rp->name, NULL,
+ &zone_ops[rd->id],
+ nr_pl,
+ &constraint_ops);
+ if (IS_ERR(power_zone)) {
+- pr_debug("failed to register package, %d\n",
+- rp->id);
++ pr_debug("failed to register power zone %s\n",
++ rp->name);
+ return PTR_ERR(power_zone);
+ }
+ /* track parent zone in per package/socket data */
+@@ -1258,8 +1257,8 @@ static int rapl_package_register_powerca
+ &constraint_ops);
+
+ if (IS_ERR(power_zone)) {
+- pr_debug("failed to register power_zone, %d:%s:%s\n",
+- rp->id, rd->name, dev_name);
++ pr_debug("failed to register power_zone, %s:%s\n",
++ rp->name, rd->name);
+ ret = PTR_ERR(power_zone);
+ goto err_cleanup;
+ }
+@@ -1272,7 +1271,7 @@ err_cleanup:
+ * failed after the first domain setup.
+ */
+ while (--rd >= rp->domains) {
+- pr_debug("unregister package %d domain %s\n", rp->id, rd->name);
++ pr_debug("unregister %s domain %s\n", rp->name, rd->name);
+ powercap_unregister_zone(control_type, &rd->power_zone);
+ }
+
+@@ -1382,8 +1381,8 @@ static void rapl_detect_powerlimit(struc
+ /* check if the domain is locked by BIOS, ignore if MSR doesn't exist */
+ if (!rapl_read_data_raw(rd, FW_LOCK, false, &val64)) {
+ if (val64) {
+- pr_info("RAPL package %d domain %s locked by BIOS\n",
+- rd->rp->id, rd->name);
++ pr_info("RAPL %s domain %s locked by BIOS\n",
++ rd->rp->name, rd->name);
+ rd->state |= DOMAIN_STATE_BIOS_LOCKED;
+ }
+ }
+@@ -1412,10 +1411,10 @@ static int rapl_detect_domains(struct ra
+ }
+ rp->nr_domains = bitmap_weight(&rp->domain_map, RAPL_DOMAIN_MAX);
+ if (!rp->nr_domains) {
+- pr_debug("no valid rapl domains found in package %d\n", rp->id);
++ pr_debug("no valid rapl domains found in %s\n", rp->name);
+ return -ENODEV;
+ }
+- pr_debug("found %d domains on package %d\n", rp->nr_domains, rp->id);
++ pr_debug("found %d domains on %s\n", rp->nr_domains, rp->name);
+
+ rp->domains = kcalloc(rp->nr_domains + 1, sizeof(struct rapl_domain),
+ GFP_KERNEL);
+@@ -1448,8 +1447,8 @@ static void rapl_remove_package(struct r
+ rd_package = rd;
+ continue;
+ }
+- pr_debug("remove package, undo power limit on %d: %s\n",
+- rp->id, rd->name);
++ pr_debug("remove package, undo power limit on %s: %s\n",
++ rp->name, rd->name);
+ powercap_unregister_zone(control_type, &rd->power_zone);
+ }
+ /* do parent zone last */
+@@ -1463,6 +1462,7 @@ static struct rapl_package *rapl_add_pac
+ {
+ int id = topology_logical_die_id(cpu);
+ struct rapl_package *rp;
++ struct cpuinfo_x86 *c = &cpu_data(cpu);
+ int ret;
+
+ rp = kzalloc(sizeof(struct rapl_package), GFP_KERNEL);
+@@ -1473,6 +1473,13 @@ static struct rapl_package *rapl_add_pac
+ rp->id = id;
+ rp->lead_cpu = cpu;
+
++ if (topology_max_die_per_package() > 1)
++ snprintf(rp->name, PACKAGE_DOMAIN_NAME_LENGTH,
++ "package-%d-die-%d", c->phys_proc_id, c->cpu_die_id);
++ else
++ snprintf(rp->name, PACKAGE_DOMAIN_NAME_LENGTH, "package-%d",
++ c->phys_proc_id);
++
+ /* check if the package contains valid domains */
+ if (rapl_detect_domains(rp, cpu) ||
+ rapl_defaults->check_unit(rp, cpu)) {
diff --git a/patches.suse/thermal-x86_pkg_temp_thermal-Cosmetic-Rename-interna.patch b/patches.suse/thermal-x86_pkg_temp_thermal-Cosmetic-Rename-interna.patch
new file mode 100644
index 0000000000..7ba159fc65
--- /dev/null
+++ b/patches.suse/thermal-x86_pkg_temp_thermal-Cosmetic-Rename-interna.patch
@@ -0,0 +1,404 @@
+From: Len Brown <len.brown@intel.com>
+Date: Mon, 13 May 2019 13:59:00 -0400
+Subject: thermal/x86_pkg_temp_thermal: Cosmetic: Rename internal variables to
+ zones from packages
+Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
+Git-commit: b2ce1c883df91a231f8138935167273c1767ad66
+Patch-mainline: Queued in subsystem maintainer repository
+References: jsc#SLE-5454
+
+Syntax update only -- no logical or functional change.
+
+In response to the new multi-die/package changes, update variable names to
+use the more generic thermal "zone" terminology, instead of "package", as
+the zones can refer to either packages or die.
+
+Signed-off-by: Len Brown <len.brown@intel.com>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Reviewed-by: Ingo Molnar <mingo@kernel.org>
+Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Cc: Zhang Rui <rui.zhang@intel.com>
+Link: https://lkml.kernel.org/r/b65494a76be13481dc3a809c75debb2574c34eda.1557769318.git.len.brown@intel.com
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ drivers/thermal/x86_pkg_temp_thermal.c | 142 ++++++++++++++++-----------------
+ 1 file changed, 72 insertions(+), 70 deletions(-)
+
+--- a/drivers/thermal/x86_pkg_temp_thermal.c
++++ b/drivers/thermal/x86_pkg_temp_thermal.c
+@@ -55,7 +55,7 @@ MODULE_PARM_DESC(notify_delay_ms,
+ */
+ #define MAX_NUMBER_OF_TRIPS 2
+
+-struct pkg_device {
++struct zone_device {
+ int cpu;
+ bool work_scheduled;
+ u32 tj_max;
+@@ -70,10 +70,10 @@ static struct thermal_zone_params pkg_te
+ .no_hwmon = true,
+ };
+
+-/* Keep track of how many package pointers we allocated in init() */
+-static int max_packages __read_mostly;
+-/* Array of package pointers */
+-static struct pkg_device **packages;
++/* Keep track of how many zone pointers we allocated in init() */
++static int max_id __read_mostly;
++/* Array of zone pointers */
++static struct zone_device **zones;
+ /* Serializes interrupt notification, work and hotplug */
+ static DEFINE_SPINLOCK(pkg_temp_lock);
+ /* Protects zone operation in the work function against hotplug removal */
+@@ -120,12 +120,12 @@ err_out:
+ *
+ * - Other callsites: Must hold pkg_temp_lock
+ */
+-static struct pkg_device *pkg_temp_thermal_get_dev(unsigned int cpu)
++static struct zone_device *pkg_temp_thermal_get_dev(unsigned int cpu)
+ {
+- int pkgid = topology_logical_die_id(cpu);
++ int id = topology_logical_die_id(cpu);
+
+- if (pkgid >= 0 && pkgid < max_packages)
+- return packages[pkgid];
++ if (id >= 0 && id < max_id)
++ return zones[id];
+ return NULL;
+ }
+
+@@ -150,12 +150,13 @@ static int get_tj_max(int cpu, u32 *tj_m
+
+ static int sys_get_curr_temp(struct thermal_zone_device *tzd, int *temp)
+ {
+- struct pkg_device *pkgdev = tzd->devdata;
++ struct zone_device *zonedev = tzd->devdata;
+ u32 eax, edx;
+
+- rdmsr_on_cpu(pkgdev->cpu, MSR_IA32_PACKAGE_THERM_STATUS, &eax, &edx);
++ rdmsr_on_cpu(zonedev->cpu, MSR_IA32_PACKAGE_THERM_STATUS,
++ &eax, &edx);
+ if (eax & 0x80000000) {
+- *temp = pkgdev->tj_max - ((eax >> 16) & 0x7f) * 1000;
++ *temp = zonedev->tj_max - ((eax >> 16) & 0x7f) * 1000;
+ pr_debug("sys_get_curr_temp %d\n", *temp);
+ return 0;
+ }
+@@ -165,7 +166,7 @@ static int sys_get_curr_temp(struct ther
+ static int sys_get_trip_temp(struct thermal_zone_device *tzd,
+ int trip, int *temp)
+ {
+- struct pkg_device *pkgdev = tzd->devdata;
++ struct zone_device *zonedev = tzd->devdata;
+ unsigned long thres_reg_value;
+ u32 mask, shift, eax, edx;
+ int ret;
+@@ -181,14 +182,14 @@ static int sys_get_trip_temp(struct ther
+ shift = THERM_SHIFT_THRESHOLD0;
+ }
+
+- ret = rdmsr_on_cpu(pkgdev->cpu, MSR_IA32_PACKAGE_THERM_INTERRUPT,
++ ret = rdmsr_on_cpu(zonedev->cpu, MSR_IA32_PACKAGE_THERM_INTERRUPT,
+ &eax, &edx);
+ if (ret < 0)
+ return ret;
+
+ thres_reg_value = (eax & mask) >> shift;
+ if (thres_reg_value)
+- *temp = pkgdev->tj_max - thres_reg_value * 1000;
++ *temp = zonedev->tj_max - thres_reg_value * 1000;
+ else
+ *temp = 0;
+ pr_debug("sys_get_trip_temp %d\n", *temp);
+@@ -199,14 +200,14 @@ static int sys_get_trip_temp(struct ther
+ static int
+ sys_set_trip_temp(struct thermal_zone_device *tzd, int trip, int temp)
+ {
+- struct pkg_device *pkgdev = tzd->devdata;
++ struct zone_device *zonedev = tzd->devdata;
+ u32 l, h, mask, shift, intr;
+ int ret;
+
+- if (trip >= MAX_NUMBER_OF_TRIPS || temp >= pkgdev->tj_max)
++ if (trip >= MAX_NUMBER_OF_TRIPS || temp >= zonedev->tj_max)
+ return -EINVAL;
+
+- ret = rdmsr_on_cpu(pkgdev->cpu, MSR_IA32_PACKAGE_THERM_INTERRUPT,
++ ret = rdmsr_on_cpu(zonedev->cpu, MSR_IA32_PACKAGE_THERM_INTERRUPT,
+ &l, &h);
+ if (ret < 0)
+ return ret;
+@@ -228,11 +229,12 @@ sys_set_trip_temp(struct thermal_zone_de
+ if (!temp) {
+ l &= ~intr;
+ } else {
+- l |= (pkgdev->tj_max - temp)/1000 << shift;
++ l |= (zonedev->tj_max - temp)/1000 << shift;
+ l |= intr;
+ }
+
+- return wrmsr_on_cpu(pkgdev->cpu, MSR_IA32_PACKAGE_THERM_INTERRUPT, l, h);
++ return wrmsr_on_cpu(zonedev->cpu, MSR_IA32_PACKAGE_THERM_INTERRUPT,
++ l, h);
+ }
+
+ static int sys_get_trip_type(struct thermal_zone_device *thermal, int trip,
+@@ -287,26 +289,26 @@ static void pkg_temp_thermal_threshold_w
+ {
+ struct thermal_zone_device *tzone = NULL;
+ int cpu = smp_processor_id();
+- struct pkg_device *pkgdev;
++ struct zone_device *zonedev;
+ u64 msr_val, wr_val;
+
+ mutex_lock(&thermal_zone_mutex);
+ spin_lock_irq(&pkg_temp_lock);
+ ++pkg_work_cnt;
+
+- pkgdev = pkg_temp_thermal_get_dev(cpu);
+- if (!pkgdev) {
++ zonedev = pkg_temp_thermal_get_dev(cpu);
++ if (!zonedev) {
+ spin_unlock_irq(&pkg_temp_lock);
+ mutex_unlock(&thermal_zone_mutex);
+ return;
+ }
+- pkgdev->work_scheduled = false;
++ zonedev->work_scheduled = false;
+
+ rdmsrl(MSR_IA32_PACKAGE_THERM_STATUS, msr_val);
+ wr_val = msr_val & ~(THERM_LOG_THRESHOLD0 | THERM_LOG_THRESHOLD1);
+ if (wr_val != msr_val) {
+ wrmsrl(MSR_IA32_PACKAGE_THERM_STATUS, wr_val);
+- tzone = pkgdev->tzone;
++ tzone = zonedev->tzone;
+ }
+
+ enable_pkg_thres_interrupt();
+@@ -332,7 +334,7 @@ static void pkg_thermal_schedule_work(in
+ static int pkg_thermal_notify(u64 msr_val)
+ {
+ int cpu = smp_processor_id();
+- struct pkg_device *pkgdev;
++ struct zone_device *zonedev;
+ unsigned long flags;
+
+ spin_lock_irqsave(&pkg_temp_lock, flags);
+@@ -341,10 +343,10 @@ static int pkg_thermal_notify(u64 msr_va
+ disable_pkg_thres_interrupt();
+
+ /* Work is per package, so scheduling it once is enough. */
+- pkgdev = pkg_temp_thermal_get_dev(cpu);
+- if (pkgdev && !pkgdev->work_scheduled) {
+- pkgdev->work_scheduled = true;
+- pkg_thermal_schedule_work(pkgdev->cpu, &pkgdev->work);
++ zonedev = pkg_temp_thermal_get_dev(cpu);
++ if (zonedev && !zonedev->work_scheduled) {
++ zonedev->work_scheduled = true;
++ pkg_thermal_schedule_work(zonedev->cpu, &zonedev->work);
+ }
+
+ spin_unlock_irqrestore(&pkg_temp_lock, flags);
+@@ -353,12 +355,12 @@ static int pkg_thermal_notify(u64 msr_va
+
+ static int pkg_temp_thermal_device_add(unsigned int cpu)
+ {
+- int pkgid = topology_logical_die_id(cpu);
++ int id = topology_logical_die_id(cpu);
+ u32 tj_max, eax, ebx, ecx, edx;
+- struct pkg_device *pkgdev;
++ struct zone_device *zonedev;
+ int thres_count, err;
+
+- if (pkgid >= max_packages)
++ if (id >= max_id)
+ return -ENOMEM;
+
+ cpuid(6, &eax, &ebx, &ecx, &edx);
+@@ -372,51 +374,51 @@ static int pkg_temp_thermal_device_add(u
+ if (err)
+ return err;
+
+- pkgdev = kzalloc(sizeof(*pkgdev), GFP_KERNEL);
+- if (!pkgdev)
++ zonedev = kzalloc(sizeof(*zonedev), GFP_KERNEL);
++ if (!zonedev)
+ return -ENOMEM;
+
+- INIT_DELAYED_WORK(&pkgdev->work, pkg_temp_thermal_threshold_work_fn);
+- pkgdev->cpu = cpu;
+- pkgdev->tj_max = tj_max;
+- pkgdev->tzone = thermal_zone_device_register("x86_pkg_temp",
++ INIT_DELAYED_WORK(&zonedev->work, pkg_temp_thermal_threshold_work_fn);
++ zonedev->cpu = cpu;
++ zonedev->tj_max = tj_max;
++ zonedev->tzone = thermal_zone_device_register("x86_pkg_temp",
+ thres_count,
+ (thres_count == MAX_NUMBER_OF_TRIPS) ? 0x03 : 0x01,
+- pkgdev, &tzone_ops, &pkg_temp_tz_params, 0, 0);
+- if (IS_ERR(pkgdev->tzone)) {
+- err = PTR_ERR(pkgdev->tzone);
+- kfree(pkgdev);
++ zonedev, &tzone_ops, &pkg_temp_tz_params, 0, 0);
++ if (IS_ERR(zonedev->tzone)) {
++ err = PTR_ERR(zonedev->tzone);
++ kfree(zonedev);
+ return err;
+ }
+ /* Store MSR value for package thermal interrupt, to restore at exit */
+- rdmsr(MSR_IA32_PACKAGE_THERM_INTERRUPT, pkgdev->msr_pkg_therm_low,
+- pkgdev->msr_pkg_therm_high);
++ rdmsr(MSR_IA32_PACKAGE_THERM_INTERRUPT, zonedev->msr_pkg_therm_low,
++ zonedev->msr_pkg_therm_high);
+
+- cpumask_set_cpu(cpu, &pkgdev->cpumask);
++ cpumask_set_cpu(cpu, &zonedev->cpumask);
+ spin_lock_irq(&pkg_temp_lock);
+- packages[pkgid] = pkgdev;
++ zones[id] = zonedev;
+ spin_unlock_irq(&pkg_temp_lock);
+ return 0;
+ }
+
+ static int pkg_thermal_cpu_offline(unsigned int cpu)
+ {
+- struct pkg_device *pkgdev = pkg_temp_thermal_get_dev(cpu);
++ struct zone_device *zonedev = pkg_temp_thermal_get_dev(cpu);
+ bool lastcpu, was_target;
+ int target;
+
+- if (!pkgdev)
++ if (!zonedev)
+ return 0;
+
+- target = cpumask_any_but(&pkgdev->cpumask, cpu);
+- cpumask_clear_cpu(cpu, &pkgdev->cpumask);
++ target = cpumask_any_but(&zonedev->cpumask, cpu);
++ cpumask_clear_cpu(cpu, &zonedev->cpumask);
+ lastcpu = target >= nr_cpu_ids;
+ /*
+ * Remove the sysfs files, if this is the last cpu in the package
+ * before doing further cleanups.
+ */
+ if (lastcpu) {
+- struct thermal_zone_device *tzone = pkgdev->tzone;
++ struct thermal_zone_device *tzone = zonedev->tzone;
+
+ /*
+ * We must protect against a work function calling
+@@ -425,7 +427,7 @@ static int pkg_thermal_cpu_offline(unsig
+ * won't try to call.
+ */
+ mutex_lock(&thermal_zone_mutex);
+- pkgdev->tzone = NULL;
++ zonedev->tzone = NULL;
+ mutex_unlock(&thermal_zone_mutex);
+
+ thermal_zone_device_unregister(tzone);
+@@ -439,8 +441,8 @@ static int pkg_thermal_cpu_offline(unsig
+ * one. When we drop the lock, then the interrupt notify function
+ * will see the new target.
+ */
+- was_target = pkgdev->cpu == cpu;
+- pkgdev->cpu = target;
++ was_target = zonedev->cpu == cpu;
++ zonedev->cpu = target;
+
+ /*
+ * If this is the last CPU in the package remove the package
+@@ -449,23 +451,23 @@ static int pkg_thermal_cpu_offline(unsig
+ * worker will see the package anymore.
+ */
+ if (lastcpu) {
+- packages[topology_logical_die_id(cpu)] = NULL;
++ zones[topology_logical_die_id(cpu)] = NULL;
+ /* After this point nothing touches the MSR anymore. */
+ wrmsr(MSR_IA32_PACKAGE_THERM_INTERRUPT,
+- pkgdev->msr_pkg_therm_low, pkgdev->msr_pkg_therm_high);
++ zonedev->msr_pkg_therm_low, zonedev->msr_pkg_therm_high);
+ }
+
+ /*
+ * Check whether there is work scheduled and whether the work is
+ * targeted at the outgoing CPU.
+ */
+- if (pkgdev->work_scheduled && was_target) {
++ if (zonedev->work_scheduled && was_target) {
+ /*
+ * To cancel the work we need to drop the lock, otherwise
+ * we might deadlock if the work needs to be flushed.
+ */
+ spin_unlock_irq(&pkg_temp_lock);
+- cancel_delayed_work_sync(&pkgdev->work);
++ cancel_delayed_work_sync(&zonedev->work);
+ spin_lock_irq(&pkg_temp_lock);
+ /*
+ * If this is not the last cpu in the package and the work
+@@ -473,21 +475,21 @@ static int pkg_thermal_cpu_offline(unsig
+ * need to reschedule the work, otherwise the interrupt
+ * stays disabled forever.
+ */
+- if (!lastcpu && pkgdev->work_scheduled)
+- pkg_thermal_schedule_work(target, &pkgdev->work);
++ if (!lastcpu && zonedev->work_scheduled)
++ pkg_thermal_schedule_work(target, &zonedev->work);
+ }
+
+ spin_unlock_irq(&pkg_temp_lock);
+
+ /* Final cleanup if this is the last cpu */
+ if (lastcpu)
+- kfree(pkgdev);
++ kfree(zonedev);
+ return 0;
+ }
+
+ static int pkg_thermal_cpu_online(unsigned int cpu)
+ {
+- struct pkg_device *pkgdev = pkg_temp_thermal_get_dev(cpu);
++ struct zone_device *zonedev = pkg_temp_thermal_get_dev(cpu);
+ struct cpuinfo_x86 *c = &cpu_data(cpu);
+
+ /* Paranoia check */
+@@ -495,8 +497,8 @@ static int pkg_thermal_cpu_online(unsign
+ return -ENODEV;
+
+ /* If the package exists, nothing to do */
+- if (pkgdev) {
+- cpumask_set_cpu(cpu, &pkgdev->cpumask);
++ if (zonedev) {
++ cpumask_set_cpu(cpu, &zonedev->cpumask);
+ return 0;
+ }
+ return pkg_temp_thermal_device_add(cpu);
+@@ -515,9 +517,9 @@ static int __init pkg_temp_thermal_init(
+ if (!x86_match_cpu(pkg_temp_thermal_ids))
+ return -ENODEV;
+
+- max_packages = topology_max_packages() * topology_max_die_per_package();
+- packages = kzalloc(max_packages * sizeof(struct pkg_device *), GFP_KERNEL);
+- if (!packages)
++ max_id = topology_max_packages() * topology_max_die_per_package();
++ zones = kcalloc(max_id, sizeof(struct zone_device *), GFP_KERNEL);
++ if (!zones)
+ return -ENOMEM;
+
+ ret = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, "thermal/x86_pkg:online",
+@@ -536,7 +538,7 @@ static int __init pkg_temp_thermal_init(
+ return 0;
+
+ err:
+- kfree(packages);
++ kfree(zones);
+ return ret;
+ }
+ module_init(pkg_temp_thermal_init)
+@@ -548,7 +550,7 @@ static void __exit pkg_temp_thermal_exit
+
+ cpuhp_remove_state(pkg_thermal_hp_state);
+ debugfs_remove_recursive(debugfs);
+- kfree(packages);
++ kfree(zones);
+ }
+ module_exit(pkg_temp_thermal_exit)
+
diff --git a/patches.suse/thermal-x86_pkg_temp_thermal-Support-multi-die-packa.patch b/patches.suse/thermal-x86_pkg_temp_thermal-Support-multi-die-packa.patch
new file mode 100644
index 0000000000..97439dab6c
--- /dev/null
+++ b/patches.suse/thermal-x86_pkg_temp_thermal-Support-multi-die-packa.patch
@@ -0,0 +1,64 @@
+From: Zhang Rui <rui.zhang@intel.com>
+Date: Mon, 13 May 2019 13:58:52 -0400
+Subject: thermal/x86_pkg_temp_thermal: Support multi-die/package
+Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
+Git-commit: 724adec33c2491f26f739f285ddca25fca226e48
+Patch-mainline: Queued in subsystem maintainer repository
+References: jsc#SLE-5454
+
+Package temperature sensors are actually implemented in hardware per-die.
+Thus, the new multi-die/package systems sport mulitple package thermal
+zones for each package.
+
+Update the x86_pkg_temp_thermal to be "multi-die-aware", so it can expose
+multiple zones per package, instead of just one.
+
+Signed-off-by: Zhang Rui <rui.zhang@intel.com>
+Signed-off-by: Len Brown <len.brown@intel.com>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Reviewed-by: Ingo Molnar <mingo@kernel.org>
+Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Link: https://lkml.kernel.org/r/281695c854d38d3bdec803480c3049c36198ca44.1557769318.git.len.brown@intel.com
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ drivers/thermal/x86_pkg_temp_thermal.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/drivers/thermal/x86_pkg_temp_thermal.c
++++ b/drivers/thermal/x86_pkg_temp_thermal.c
+@@ -122,7 +122,7 @@ err_out:
+ */
+ static struct pkg_device *pkg_temp_thermal_get_dev(unsigned int cpu)
+ {
+- int pkgid = topology_logical_package_id(cpu);
++ int pkgid = topology_logical_die_id(cpu);
+
+ if (pkgid >= 0 && pkgid < max_packages)
+ return packages[pkgid];
+@@ -353,7 +353,7 @@ static int pkg_thermal_notify(u64 msr_va
+
+ static int pkg_temp_thermal_device_add(unsigned int cpu)
+ {
+- int pkgid = topology_logical_package_id(cpu);
++ int pkgid = topology_logical_die_id(cpu);
+ u32 tj_max, eax, ebx, ecx, edx;
+ struct pkg_device *pkgdev;
+ int thres_count, err;
+@@ -449,7 +449,7 @@ static int pkg_thermal_cpu_offline(unsig
+ * worker will see the package anymore.
+ */
+ if (lastcpu) {
+- packages[topology_logical_package_id(cpu)] = NULL;
++ packages[topology_logical_die_id(cpu)] = NULL;
+ /* After this point nothing touches the MSR anymore. */
+ wrmsr(MSR_IA32_PACKAGE_THERM_INTERRUPT,
+ pkgdev->msr_pkg_therm_low, pkgdev->msr_pkg_therm_high);
+@@ -515,7 +515,7 @@ static int __init pkg_temp_thermal_init(
+ if (!x86_match_cpu(pkg_temp_thermal_ids))
+ return -ENODEV;
+
+- max_packages = topology_max_packages();
++ max_packages = topology_max_packages() * topology_max_die_per_package();
+ packages = kzalloc(max_packages * sizeof(struct pkg_device *), GFP_KERNEL);
+ if (!packages)
+ return -ENOMEM;
diff --git a/patches.suse/topology-Create-core_cpus-and-die_cpus-sysfs-attribu.patch b/patches.suse/topology-Create-core_cpus-and-die_cpus-sysfs-attribu.patch
new file mode 100644
index 0000000000..6d43ecc9af
--- /dev/null
+++ b/patches.suse/topology-Create-core_cpus-and-die_cpus-sysfs-attribu.patch
@@ -0,0 +1,240 @@
+From: Len Brown <len.brown@intel.com>
+Date: Mon, 13 May 2019 13:58:56 -0400
+Subject: topology: Create core_cpus and die_cpus sysfs attributes
+Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
+Git-commit: 2e4c54dac7b360c3820399bdf06cde9134a4495b
+Patch-mainline: Queued in subsystem maintainer repository
+References: jsc#SLE-5454
+
+Create CPU topology sysfs attributes: "core_cpus" and "core_cpus_list"
+
+These attributes represent all of the logical CPUs that share the
+same core.
+
+These attriutes is synonymous with the existing "thread_siblings" and
+"thread_siblings_list" attribute, which will be deprecated.
+
+Create CPU topology sysfs attributes: "die_cpus" and "die_cpus_list".
+These attributes represent all of the logical CPUs that share the
+same die.
+
+Suggested-by: Brice Goglin <Brice.Goglin@inria.fr>
+Signed-off-by: Len Brown <len.brown@intel.com>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Reviewed-by: Ingo Molnar <mingo@kernel.org>
+Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Link: https://lkml.kernel.org/r/071c23a298cd27ede6ed0b6460cae190d193364f.1557769318.git.len.brown@intel.com
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ Documentation/cputopology.txt | 21 +++++++++++++++------
+ arch/x86/include/asm/smp.h | 1 +
+ arch/x86/include/asm/topology.h | 1 +
+ arch/x86/kernel/smpboot.c | 22 ++++++++++++++++++++++
+ arch/x86/xen/smp_pv.c | 1 +
+ drivers/base/topology.c | 12 ++++++++++++
+ include/linux/topology.h | 3 +++
+ 7 files changed, 55 insertions(+), 6 deletions(-)
+
+--- a/Documentation/cputopology.txt
++++ b/Documentation/cputopology.txt
+@@ -32,15 +32,15 @@ die_id:
+ identifier (rather than the kernel's). The actual value is
+ architecture and platform dependent.
+
+-5) /sys/devices/system/cpu/cpuX/topology/thread_siblings:
++core_cpus:
+
+- internal kernel map of cpuX's hardware threads within the same
+- core as cpuX.
++ internal kernel map of CPUs within the same core.
++ (deprecated name: "thread_siblings")
+
+-6) /sys/devices/system/cpu/cpuX/topology/thread_siblings_list:
++core_cpus_list:
+
+- human-readable list of cpuX's hardware threads within the same
+- core as cpuX.
++ human-readable list of CPUs within the same core.
++ (deprecated name: "thread_siblings_list");
+
+ package_cpus:
+
+@@ -52,6 +52,14 @@ package_cpus_list:
+ human-readable list of CPUs sharing the same physical_package_id.
+ (deprecated name: "core_siblings_list")
+
++die_cpus:
++
++ internal kernel map of CPUs within the same die.
++
++die_cpus_list:
++
++ human-readable list of CPUs within the same die.
++
+ 9) /sys/devices/system/cpu/cpuX/topology/book_siblings:
+
+ internal kernel map of cpuX's hardware threads within the same
+@@ -89,6 +97,7 @@ these macros in include/asm-XXX/topology
+ #define topology_drawer_id(cpu)
+ #define topology_sibling_cpumask(cpu)
+ #define topology_core_cpumask(cpu)
++#define topology_die_cpumask(cpu)
+ #define topology_book_cpumask(cpu)
+ #define topology_drawer_cpumask(cpu)
+
+--- a/arch/x86/include/asm/smp.h
++++ b/arch/x86/include/asm/smp.h
+@@ -22,6 +22,7 @@ extern unsigned int num_processors;
+
+ DECLARE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_sibling_map);
+ DECLARE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_core_map);
++DECLARE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_die_map);
+ /* cpus sharing the last level cache: */
+ DECLARE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_llc_shared_map);
+ DECLARE_PER_CPU_READ_MOSTLY(u16, cpu_llc_id);
+--- a/arch/x86/include/asm/topology.h
++++ b/arch/x86/include/asm/topology.h
+@@ -117,6 +117,7 @@ extern const struct cpumask *cpu_coregro
+ #define topology_core_id(cpu) (cpu_data(cpu).cpu_core_id)
+
+ #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))
+ #define topology_sibling_cpumask(cpu) (per_cpu(cpu_sibling_map, cpu))
+
+--- a/arch/x86/kernel/smpboot.c
++++ b/arch/x86/kernel/smpboot.c
+@@ -89,6 +89,10 @@ EXPORT_PER_CPU_SYMBOL(cpu_sibling_map);
+ DEFINE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_core_map);
+ EXPORT_PER_CPU_SYMBOL(cpu_core_map);
+
++/* representing HT, core, and die siblings of each logical CPU */
++DEFINE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_die_map);
++EXPORT_PER_CPU_SYMBOL(cpu_die_map);
++
+ DEFINE_PER_CPU_READ_MOSTLY(cpumask_var_t, cpu_llc_shared_map);
+
+ /* Per CPU bogomips and other parameters */
+@@ -512,6 +516,15 @@ static bool match_pkg(struct cpuinfo_x86
+ return false;
+ }
+
++static bool match_die(struct cpuinfo_x86 *c, struct cpuinfo_x86 *o)
++{
++ if ((c->phys_proc_id == o->phys_proc_id) &&
++ (c->cpu_die_id == o->cpu_die_id))
++ return true;
++ return false;
++}
++
++
+ #if defined(CONFIG_SCHED_SMT) || defined(CONFIG_SCHED_MC)
+ static inline int x86_sched_itmt_flags(void)
+ {
+@@ -574,6 +587,7 @@ void set_cpu_sibling_map(int cpu)
+ cpumask_set_cpu(cpu, topology_sibling_cpumask(cpu));
+ cpumask_set_cpu(cpu, cpu_llc_shared_mask(cpu));
+ cpumask_set_cpu(cpu, topology_core_cpumask(cpu));
++ cpumask_set_cpu(cpu, topology_die_cpumask(cpu));
+ c->booted_cores = 1;
+ return;
+ }
+@@ -622,6 +636,9 @@ void set_cpu_sibling_map(int cpu)
+ }
+ if (match_pkg(c, o) && !topology_same_node(c, o))
+ x86_has_numa_in_package = true;
++
++ if ((i == cpu) || (has_mp && match_die(c, o)))
++ link_mask(topology_die_cpumask, cpu, i);
+ }
+
+ threads = cpumask_weight(topology_sibling_cpumask(cpu));
+@@ -1213,6 +1230,7 @@ static __init void disable_smp(void)
+ physid_set_mask_of_physid(0, &phys_cpu_present_map);
+ cpumask_set_cpu(0, topology_sibling_cpumask(0));
+ cpumask_set_cpu(0, topology_core_cpumask(0));
++ cpumask_set_cpu(0, topology_die_cpumask(0));
+ }
+
+ enum {
+@@ -1339,6 +1357,7 @@ void __init native_smp_prepare_cpus(unsi
+ for_each_possible_cpu(i) {
+ zalloc_cpumask_var(&per_cpu(cpu_sibling_map, i), GFP_KERNEL);
+ zalloc_cpumask_var(&per_cpu(cpu_core_map, i), GFP_KERNEL);
++ zalloc_cpumask_var(&per_cpu(cpu_die_map, i), GFP_KERNEL);
+ zalloc_cpumask_var(&per_cpu(cpu_llc_shared_map, i), GFP_KERNEL);
+ }
+
+@@ -1562,6 +1581,8 @@ static void remove_siblinginfo(int cpu)
+ cpu_data(sibling).booted_cores--;
+ }
+
++ for_each_cpu(sibling, topology_die_cpumask(cpu))
++ cpumask_clear_cpu(cpu, topology_die_cpumask(sibling));
+ for_each_cpu(sibling, topology_sibling_cpumask(cpu))
+ cpumask_clear_cpu(cpu, topology_sibling_cpumask(sibling));
+ for_each_cpu(sibling, cpu_llc_shared_mask(cpu))
+@@ -1569,6 +1590,7 @@ static void remove_siblinginfo(int cpu)
+ cpumask_clear(cpu_llc_shared_mask(cpu));
+ cpumask_clear(topology_sibling_cpumask(cpu));
+ cpumask_clear(topology_core_cpumask(cpu));
++ cpumask_clear(topology_die_cpumask(cpu));
+ c->cpu_core_id = 0;
+ c->booted_cores = 0;
+ cpumask_clear_cpu(cpu, cpu_sibling_setup_mask);
+--- a/arch/x86/xen/smp_pv.c
++++ b/arch/x86/xen/smp_pv.c
+@@ -248,6 +248,7 @@ static void __init xen_pv_smp_prepare_cp
+ for_each_possible_cpu(i) {
+ zalloc_cpumask_var(&per_cpu(cpu_sibling_map, i), GFP_KERNEL);
+ zalloc_cpumask_var(&per_cpu(cpu_core_map, i), GFP_KERNEL);
++ zalloc_cpumask_var(&per_cpu(cpu_die_map, i), GFP_KERNEL);
+ zalloc_cpumask_var(&per_cpu(cpu_llc_shared_map, i), GFP_KERNEL);
+ }
+ set_cpu_sibling_map(0);
+--- a/drivers/base/topology.c
++++ b/drivers/base/topology.c
+@@ -68,10 +68,18 @@ define_siblings_show_func(thread_sibling
+ static DEVICE_ATTR_RO(thread_siblings);
+ static DEVICE_ATTR_RO(thread_siblings_list);
+
++define_siblings_show_func(core_cpus, sibling_cpumask);
++static DEVICE_ATTR_RO(core_cpus);
++static DEVICE_ATTR_RO(core_cpus_list);
++
+ define_siblings_show_func(core_siblings, core_cpumask);
+ static DEVICE_ATTR_RO(core_siblings);
+ static DEVICE_ATTR_RO(core_siblings_list);
+
++define_siblings_show_func(die_cpus, die_cpumask);
++static DEVICE_ATTR_RO(die_cpus);
++static DEVICE_ATTR_RO(die_cpus_list);
++
+ define_siblings_show_func(package_cpus, core_cpumask);
+ static DEVICE_ATTR_RO(package_cpus);
+ static DEVICE_ATTR_RO(package_cpus_list);
+@@ -98,8 +106,12 @@ static struct attribute *default_attrs[]
+ &dev_attr_core_id.attr,
+ &dev_attr_thread_siblings.attr,
+ &dev_attr_thread_siblings_list.attr,
++ &dev_attr_core_cpus.attr,
++ &dev_attr_core_cpus_list.attr,
+ &dev_attr_core_siblings.attr,
+ &dev_attr_core_siblings_list.attr,
++ &dev_attr_die_cpus.attr,
++ &dev_attr_die_cpus_list.attr,
+ &dev_attr_package_cpus.attr,
+ &dev_attr_package_cpus_list.attr,
+ #ifdef CONFIG_SCHED_BOOK
+--- a/include/linux/topology.h
++++ b/include/linux/topology.h
+@@ -196,6 +196,9 @@ static inline int cpu_to_mem(int cpu)
+ #ifndef topology_core_cpumask
+ #define topology_core_cpumask(cpu) cpumask_of(cpu)
+ #endif
++#ifndef topology_die_cpumask
++#define topology_die_cpumask(cpu) cpumask_of(cpu)
++#endif
+
+ #ifdef CONFIG_SCHED_SMT
+ static inline const struct cpumask *cpu_smt_mask(int cpu)
diff --git a/patches.suse/topology-Create-package_cpus-sysfs-attribute.patch b/patches.suse/topology-Create-package_cpus-sysfs-attribute.patch
new file mode 100644
index 0000000000..e1dec6313a
--- /dev/null
+++ b/patches.suse/topology-Create-package_cpus-sysfs-attribute.patch
@@ -0,0 +1,81 @@
+From: Len Brown <len.brown@intel.com>
+Date: Mon, 13 May 2019 13:58:55 -0400
+Subject: topology: Create package_cpus sysfs attribute
+Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
+Git-commit: b73ed8dc0597c11ec5064d06b9bbd4e541b6d4e7
+Patch-mainline: Queued in subsystem maintainer repository
+References: jsc#SLE-5454
+
+The existing sysfs cpu/topology/core_siblings (and core_siblings_list)
+attributes are documented, implemented, and used by programs to represent
+set of logical CPUs sharing the same package.
+
+This makes sense if the next topology level above a core is always a
+package. But on systems where there is a die topology level between a core
+and a package, the name and its definition become inconsistent.
+
+So without changing its function, add a name for this map that describes
+what it actually is -- package CPUs -- the set of CPUs that share the same
+package.
+
+This new name will be immune to changes in topology, since it describes
+threads at the current level, not siblings at a contained level.
+
+Suggested-by: Brice Goglin <Brice.Goglin@inria.fr>
+Signed-off-by: Len Brown <len.brown@intel.com>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Reviewed-by: Ingo Molnar <mingo@kernel.org>
+Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Link: https://lkml.kernel.org/r/d9d3228b82fb5665e6f93a0ccd033fe022558521.1557769318.git.len.brown@intel.com
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ Documentation/cputopology.txt | 12 ++++++------
+ drivers/base/topology.c | 6 ++++++
+ 2 files changed, 12 insertions(+), 6 deletions(-)
+
+--- a/Documentation/cputopology.txt
++++ b/Documentation/cputopology.txt
+@@ -42,15 +42,15 @@ die_id:
+ human-readable list of cpuX's hardware threads within the same
+ core as cpuX.
+
+-7) /sys/devices/system/cpu/cpuX/topology/core_siblings:
++package_cpus:
+
+- internal kernel map of cpuX's hardware threads within the same
+- physical_package_id.
++ internal kernel map of the CPUs sharing the same physical_package_id.
++ (deprecated name: "core_siblings")
+
+-8) /sys/devices/system/cpu/cpuX/topology/core_siblings_list:
++package_cpus_list:
+
+- human-readable list of cpuX's hardware threads within the same
+- physical_package_id.
++ human-readable list of CPUs sharing the same physical_package_id.
++ (deprecated name: "core_siblings_list")
+
+ 9) /sys/devices/system/cpu/cpuX/topology/book_siblings:
+
+--- a/drivers/base/topology.c
++++ b/drivers/base/topology.c
+@@ -72,6 +72,10 @@ define_siblings_show_func(core_siblings,
+ static DEVICE_ATTR_RO(core_siblings);
+ static DEVICE_ATTR_RO(core_siblings_list);
+
++define_siblings_show_func(package_cpus, core_cpumask);
++static DEVICE_ATTR_RO(package_cpus);
++static DEVICE_ATTR_RO(package_cpus_list);
++
+ #ifdef CONFIG_SCHED_BOOK
+ define_id_show_func(book_id);
+ static DEVICE_ATTR_RO(book_id);
+@@ -96,6 +100,8 @@ static struct attribute *default_attrs[]
+ &dev_attr_thread_siblings_list.attr,
+ &dev_attr_core_siblings.attr,
+ &dev_attr_core_siblings_list.attr,
++ &dev_attr_package_cpus.attr,
++ &dev_attr_package_cpus_list.attr,
+ #ifdef CONFIG_SCHED_BOOK
+ &dev_attr_book_id.attr,
+ &dev_attr_book_siblings.attr,
diff --git a/patches.suse/x86-cpufeatures-Carve-out-CQM-features-retrieval.patch b/patches.suse/x86-cpufeatures-Carve-out-CQM-features-retrieval.patch
new file mode 100644
index 0000000000..f09ff655f4
--- /dev/null
+++ b/patches.suse/x86-cpufeatures-Carve-out-CQM-features-retrieval.patch
@@ -0,0 +1,105 @@
+From: Borislav Petkov <bp@suse.de>
+Date: Wed, 19 Jun 2019 17:24:34 +0200
+Subject: x86/cpufeatures: Carve out CQM features retrieval
+Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git#x86/cpu
+Git-commit: 45fc56e629caa451467e7664fbd4c797c434a6c4
+Patch-mainline: Queued in subsystem maintainer repository
+References: jsc#SLE-5382
+
+... into a separate function for better readability. Split out from a
+patch from Fenghua Yu <fenghua.yu@intel.com> to keep the mechanical,
+sole code movement separate for easy review.
+
+No functional changes.
+
+Signed-off-by: Borislav Petkov <bp@suse.de>
+Cc: Fenghua Yu <fenghua.yu@intel.com>
+Cc: x86@kernel.org
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ arch/x86/kernel/cpu/common.c | 60 +++++++++++++++++++++++--------------------
+ 1 file changed, 33 insertions(+), 27 deletions(-)
+
+--- a/arch/x86/kernel/cpu/common.c
++++ b/arch/x86/kernel/cpu/common.c
+@@ -768,6 +768,38 @@ static void init_speculation_control(str
+ }
+ }
+
++static void init_cqm(struct cpuinfo_x86 *c)
++{
++ u32 eax, ebx, ecx, edx;
++
++ /* Additional Intel-defined flags: level 0x0000000F */
++ if (c->cpuid_level >= 0x0000000F) {
++
++ /* QoS sub-leaf, EAX=0Fh, ECX=0 */
++ cpuid_count(0x0000000F, 0, &eax, &ebx, &ecx, &edx);
++ c->x86_capability[CPUID_F_0_EDX] = edx;
++
++ if (cpu_has(c, X86_FEATURE_CQM_LLC)) {
++ /* will be overridden if occupancy monitoring exists */
++ c->x86_cache_max_rmid = ebx;
++
++ /* QoS sub-leaf, EAX=0Fh, ECX=1 */
++ cpuid_count(0x0000000F, 1, &eax, &ebx, &ecx, &edx);
++ c->x86_capability[CPUID_F_1_EDX] = edx;
++
++ if ((cpu_has(c, X86_FEATURE_CQM_OCCUP_LLC)) ||
++ ((cpu_has(c, X86_FEATURE_CQM_MBM_TOTAL)) ||
++ (cpu_has(c, X86_FEATURE_CQM_MBM_LOCAL)))) {
++ c->x86_cache_max_rmid = ecx;
++ c->x86_cache_occ_scale = ebx;
++ }
++ } else {
++ c->x86_cache_max_rmid = -1;
++ c->x86_cache_occ_scale = -1;
++ }
++ }
++}
++
+ void get_cpu_cap(struct cpuinfo_x86 *c)
+ {
+ u32 eax, ebx, ecx, edx;
+@@ -799,33 +831,6 @@ void get_cpu_cap(struct cpuinfo_x86 *c)
+ c->x86_capability[CPUID_D_1_EAX] = eax;
+ }
+
+- /* Additional Intel-defined flags: level 0x0000000F */
+- if (c->cpuid_level >= 0x0000000F) {
+-
+- /* QoS sub-leaf, EAX=0Fh, ECX=0 */
+- cpuid_count(0x0000000F, 0, &eax, &ebx, &ecx, &edx);
+- c->x86_capability[CPUID_F_0_EDX] = edx;
+-
+- if (cpu_has(c, X86_FEATURE_CQM_LLC)) {
+- /* will be overridden if occupancy monitoring exists */
+- c->x86_cache_max_rmid = ebx;
+-
+- /* QoS sub-leaf, EAX=0Fh, ECX=1 */
+- cpuid_count(0x0000000F, 1, &eax, &ebx, &ecx, &edx);
+- c->x86_capability[CPUID_F_1_EDX] = edx;
+-
+- if ((cpu_has(c, X86_FEATURE_CQM_OCCUP_LLC)) ||
+- ((cpu_has(c, X86_FEATURE_CQM_MBM_TOTAL)) ||
+- (cpu_has(c, X86_FEATURE_CQM_MBM_LOCAL)))) {
+- c->x86_cache_max_rmid = ecx;
+- c->x86_cache_occ_scale = ebx;
+- }
+- } else {
+- c->x86_cache_max_rmid = -1;
+- c->x86_cache_occ_scale = -1;
+- }
+- }
+-
+ /* AMD-defined flags: level 0x80000001 */
+ eax = cpuid_eax(0x80000000);
+ c->extended_cpuid_level = eax;
+@@ -863,6 +868,7 @@ void get_cpu_cap(struct cpuinfo_x86 *c)
+
+ init_scattered_cpuid_features(c);
+ init_speculation_control(c);
++ init_cqm(c);
+
+ /*
+ * Clear/Set all flags overridden by options, after probe.
diff --git a/patches.suse/x86-cpufeatures-Combine-word-11-and-12-into-a-new-sc.patch b/patches.suse/x86-cpufeatures-Combine-word-11-and-12-into-a-new-sc.patch
new file mode 100644
index 0000000000..537db91873
--- /dev/null
+++ b/patches.suse/x86-cpufeatures-Combine-word-11-and-12-into-a-new-sc.patch
@@ -0,0 +1,198 @@
+From: Fenghua Yu <fenghua.yu@intel.com>
+Date: Wed, 19 Jun 2019 18:51:09 +0200
+Subject: x86/cpufeatures: Combine word 11 and 12 into a new scattered features
+ word
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git#x86/cpu
+Git-commit: acec0ce081de0c36459eea91647faf99296445a3
+Patch-mainline: Queued in subsystem maintainer repository
+References: jsc#SLE-5382
+
+It's a waste for the four X86_FEATURE_CQM_* feature bits to occupy two
+whole feature bits words. To better utilize feature words, re-define
+word 11 to host scattered features and move the four X86_FEATURE_CQM_*
+features into Linux defined word 11. More scattered features can be
+added in word 11 in the future.
+
+Rename leaf 11 in cpuid_leafs to CPUID_LNX_4 to reflect it's a
+Linux-defined leaf.
+
+Rename leaf 12 as CPUID_DUMMY which will be replaced by a meaningful
+name in the next patch when CPUID.7.1:EAX occupies world 12.
+
+Maximum number of RMID and cache occupancy scale are retrieved from
+CPUID.0xf.1 after scattered CQM features are enumerated. Carve out the
+code into a separate function.
+
+KVM doesn't support resctrl now. So it's safe to move the
+X86_FEATURE_CQM_* features to scattered features word 11 for KVM.
+
+Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
+Signed-off-by: Borislav Petkov <bp@suse.de>
+Cc: Aaron Lewis <aaronlewis@google.com>
+Cc: Andy Lutomirski <luto@kernel.org>
+Cc: Babu Moger <babu.moger@amd.com>
+Cc: "Chang S. Bae" <chang.seok.bae@intel.com>
+Cc: "Sean J Christopherson" <sean.j.christopherson@intel.com>
+Cc: Frederic Weisbecker <frederic@kernel.org>
+Cc: "H. Peter Anvin" <hpa@zytor.com>
+Cc: Ingo Molnar <mingo@redhat.com>
+Cc: Jann Horn <jannh@google.com>
+Cc: Juergen Gross <jgross@suse.com>
+Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
+Cc: kvm ML <kvm@vger.kernel.org>
+Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
+Cc: Masami Hiramatsu <mhiramat@kernel.org>
+Cc: Nadav Amit <namit@vmware.com>
+Cc: Paolo Bonzini <pbonzini@redhat.com>
+Cc: Pavel Tatashin <pasha.tatashin@oracle.com>
+Cc: Peter Feiner <pfeiner@google.com>
+Cc: "Peter Zijlstra (Intel)" <peterz@infradead.org>
+Cc: "Radim Krčmář" <rkrcmar@redhat.com>
+Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
+Cc: Ravi V Shankar <ravi.v.shankar@intel.com>
+Cc: Sherry Hurwitz <sherry.hurwitz@amd.com>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Cc: Thomas Lendacky <Thomas.Lendacky@amd.com>
+Cc: x86 <x86@kernel.org>
+Link: https://lkml.kernel.org/r/1560794416-217638-2-git-send-email-fenghua.yu@intel.com
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ arch/x86/include/asm/cpufeature.h | 4 +--
+ arch/x86/include/asm/cpufeatures.h | 17 ++++++++------
+ arch/x86/kernel/cpu/common.c | 42 ++++++++++++++-----------------------
+ arch/x86/kernel/cpu/cpuid-deps.c | 3 ++
+ arch/x86/kernel/cpu/scattered.c | 4 +++
+ arch/x86/kvm/cpuid.h | 2 -
+ 6 files changed, 36 insertions(+), 36 deletions(-)
+
+--- a/arch/x86/include/asm/cpufeature.h
++++ b/arch/x86/include/asm/cpufeature.h
+@@ -21,8 +21,8 @@ enum cpuid_leafs
+ CPUID_LNX_3,
+ CPUID_7_0_EBX,
+ CPUID_D_1_EAX,
+- CPUID_F_0_EDX,
+- CPUID_F_1_EDX,
++ CPUID_LNX_4,
++ CPUID_DUMMY,
+ CPUID_8000_0008_EBX,
+ CPUID_6_EAX,
+ CPUID_8000_000A_EDX,
+--- a/arch/x86/include/asm/cpufeatures.h
++++ b/arch/x86/include/asm/cpufeatures.h
+@@ -270,13 +270,16 @@
+ #define X86_FEATURE_XGETBV1 (10*32+ 2) /* XGETBV with ECX = 1 */
+ #define X86_FEATURE_XSAVES (10*32+ 3) /* XSAVES/XRSTORS */
+
+-/* Intel-defined CPU QoS Sub-leaf, CPUID level 0x0000000F:0 (edx), word 11 */
+-#define X86_FEATURE_CQM_LLC (11*32+ 1) /* LLC QoS if 1 */
+-
+-/* Intel-defined CPU QoS Sub-leaf, CPUID level 0x0000000F:1 (edx), word 12 */
+-#define X86_FEATURE_CQM_OCCUP_LLC (12*32+ 0) /* LLC occupancy monitoring if 1 */
+-#define X86_FEATURE_CQM_MBM_TOTAL (12*32+ 1) /* LLC Total MBM monitoring */
+-#define X86_FEATURE_CQM_MBM_LOCAL (12*32+ 2) /* LLC Local MBM monitoring */
++/*
++ * Extended auxiliary flags: Linux defined - for features scattered in various
++ * CPUID levels like 0xf, etc.
++ *
++ * Reuse free bits when adding new feature flags!
++ */
++#define X86_FEATURE_CQM_LLC (11*32+ 0) /* LLC QoS if 1 */
++#define X86_FEATURE_CQM_OCCUP_LLC (11*32+ 1) /* LLC occupancy monitoring */
++#define X86_FEATURE_CQM_MBM_TOTAL (11*32+ 2) /* LLC Total MBM monitoring */
++#define X86_FEATURE_CQM_MBM_LOCAL (11*32+ 3) /* LLC Local MBM monitoring */
+
+ /* AMD-defined CPU features, CPUID level 0x80000008 (ebx), word 13 */
+ #define X86_FEATURE_CLZERO (13*32+0) /* CLZERO instruction */
+--- a/arch/x86/kernel/cpu/common.c
++++ b/arch/x86/kernel/cpu/common.c
+@@ -770,33 +770,25 @@ static void init_speculation_control(str
+
+ static void init_cqm(struct cpuinfo_x86 *c)
+ {
+- u32 eax, ebx, ecx, edx;
++ if (!cpu_has(c, X86_FEATURE_CQM_LLC)) {
++ c->x86_cache_max_rmid = -1;
++ c->x86_cache_occ_scale = -1;
++ return;
++ }
++
++ /* will be overridden if occupancy monitoring exists */
++ c->x86_cache_max_rmid = cpuid_ebx(0xf);
++
++ if (cpu_has(c, X86_FEATURE_CQM_OCCUP_LLC) ||
++ cpu_has(c, X86_FEATURE_CQM_MBM_TOTAL) ||
++ cpu_has(c, X86_FEATURE_CQM_MBM_LOCAL)) {
++ u32 eax, ebx, ecx, edx;
+
+- /* Additional Intel-defined flags: level 0x0000000F */
+- if (c->cpuid_level >= 0x0000000F) {
++ /* QoS sub-leaf, EAX=0Fh, ECX=1 */
++ cpuid_count(0xf, 1, &eax, &ebx, &ecx, &edx);
+
+- /* QoS sub-leaf, EAX=0Fh, ECX=0 */
+- cpuid_count(0x0000000F, 0, &eax, &ebx, &ecx, &edx);
+- c->x86_capability[CPUID_F_0_EDX] = edx;
+-
+- if (cpu_has(c, X86_FEATURE_CQM_LLC)) {
+- /* will be overridden if occupancy monitoring exists */
+- c->x86_cache_max_rmid = ebx;
+-
+- /* QoS sub-leaf, EAX=0Fh, ECX=1 */
+- cpuid_count(0x0000000F, 1, &eax, &ebx, &ecx, &edx);
+- c->x86_capability[CPUID_F_1_EDX] = edx;
+-
+- if ((cpu_has(c, X86_FEATURE_CQM_OCCUP_LLC)) ||
+- ((cpu_has(c, X86_FEATURE_CQM_MBM_TOTAL)) ||
+- (cpu_has(c, X86_FEATURE_CQM_MBM_LOCAL)))) {
+- c->x86_cache_max_rmid = ecx;
+- c->x86_cache_occ_scale = ebx;
+- }
+- } else {
+- c->x86_cache_max_rmid = -1;
+- c->x86_cache_occ_scale = -1;
+- }
++ c->x86_cache_max_rmid = ecx;
++ c->x86_cache_occ_scale = ebx;
+ }
+ }
+
+--- a/arch/x86/kernel/cpu/cpuid-deps.c
++++ b/arch/x86/kernel/cpu/cpuid-deps.c
+@@ -59,6 +59,9 @@ const static struct cpuid_dep cpuid_deps
+ { X86_FEATURE_AVX512_4VNNIW, X86_FEATURE_AVX512F },
+ { X86_FEATURE_AVX512_4FMAPS, X86_FEATURE_AVX512F },
+ { X86_FEATURE_AVX512_VPOPCNTDQ, X86_FEATURE_AVX512F },
++ { X86_FEATURE_CQM_OCCUP_LLC, X86_FEATURE_CQM_LLC },
++ { X86_FEATURE_CQM_MBM_TOTAL, X86_FEATURE_CQM_LLC },
++ { X86_FEATURE_CQM_MBM_LOCAL, X86_FEATURE_CQM_LLC },
+ {}
+ };
+
+--- a/arch/x86/kernel/cpu/scattered.c
++++ b/arch/x86/kernel/cpu/scattered.c
+@@ -21,6 +21,10 @@ struct cpuid_bit {
+ static const struct cpuid_bit cpuid_bits[] = {
+ { X86_FEATURE_APERFMPERF, CPUID_ECX, 0, 0x00000006, 0 },
+ { X86_FEATURE_EPB, CPUID_ECX, 3, 0x00000006, 0 },
++ { X86_FEATURE_CQM_LLC, CPUID_EDX, 1, 0x0000000f, 0 },
++ { X86_FEATURE_CQM_OCCUP_LLC, CPUID_EDX, 0, 0x0000000f, 1 },
++ { X86_FEATURE_CQM_MBM_TOTAL, CPUID_EDX, 1, 0x0000000f, 1 },
++ { X86_FEATURE_CQM_MBM_LOCAL, CPUID_EDX, 2, 0x0000000f, 1 },
+ { X86_FEATURE_CAT_L3, CPUID_EBX, 1, 0x00000010, 0 },
+ { X86_FEATURE_CAT_L2, CPUID_EBX, 2, 0x00000010, 0 },
+ { X86_FEATURE_CDP_L3, CPUID_ECX, 2, 0x00000010, 1 },
+--- a/arch/x86/kvm/cpuid.h
++++ b/arch/x86/kvm/cpuid.h
+@@ -46,8 +46,6 @@ static const struct cpuid_reg reverse_cp
+ [CPUID_8000_0001_ECX] = {0x80000001, 0, CPUID_ECX},
+ [CPUID_7_0_EBX] = { 7, 0, CPUID_EBX},
+ [CPUID_D_1_EAX] = { 0xd, 1, CPUID_EAX},
+- [CPUID_F_0_EDX] = { 0xf, 0, CPUID_EDX},
+- [CPUID_F_1_EDX] = { 0xf, 1, CPUID_EDX},
+ [CPUID_8000_0008_EBX] = {0x80000008, 0, CPUID_EBX},
+ [CPUID_6_EAX] = { 6, 0, CPUID_EAX},
+ [CPUID_8000_000A_EDX] = {0x8000000a, 0, CPUID_EDX},
diff --git a/patches.suse/x86-cpufeatures-Enumerate-the-new-AVX512-BFLOAT16-in.patch b/patches.suse/x86-cpufeatures-Enumerate-the-new-AVX512-BFLOAT16-in.patch
new file mode 100644
index 0000000000..37ef2ab272
--- /dev/null
+++ b/patches.suse/x86-cpufeatures-Enumerate-the-new-AVX512-BFLOAT16-in.patch
@@ -0,0 +1,109 @@
+From: Fenghua Yu <fenghua.yu@intel.com>
+Date: Mon, 17 Jun 2019 11:00:16 -0700
+Subject: x86/cpufeatures: Enumerate the new AVX512 BFLOAT16 instructions
+Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git#x86/cpu
+Git-commit: b302e4b176d00e1cbc80148c5d0aee36751f7480
+Patch-mainline: Queued in subsystem maintainer repository
+References: jsc#SLE-5382
+
+AVX512 BFLOAT16 instructions support 16-bit BFLOAT16 floating-point
+format (BF16) for deep learning optimization.
+
+BF16 is a short version of 32-bit single-precision floating-point
+format (FP32) and has several advantages over 16-bit half-precision
+floating-point format (FP16). BF16 keeps FP32 accumulation after
+multiplication without loss of precision, offers more than enough
+range for deep learning training tasks, and doesn't need to handle
+hardware exception.
+
+AVX512 BFLOAT16 instructions are enumerated in CPUID.7.1:EAX[bit 5]
+AVX512_BF16.
+
+CPUID.7.1:EAX contains only feature bits. Reuse the currently empty
+word 12 as a pure features word to hold the feature bits including
+AVX512_BF16.
+
+Detailed information of the CPUID bit and AVX512 BFLOAT16 instructions
+can be found in the latest Intel Architecture Instruction Set Extensions
+and Future Features Programming Reference.
+
+ [ bp: Check CPUID(7) subleaf validity before accessing subleaf 1. ]
+
+Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
+Signed-off-by: Borislav Petkov <bp@suse.de>
+Cc: "Chang S. Bae" <chang.seok.bae@intel.com>
+Cc: Frederic Weisbecker <frederic@kernel.org>
+Cc: "H. Peter Anvin" <hpa@zytor.com>
+Cc: Ingo Molnar <mingo@redhat.com>
+Cc: Jann Horn <jannh@google.com>
+Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
+Cc: Michael Ellerman <mpe@ellerman.id.au>
+Cc: Nadav Amit <namit@vmware.com>
+Cc: Paolo Bonzini <pbonzini@redhat.com>
+Cc: Pavel Tatashin <pasha.tatashin@oracle.com>
+Cc: Peter Feiner <pfeiner@google.com>
+Cc: Radim Krcmar <rkrcmar@redhat.com>
+Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
+Cc: "Ravi V Shankar" <ravi.v.shankar@intel.com>
+Cc: Robert Hoo <robert.hu@linux.intel.com>
+Cc: "Sean J Christopherson" <sean.j.christopherson@intel.com>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Cc: Thomas Lendacky <Thomas.Lendacky@amd.com>
+Cc: x86 <x86@kernel.org>
+Link: https://lkml.kernel.org/r/1560794416-217638-3-git-send-email-fenghua.yu@intel.com
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ arch/x86/include/asm/cpufeature.h | 2 +-
+ arch/x86/include/asm/cpufeatures.h | 3 +++
+ arch/x86/kernel/cpu/common.c | 6 ++++++
+ arch/x86/kernel/cpu/cpuid-deps.c | 1 +
+ 4 files changed, 11 insertions(+), 1 deletion(-)
+
+--- a/arch/x86/include/asm/cpufeature.h
++++ b/arch/x86/include/asm/cpufeature.h
+@@ -22,7 +22,7 @@ enum cpuid_leafs
+ CPUID_7_0_EBX,
+ CPUID_D_1_EAX,
+ CPUID_LNX_4,
+- CPUID_DUMMY,
++ CPUID_7_1_EAX,
+ CPUID_8000_0008_EBX,
+ CPUID_6_EAX,
+ CPUID_8000_000A_EDX,
+--- a/arch/x86/include/asm/cpufeatures.h
++++ b/arch/x86/include/asm/cpufeatures.h
+@@ -281,6 +281,9 @@
+ #define X86_FEATURE_CQM_MBM_TOTAL (11*32+ 2) /* LLC Total MBM monitoring */
+ #define X86_FEATURE_CQM_MBM_LOCAL (11*32+ 3) /* LLC Local MBM monitoring */
+
++/* Intel-defined CPU features, CPUID level 0x00000007:1 (EAX), word 12 */
++#define X86_FEATURE_AVX512_BF16 (12*32+ 5) /* AVX512 BFLOAT16 instructions */
++
+ /* AMD-defined CPU features, CPUID level 0x80000008 (ebx), word 13 */
+ #define X86_FEATURE_CLZERO (13*32+0) /* CLZERO instruction */
+ #define X86_FEATURE_IRPERF (13*32+1) /* Instructions Retired Count */
+--- a/arch/x86/kernel/cpu/common.c
++++ b/arch/x86/kernel/cpu/common.c
+@@ -814,6 +814,12 @@ void get_cpu_cap(struct cpuinfo_x86 *c)
+ c->x86_capability[CPUID_7_0_EBX] = ebx;
+ c->x86_capability[CPUID_7_ECX] = ecx;
+ c->x86_capability[CPUID_7_EDX] = edx;
++
++ /* Check valid sub-leaf index before accessing it */
++ if (eax >= 1) {
++ cpuid_count(0x00000007, 1, &eax, &ebx, &ecx, &edx);
++ c->x86_capability[CPUID_7_1_EAX] = eax;
++ }
+ }
+
+ /* Extended state features: level 0x0000000d */
+--- a/arch/x86/kernel/cpu/cpuid-deps.c
++++ b/arch/x86/kernel/cpu/cpuid-deps.c
+@@ -62,6 +62,7 @@ const static struct cpuid_dep cpuid_deps
+ { X86_FEATURE_CQM_OCCUP_LLC, X86_FEATURE_CQM_LLC },
+ { X86_FEATURE_CQM_MBM_TOTAL, X86_FEATURE_CQM_LLC },
+ { X86_FEATURE_CQM_MBM_LOCAL, X86_FEATURE_CQM_LLC },
++ { X86_FEATURE_AVX512_BF16, X86_FEATURE_AVX512VL },
+ {}
+ };
+
diff --git a/patches.suse/x86-smpboot-Rename-match_die-to-match_pkg.patch b/patches.suse/x86-smpboot-Rename-match_die-to-match_pkg.patch
new file mode 100644
index 0000000000..35e83c82f4
--- /dev/null
+++ b/patches.suse/x86-smpboot-Rename-match_die-to-match_pkg.patch
@@ -0,0 +1,54 @@
+From: Len Brown <len.brown@intel.com>
+Date: Tue, 26 Feb 2019 01:20:01 -0500
+Subject: x86/smpboot: Rename match_die() to match_pkg()
+Git-commit: 169d0869962da362b5058e31f87911b2960418af
+Patch-mainline: v5.2-rc1
+References: jsc#SLE-5454
+
+Syntax only, no functional or semantic change.
+
+This routine matches packages, not die, so name it thus.
+
+Signed-off-by: Len Brown <len.brown@intel.com>
+Cc: Andrew Morton <akpm@linux-foundation.org>
+Cc: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Cc: Will Deacon <will.deacon@arm.com>
+Link: http://lkml.kernel.org/r/7ca18c4ae7816a1f9eda37414725df676e63589d.1551160674.git.len.brown@intel.com
+Signed-off-by: Ingo Molnar <mingo@kernel.org>
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ arch/x86/kernel/smpboot.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/arch/x86/kernel/smpboot.c
++++ b/arch/x86/kernel/smpboot.c
+@@ -458,7 +458,7 @@ static bool match_llc(struct cpuinfo_x86
+ * multicore group inside a NUMA node. If this happens, we will
+ * discard the MC level of the topology later.
+ */
+-static bool match_die(struct cpuinfo_x86 *c, struct cpuinfo_x86 *o)
++static bool match_pkg(struct cpuinfo_x86 *c, struct cpuinfo_x86 *o)
+ {
+ if (c->phys_proc_id == o->phys_proc_id)
+ return true;
+@@ -549,7 +549,7 @@ void set_cpu_sibling_map(int cpu)
+ for_each_cpu(i, cpu_sibling_setup_mask) {
+ o = &cpu_data(i);
+
+- if ((i == cpu) || (has_mp && match_die(c, o))) {
++ if ((i == cpu) || (has_mp && match_pkg(c, o))) {
+ link_mask(topology_core_cpumask, cpu, i);
+
+ /*
+@@ -573,7 +573,7 @@ void set_cpu_sibling_map(int cpu)
+ } else if (i != cpu && !c->booted_cores)
+ c->booted_cores = cpu_data(i).booted_cores;
+ }
+- if (match_die(c, o) && !topology_same_node(c, o))
++ if (match_pkg(c, o) && !topology_same_node(c, o))
+ x86_has_numa_in_package = true;
+ }
+
diff --git a/patches.suse/x86-topology-Add-CPUID.1F-multi-die-package-support.patch b/patches.suse/x86-topology-Add-CPUID.1F-multi-die-package-support.patch
new file mode 100644
index 0000000000..72c11350b2
--- /dev/null
+++ b/patches.suse/x86-topology-Add-CPUID.1F-multi-die-package-support.patch
@@ -0,0 +1,238 @@
+From: Len Brown <len.brown@intel.com>
+Date: Mon, 13 May 2019 13:58:45 -0400
+Subject: x86/topology: Add CPUID.1F multi-die/package support
+Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
+Git-commit: 7745f03eb39587dd15a1fb26e6223678b8e906d2
+Patch-mainline: Queued in subsystem maintainer repository
+References: jsc#SLE-5454
+
+Some new systems have multiple software-visible die within each package.
+
+Update Linux parsing of the Intel CPUID "Extended Topology Leaf" to handle
+either CPUID.B, or the new CPUID.1F.
+
+Add cpuinfo_x86.die_id and cpuinfo_x86.max_dies to store the result.
+
+die_id will be non-zero only for multi-die/package systems.
+
+Signed-off-by: Len Brown <len.brown@intel.com>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Reviewed-by: Ingo Molnar <mingo@kernel.org>
+Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Cc: linux-doc@vger.kernel.org
+Link: https://lkml.kernel.org/r/7b23d2d26d717b8e14ba137c94b70943f1ae4b5c.1557769318.git.len.brown@intel.com
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ Documentation/x86/topology.txt | 4 +
+ arch/x86/include/asm/processor.h | 4 +
+ arch/x86/kernel/cpu/topology.c | 83 ++++++++++++++++++++++++++++++---------
+ arch/x86/kernel/smpboot.c | 2
+ 4 files changed, 74 insertions(+), 19 deletions(-)
+
+--- a/Documentation/x86/topology.txt
++++ b/Documentation/x86/topology.txt
+@@ -46,6 +46,10 @@ The topology of a system is described in
+
+ The number of cores in a package. This information is retrieved via CPUID.
+
++ - cpuinfo_x86.x86_max_dies:
++
++ The number of dies in a package. This information is retrieved via CPUID.
++
+ - cpuinfo_x86.phys_proc_id:
+
+ The physical ID of the package. This information is retrieved via CPUID
+--- a/arch/x86/include/asm/processor.h
++++ b/arch/x86/include/asm/processor.h
+@@ -116,7 +116,8 @@ struct cpuinfo_x86 {
+ int x86_power;
+ unsigned long loops_per_jiffy;
+ /* cpuid returned max cores value: */
+- u16 x86_max_cores;
++ u16 x86_max_cores;
++ u16 x86_max_dies;
+ u16 apicid;
+ u16 initial_apicid;
+ u16 x86_clflush_size;
+@@ -128,6 +129,7 @@ struct cpuinfo_x86 {
+ u16 logical_proc_id;
+ /* Core id: */
+ u16 cpu_core_id;
++ u16 cpu_die_id;
+ /* Index into per_cpu list: */
+ u16 cpu_index;
+ u32 microcode;
+--- a/arch/x86/kernel/cpu/topology.c
++++ b/arch/x86/kernel/cpu/topology.c
+@@ -12,33 +12,63 @@
+ /* leaf 0xb SMT level */
+ #define SMT_LEVEL 0
+
+-/* leaf 0xb sub-leaf types */
++/* extended topology sub-leaf types */
+ #define INVALID_TYPE 0
+ #define SMT_TYPE 1
+ #define CORE_TYPE 2
++#define DIE_TYPE 5
+
+ #define LEAFB_SUBTYPE(ecx) (((ecx) >> 8) & 0xff)
+ #define BITS_SHIFT_NEXT_LEVEL(eax) ((eax) & 0x1f)
+ #define LEVEL_MAX_SIBLINGS(ebx) ((ebx) & 0xffff)
+
+-int detect_extended_topology_early(struct cpuinfo_x86 *c)
+-{
+ #ifdef CONFIG_SMP
++/*
++ * Check if given CPUID extended toplogy "leaf" is implemented
++ */
++static int check_extended_topology_leaf(int leaf)
++{
+ unsigned int eax, ebx, ecx, edx;
+
+- if (c->cpuid_level < 0xb)
++ cpuid_count(leaf, SMT_LEVEL, &eax, &ebx, &ecx, &edx);
++
++ if (ebx == 0 || (LEAFB_SUBTYPE(ecx) != SMT_TYPE))
+ return -1;
+
+- cpuid_count(0xb, SMT_LEVEL, &eax, &ebx, &ecx, &edx);
++ return 0;
++}
++/*
++ * Return best CPUID Extended Toplogy Leaf supported
++ */
++static int detect_extended_topology_leaf(struct cpuinfo_x86 *c)
++{
++ if (c->cpuid_level >= 0x1f) {
++ if (check_extended_topology_leaf(0x1f) == 0)
++ return 0x1f;
++ }
++
++ if (c->cpuid_level >= 0xb) {
++ if (check_extended_topology_leaf(0xb) == 0)
++ return 0xb;
++ }
+
+- /*
+- * check if the cpuid leaf 0xb is actually implemented.
+- */
+- if (ebx == 0 || (LEAFB_SUBTYPE(ecx) != SMT_TYPE))
++ return -1;
++}
++#endif
++
++int detect_extended_topology_early(struct cpuinfo_x86 *c)
++{
++#ifdef CONFIG_SMP
++ unsigned int eax, ebx, ecx, edx;
++ int leaf;
++
++ leaf = detect_extended_topology_leaf(c);
++ if (leaf < 0)
+ return -1;
+
+ set_cpu_cap(c, X86_FEATURE_XTOPOLOGY);
+
++ cpuid_count(leaf, SMT_LEVEL, &eax, &ebx, &ecx, &edx);
+ /*
+ * initial apic id, which also represents 32-bit extended x2apic id.
+ */
+@@ -49,7 +79,7 @@ int detect_extended_topology_early(struc
+ }
+
+ /*
+- * Check for extended topology enumeration cpuid leaf 0xb and if it
++ * Check for extended topology enumeration cpuid leaf, and if it
+ * exists, use it for populating initial_apicid and cpu topology
+ * detection.
+ */
+@@ -57,22 +87,28 @@ int detect_extended_topology(struct cpui
+ {
+ #ifdef CONFIG_SMP
+ unsigned int eax, ebx, ecx, edx, sub_index;
+- unsigned int ht_mask_width, core_plus_mask_width;
++ unsigned int ht_mask_width, core_plus_mask_width, die_plus_mask_width;
+ unsigned int core_select_mask, core_level_siblings;
++ unsigned int die_select_mask, die_level_siblings;
++ int leaf;
+
+- if (detect_extended_topology_early(c) < 0)
++ leaf = detect_extended_topology_leaf(c);
++ if (leaf < 0)
+ return -1;
+
+ /*
+ * Populate HT related information from sub-leaf level 0.
+ */
+- cpuid_count(0xb, SMT_LEVEL, &eax, &ebx, &ecx, &edx);
++ cpuid_count(leaf, SMT_LEVEL, &eax, &ebx, &ecx, &edx);
++ c->initial_apicid = edx;
+ core_level_siblings = smp_num_siblings = LEVEL_MAX_SIBLINGS(ebx);
+ core_plus_mask_width = ht_mask_width = BITS_SHIFT_NEXT_LEVEL(eax);
++ die_level_siblings = LEVEL_MAX_SIBLINGS(ebx);
++ die_plus_mask_width = BITS_SHIFT_NEXT_LEVEL(eax);
+
+ sub_index = 1;
+ do {
+- cpuid_count(0xb, sub_index, &eax, &ebx, &ecx, &edx);
++ cpuid_count(leaf, sub_index, &eax, &ebx, &ecx, &edx);
+
+ /*
+ * Check for the Core type in the implemented sub leaves.
+@@ -80,23 +116,34 @@ int detect_extended_topology(struct cpui
+ if (LEAFB_SUBTYPE(ecx) == CORE_TYPE) {
+ core_level_siblings = LEVEL_MAX_SIBLINGS(ebx);
+ core_plus_mask_width = BITS_SHIFT_NEXT_LEVEL(eax);
+- break;
++ die_level_siblings = core_level_siblings;
++ die_plus_mask_width = BITS_SHIFT_NEXT_LEVEL(eax);
++ }
++ if (LEAFB_SUBTYPE(ecx) == DIE_TYPE) {
++ die_level_siblings = LEVEL_MAX_SIBLINGS(ebx);
++ die_plus_mask_width = BITS_SHIFT_NEXT_LEVEL(eax);
+ }
+
+ sub_index++;
+ } while (LEAFB_SUBTYPE(ecx) != INVALID_TYPE);
+
+ core_select_mask = (~(-1 << core_plus_mask_width)) >> ht_mask_width;
++ die_select_mask = (~(-1 << die_plus_mask_width)) >>
++ core_plus_mask_width;
+
+- c->cpu_core_id = apic->phys_pkg_id(c->initial_apicid, ht_mask_width)
+- & core_select_mask;
+- c->phys_proc_id = apic->phys_pkg_id(c->initial_apicid, core_plus_mask_width);
++ c->cpu_core_id = apic->phys_pkg_id(c->initial_apicid,
++ ht_mask_width) & core_select_mask;
++ c->cpu_die_id = apic->phys_pkg_id(c->initial_apicid,
++ core_plus_mask_width) & die_select_mask;
++ c->phys_proc_id = apic->phys_pkg_id(c->initial_apicid,
++ die_plus_mask_width);
+ /*
+ * Reinit the apicid, now that we have extended initial_apicid.
+ */
+ c->apicid = apic->phys_pkg_id(c->initial_apicid, 0);
+
+ c->x86_max_cores = (core_level_siblings / smp_num_siblings);
++ c->x86_max_dies = (die_level_siblings / core_level_siblings);
+ #endif
+ return 0;
+ }
+--- a/arch/x86/kernel/smpboot.c
++++ b/arch/x86/kernel/smpboot.c
+@@ -392,6 +392,7 @@ static bool match_smt(struct cpuinfo_x86
+ int cpu1 = c->cpu_index, cpu2 = o->cpu_index;
+
+ if (c->phys_proc_id == o->phys_proc_id &&
++ c->cpu_die_id == o->cpu_die_id &&
+ per_cpu(cpu_llc_id, cpu1) == per_cpu(cpu_llc_id, cpu2)) {
+ if (c->cpu_core_id == o->cpu_core_id)
+ return topology_sane(c, o, "smt");
+@@ -403,6 +404,7 @@ static bool match_smt(struct cpuinfo_x86
+ }
+
+ } else if (c->phys_proc_id == o->phys_proc_id &&
++ c->cpu_die_id == o->cpu_die_id &&
+ c->cpu_core_id == o->cpu_core_id) {
+ return topology_sane(c, o, "smt");
+ }
diff --git a/patches.suse/x86-topology-Create-topology_max_die_per_package.patch b/patches.suse/x86-topology-Create-topology_max_die_per_package.patch
new file mode 100644
index 0000000000..f4edea817b
--- /dev/null
+++ b/patches.suse/x86-topology-Create-topology_max_die_per_package.patch
@@ -0,0 +1,86 @@
+From: Len Brown <len.brown@intel.com>
+Date: Mon, 13 May 2019 13:58:46 -0400
+Subject: x86/topology: Create topology_max_die_per_package()
+Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
+Git-commit: 14d96d6c06b5d8116b8d52c9c5530f5528ef1e61
+Patch-mainline: Queued in subsystem maintainer repository
+References: jsc#SLE-5454
+
+topology_max_packages() is available to size resources to cover all
+packages in the system.
+
+But now multi-die/package systems are coming up, and some resources are
+per-die.
+
+Create topology_max_die_per_package(), for detecting multi-die/package
+systems, and sizing any per-die resources.
+
+Signed-off-by: Len Brown <len.brown@intel.com>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Reviewed-by: Ingo Molnar <mingo@kernel.org>
+Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Link: https://lkml.kernel.org/r/e6eaf384571ae52ac7d0ca41510b7fb7d2fda0e4.1557769318.git.len.brown@intel.com
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ arch/x86/include/asm/processor.h | 1 -
+ arch/x86/include/asm/topology.h | 10 ++++++++++
+ arch/x86/kernel/cpu/topology.c | 5 ++++-
+ 3 files changed, 14 insertions(+), 2 deletions(-)
+
+--- a/arch/x86/include/asm/processor.h
++++ b/arch/x86/include/asm/processor.h
+@@ -117,7 +117,6 @@ struct cpuinfo_x86 {
+ unsigned long loops_per_jiffy;
+ /* cpuid returned max cores value: */
+ u16 x86_max_cores;
+- u16 x86_max_dies;
+ u16 apicid;
+ u16 initial_apicid;
+ u16 x86_clflush_size;
+--- a/arch/x86/include/asm/topology.h
++++ b/arch/x86/include/asm/topology.h
+@@ -121,6 +121,13 @@ 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;
++}
++
+ extern int __max_smt_threads;
+
+ static inline int topology_max_smt_threads(void)
+@@ -137,6 +144,9 @@ bool topology_smt_supported(void);
+ static inline int
+ topology_update_package_map(unsigned int apicid, unsigned int cpu) { return 0; }
+ static inline int topology_phys_to_logical_pkg(unsigned int pkg) { return 0; }
++static inline int topology_phys_to_logical_die(unsigned int die,
++ unsigned int cpu) { return 0; }
++static inline int topology_max_die_per_package(void) { return 1; }
+ static inline int topology_max_smt_threads(void) { return 1; }
+ static inline bool topology_is_primary_thread(unsigned int cpu) { return true; }
+ static inline bool topology_smt_supported(void) { return false; }
+--- a/arch/x86/kernel/cpu/topology.c
++++ b/arch/x86/kernel/cpu/topology.c
+@@ -23,6 +23,9 @@
+ #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);
++
+ /*
+ * Check if given CPUID extended toplogy "leaf" is implemented
+ */
+@@ -143,7 +146,7 @@ int detect_extended_topology(struct cpui
+ c->apicid = apic->phys_pkg_id(c->initial_apicid, 0);
+
+ c->x86_max_cores = (core_level_siblings / smp_num_siblings);
+- c->x86_max_dies = (die_level_siblings / core_level_siblings);
++ __max_die_per_package = (die_level_siblings / core_level_siblings);
+ #endif
+ return 0;
+ }
diff --git a/patches.suse/x86-topology-Define-topology_die_id.patch b/patches.suse/x86-topology-Define-topology_die_id.patch
new file mode 100644
index 0000000000..77cee98813
--- /dev/null
+++ b/patches.suse/x86-topology-Define-topology_die_id.patch
@@ -0,0 +1,31 @@
+From: Len Brown <len.brown@intel.com>
+Date: Mon, 13 May 2019 13:58:48 -0400
+Subject: x86/topology: Define topology_die_id()
+Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
+Git-commit: 306a0de329f77537f29022c2982006f9145d782d
+Patch-mainline: Queued in subsystem maintainer repository
+References: jsc#SLE-5454
+
+topology_die_id(cpu) is a simple macro for use inside the kernel to get the
+die_id associated with the given cpu.
+
+Signed-off-by: Len Brown <len.brown@intel.com>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Reviewed-by: Ingo Molnar <mingo@kernel.org>
+Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Link: https://lkml.kernel.org/r/6463bc422b1b05445a502dc505c1d7c6756bda6a.1557769318.git.len.brown@intel.com
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ arch/x86/include/asm/topology.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/arch/x86/include/asm/topology.h
++++ b/arch/x86/include/asm/topology.h
+@@ -112,6 +112,7 @@ extern const struct cpumask *cpu_coregro
+
+ #define topology_logical_package_id(cpu) (cpu_data(cpu).logical_proc_id)
+ #define topology_physical_package_id(cpu) (cpu_data(cpu).phys_proc_id)
++#define topology_die_id(cpu) (cpu_data(cpu).cpu_die_id)
+ #define topology_core_id(cpu) (cpu_data(cpu).cpu_core_id)
+
+ #ifdef CONFIG_SMP
diff --git a/patches.suse/x86-topology-Define-topology_logical_die_id.patch b/patches.suse/x86-topology-Define-topology_logical_die_id.patch
new file mode 100644
index 0000000000..18a7eed1c7
--- /dev/null
+++ b/patches.suse/x86-topology-Define-topology_logical_die_id.patch
@@ -0,0 +1,147 @@
+From: Len Brown <len.brown@intel.com>
+Date: Mon, 13 May 2019 13:58:49 -0400
+Subject: x86/topology: Define topology_logical_die_id()
+Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
+Git-commit: 212bf4fdb7f9eeeb99afd97ebad677d43e7b55ac
+Patch-mainline: Queued in subsystem maintainer repository
+References: jsc#SLE-5454
+
+Define topology_logical_die_id() ala existing topology_logical_package_id()
+
+Signed-off-by: Len Brown <len.brown@intel.com>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+Tested-by: Zhang Rui <rui.zhang@intel.com>
+Reviewed-by: Ingo Molnar <mingo@kernel.org>
+Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
+Link: https://lkml.kernel.org/r/2f3526e25ae14fbeff26fb26e877d159df8946d9.1557769318.git.len.brown@intel.com
+Signed-off-by: Jiri Slaby <jslaby@suse.cz>
+---
+ arch/x86/include/asm/processor.h | 1
+ arch/x86/include/asm/topology.h | 5 ++++
+ arch/x86/kernel/cpu/common.c | 1
+ arch/x86/kernel/smpboot.c | 45 +++++++++++++++++++++++++++++++++++++++
+ 4 files changed, 52 insertions(+)
+
+--- a/arch/x86/include/asm/processor.h
++++ b/arch/x86/include/asm/processor.h
+@@ -129,6 +129,7 @@ struct cpuinfo_x86 {
+ /* Core id: */
+ u16 cpu_core_id;
+ u16 cpu_die_id;
++ u16 logical_die_id;
+ /* Index into per_cpu list: */
+ u16 cpu_index;
+ u32 microcode;
+--- a/arch/x86/include/asm/topology.h
++++ b/arch/x86/include/asm/topology.h
+@@ -112,6 +112,7 @@ extern const struct cpumask *cpu_coregro
+
+ #define topology_logical_package_id(cpu) (cpu_data(cpu).logical_proc_id)
+ #define topology_physical_package_id(cpu) (cpu_data(cpu).phys_proc_id)
++#define topology_logical_die_id(cpu) (cpu_data(cpu).logical_die_id)
+ #define topology_die_id(cpu) (cpu_data(cpu).cpu_die_id)
+ #define topology_core_id(cpu) (cpu_data(cpu).cpu_core_id)
+
+@@ -137,13 +138,17 @@ static inline int topology_max_smt_threa
+ }
+
+ int topology_update_package_map(unsigned int apicid, unsigned int cpu);
++int topology_update_die_map(unsigned int dieid, unsigned int cpu);
+ int topology_phys_to_logical_pkg(unsigned int pkg);
++int topology_phys_to_logical_die(unsigned int die, unsigned int cpu);
+ bool topology_is_primary_thread(unsigned int cpu);
+ bool topology_smt_supported(void);
+ #else
+ #define topology_max_packages() (1)
+ static inline int
+ topology_update_package_map(unsigned int apicid, unsigned int cpu) { return 0; }
++static inline int
++topology_update_die_map(unsigned int dieid, unsigned int cpu) { return 0; }
+ static inline int topology_phys_to_logical_pkg(unsigned int pkg) { return 0; }
+ static inline int topology_phys_to_logical_die(unsigned int die,
+ unsigned int cpu) { return 0; }
+--- a/arch/x86/kernel/cpu/common.c
++++ b/arch/x86/kernel/cpu/common.c
+@@ -1252,6 +1252,7 @@ static void validate_apic_and_package_id
+ cpu, apicid, c->initial_apicid);
+ }
+ BUG_ON(topology_update_package_map(c->phys_proc_id, cpu));
++ BUG_ON(topology_update_die_map(c->cpu_die_id, cpu));
+ #else
+ c->logical_proc_id = 0;
+ #endif
+--- a/arch/x86/kernel/smpboot.c
++++ b/arch/x86/kernel/smpboot.c
+@@ -99,6 +99,7 @@ EXPORT_PER_CPU_SYMBOL(cpu_info);
+ unsigned int __max_logical_packages __read_mostly;
+ EXPORT_SYMBOL(__max_logical_packages);
+ static unsigned int logical_packages __read_mostly;
++static unsigned int logical_die __read_mostly;
+
+ /* Maximum number of SMT threads on any online core */
+ int __read_mostly __max_smt_threads = 1;
+@@ -305,6 +306,26 @@ int topology_phys_to_logical_pkg(unsigne
+ return -1;
+ }
+ EXPORT_SYMBOL(topology_phys_to_logical_pkg);
++/**
++ * topology_phys_to_logical_die - Map a physical die id to logical
++ *
++ * Returns logical die id or -1 if not found
++ */
++int topology_phys_to_logical_die(unsigned int die_id, unsigned int cur_cpu)
++{
++ int cpu;
++ int proc_id = cpu_data(cur_cpu).phys_proc_id;
++
++ for_each_possible_cpu(cpu) {
++ struct cpuinfo_x86 *c = &cpu_data(cpu);
++
++ if (c->initialized && c->cpu_die_id == die_id &&
++ c->phys_proc_id == proc_id)
++ return c->logical_die_id;
++ }
++ return -1;
++}
++EXPORT_SYMBOL(topology_phys_to_logical_die);
+
+ /**
+ * topology_update_package_map - Update the physical to logical package map
+@@ -329,6 +350,29 @@ found:
+ cpu_data(cpu).logical_proc_id = new;
+ return 0;
+ }
++/**
++ * topology_update_die_map - Update the physical to logical die map
++ * @die: The die id as retrieved via CPUID
++ * @cpu: The cpu for which this is updated
++ */
++int topology_update_die_map(unsigned int die, unsigned int cpu)
++{
++ int new;
++
++ /* Already available somewhere? */
++ new = topology_phys_to_logical_die(die, cpu);
++ if (new >= 0)
++ goto found;
++
++ new = logical_die++;
++ if (new != die) {
++ pr_info("CPU %u Converting physical %u to logical die %u\n",
++ cpu, die, new);
++ }
++found:
++ cpu_data(cpu).logical_die_id = new;
++ return 0;
++}
+
+ void __init smp_store_boot_cpu_info(void)
+ {
+@@ -338,6 +382,7 @@ void __init smp_store_boot_cpu_info(void
+ *c = boot_cpu_data;
+ c->cpu_index = id;
+ topology_update_package_map(c->phys_proc_id, id);
++ topology_update_die_map(c->cpu_die_id, id);
+ c->initialized = true;
+ }
+
diff --git a/series.conf b/series.conf
index 49c136ae5a..62b4f9a5b9 100644
--- a/series.conf
+++ b/series.conf
@@ -10712,6 +10712,7 @@
patches.suse/0041-libceph-don-t-allow-bidirectional-swap-of-pg-upmap-items.patch
patches.suse/0042-ceph-avoid-panic-in-create_session_open_msg-if-utsname-returns-null.patch
patches.fixes/0001-Fix-SMB3.1.1-guest-authentication-to-Samba.patch
+ patches.fixes/SMB3-Fix-endian-warning.patch
patches.fixes/0001-SMB3-Warn-user-if-trying-to-sign-connection-that-aut.patch
patches.fixes/0001-cifs-release-cifs-root_cred-after-exit_cifs.patch
patches.fixes/0001-cifs-release-auth_key.response-for-reconnect.patch
@@ -11725,6 +11726,9 @@
patches.drivers/edac-sb_edac-fix-missing-dimm-sysfs-entries-with-knl-snc2-snc4-mode.patch
patches.drivers/EDAC-sb_edac-Fix-missing-break-in-switch
patches.drivers/hwmon-pmbus-core-Prevent-unintentional-setting-of-pa.patch
+ patches.drivers/hwmon-k10temp-move-chip-specific-code-into-probe-function.patch
+ patches.drivers/hwmon-k10temp-add-support-for-family-17h.patch
+ patches.drivers/hwmon-k10temp-add-support-for-temperature-offsets.patch
patches.drivers/regulator-qcom_spmi-Include-offset-when-translating-
patches.drivers/regulator-tps65218-Fix-strobe-assignment
patches.drivers/spi-sh-msiof-Fix-DMA-transfer-size-check
@@ -17579,6 +17583,7 @@
patches.fixes/kernel-signal.c-protect-the-traced-SIGNAL_UNKILLABLE-tasks-from-SIGKILL.patch
patches.fixes/kernel-signal.c-protect-the-SIGNAL_UNKILLABLE-tasks-from-sig_kernel_only-signals.patch
patches.fixes/kernel-signal.c-remove-the-no-longer-needed-SIGNAL_UNKILLABLE-check-in-complete_signal.patch
+ patches.drivers/drivers-rapidio-devices-rio_mport_cdev.c-fix-resourc.patch
patches.fixes/kbuild-move-all-target-out-of-kbuild_src-conditional.patch
patches.fixes/kbuild-fix-linker-feature-test-macros-when-cross-compiling-with-clang.patch
patches.fixes/kbuild-rpm-pkg-keep-spec-file-until-make-mrproper.patch
@@ -17602,6 +17607,7 @@
patches.drivers/clk-uniphier-fix-DAPLL2-clock-rate-of-Pro5
patches.drivers/clk-qcom-common-fix-legacy-board-clock-registration
patches.drivers/clk-ti-dra7-atl-clock-fix-child-node-lookups
+ patches.drivers/hwmon-k10temp-correct-model-name-for-ryzen-1600x.patch
patches.fixes/sctp-check-stream-reset-info-len-before-making-recon.patch
patches.drivers/genetlink-fix-genlmsg_nlhdr.patch
patches.drivers/qed-use-kzalloc-instead-of-kmalloc-and-memset.patch
@@ -19355,6 +19361,7 @@
patches.drivers/mtd-nand-sunxi-Fix-ECC-strength-choice.patch
patches.drivers/hwmon-ina2xx-Make-calibration-register-value-fixed
patches.drivers/hwmon-ina2xx-Fix-access-to-uninitialized-mutex
+ patches.drivers/hwmon-k10temp-add-temperature-offset-for-ryzen-1900x.patch
patches.drivers/mmc-sdhci-of-esdhc-fix-eMMC-couldn-t-work-after-kexe
patches.drivers/mmc-block-no-need-to-export-mmc_cleanup_queue.patch
patches.drivers/mmc-block-simplify-cleaning-up-the-queue.patch
@@ -24197,6 +24204,7 @@
patches.suse/0001-locking-qspinlock-Ensure-node-is-initialised-before-.patch
patches.suse/0002-locking-qspinlock-Ensure-node-count-is-updated-befor.patch
patches.fixes/9p-trans_virtio-discard-zero-length-reply.patch
+ patches.drivers/hwmon-k10temp-only-apply-temperature-offset-if-result-is.patch
patches.drivers/PM-wakeirq-Fix-unbalanced-IRQ-enable-for-wakeirq
patches.drivers/PM-runtime-Update-links_count-also-if-CONFIG_SRCU
patches.arch/pm-cpuidle-fix-cpuidle_poll_state_init-prototype
@@ -29607,6 +29615,8 @@
patches.drivers/PCI-aardvark-Fix-PCIe-Max-Read-Request-Size-setting
patches.drivers/0094-PCI-kirin-Fix-reset-gpio-name.patch
patches.drivers/hwmon-nct6683-Enable-EC-access-if-disabled-at-boot
+ patches.drivers/hwmon-k10temp-add-temperature-offset-for-ryzen-2700x.patch
+ patches.drivers/hwmon-k10temp-add-support-for-amd-ryzen-w-vega-graphics.patch
patches.drivers/virtio_console-don-t-tie-bufs-to-a-vq
patches.drivers/virtio-add-ability-to-iterate-over-vqs
patches.drivers/virtio_console-free-buffers-after-reset
@@ -30061,6 +30071,9 @@
patches.fixes/0002-KVM-arm-arm64-VGIC-ITS-Promote-irq_lock-in-update_af.patch
patches.fixes/0003-KVM-arm-arm64-VGIC-ITS-protect-kvm_read_guest-calls-.patch
patches.fixes/0004-KVM-arm-arm64-VGIC-ITS-save-restore-protect-kvm_read.patch
+ patches.drivers/hwmon-k10temp-fix-reading-critical-temperature-register.patch
+ patches.arch/x86-amd_nb-add-support-for-raven-ridge-cpus.patch
+ patches.drivers/hwmon-k10temp-use-api-function-to-access-system-management.patch
patches.drm/drm-Match-sysfs-name-in-link-removal-to-link-creatio
patches.drm/6098-drm-vc4-fix-leak-of-the-file_priv-that-stored-the-perfmon
patches.drm/drm-dumb-buffers-Integer-overflow-in-drm_mode_create
@@ -30568,7 +30581,10 @@
patches.drivers/0002-dma-mapping-move-dma-configuration-to-bus-infrastruc.patch
patches.drivers/0003-drivers-remove-force-dma-flag-from-buses.patch
patches.fixes/scsi-reduce-use-of-block-bounce-buffers.patch
+ patches.drivers/hwmon-k10temp-add-support-for-stoney-ridge-and-bristol.patch
+ patches.drivers/hwmon-k10temp-display-both-tctl-and-tdie.patch
patches.drivers/hwmon-ltc2990-Fix-incorrect-conversion-of-negative-t
+ patches.drivers/hwmon-k10temp-make-function-get_raw_temp-static.patch
patches.drivers/hwmon-asus_atk0110-Replace-deprecated-device-registe
patches.drivers/0006-spi-Expose-spi_-map-unmap-_buf-for-internal-use.patch
patches.drivers/0007-spi-Add-an-helper-to-flush-the-message-queue.patch
@@ -35225,6 +35241,8 @@
patches.fixes/s390-mm-fix-addressing-exception-after-suspend-resum.patch
patches.drivers/s390-dasd-fix-panic-for-failed-online-processing.patch
patches.fixes/binfmt_elf-Respect-error-return-from-regset-active.patch
+ patches.drivers/hwmon-k10temp-27c-offset-needed-for-threadripper2.patch
+ patches.drivers/hwmon-k10temp-support-threadripper-2920x-2970wx-simplify.patch
patches.fixes/btrfs-check-integrity-Fix-NULL-pointer-dereference-f.patch
patches.suse/0001-btrfs-Don-t-remove-block-group-still-has-pinned-down.patch
patches.suse/0015-btrfs-tree-checker-Verify-block_group_item.patch
@@ -40350,6 +40368,7 @@
patches.drivers/nvme-pci-fix-hot-removal-during-error-handling.patch
patches.drivers/nvme-rdma-always-have-a-valid-trsvcid.patch
patches.drivers/nvme-fabrics-move-controller-options-matching-to-fab.patch
+ patches.drivers/hwmon-k10temp-support-all-family-15h-model-6xh-and-model.patch
patches.drivers/hwmon-pwm-fan-Set-fan-speed-to-0-on-suspend.patch
patches.drivers/hwmon-pmbus-Fix-page-count-auto-detection.patch
patches.fixes/jffs2-free-jffs2_sb_info-through-jffs2_kill_sb.patch
@@ -44216,6 +44235,7 @@
patches.fixes/mm-migrate-lock-buffers-before-migrate_page_move_map.patch
patches.fixes/mm-migrate-provide-buffer_migrate_page_norefs.patch
patches.fixes/blkdev-avoid-migration-stalls-for-blkdev-pages.patch
+ patches.drivers/hwmon-k10temp-add-hygon-dhyana-support.patch
patches.drivers/hwmon-lm80-fix-a-missing-check-of-the-status-of-SMBu.patch
patches.drivers/hwmon-lm80-fix-a-missing-check-of-bus-read-in-lm80-p.patch
patches.drivers/gpio-pl061-Move-irq_chip-definition-inside-struct-pl.patch
@@ -44959,6 +44979,7 @@
patches.drivers/ALSA-hda-realtek-Disable-PC-beep-in-passthrough-on-a.patch
patches.drivers/ASoC-topology-free-created-components-in-tplg-load-e.patch
patches.suse/mm-page_alloc-fix-a-division-by-zero-error-when-boosting-watermarks-v2.patch
+ patches.fixes/tmpfs-fix-link-accounting-when-a-tmpfile-is-linked-i.patch
patches.fixes/libceph-handle-an-empty-authorize-reply.patch
patches.fixes/ceph-avoid-repeatedly-adding-inode-to-mdsc-snap_flush_list.patch
patches.drivers/clk-sunxi-ng-v3s-Fix-TCON-reset-de-assert-bit.patch
@@ -44982,6 +45003,7 @@
patches.drivers/ixgbe-don-t-do-any-AF_XDP-zero-copy-transmit-if-neti.patch
patches.suse/bonding-fix-PACKET_ORIGDEV-regression.patch
patches.suse/net-avoid-false-positives-in-untrusted-gso-validatio.patch
+ patches.fixes/af_key-unconditionally-clone-on-broadcast.patch
patches.suse/ipvlan-disallow-userns-cap_net_admin-to-change-globa.patch
patches.fixes/mac80211_hwsim-propagate-genlmsg_reply-return-code.patch
patches.fixes/mac80211-allocate-tailroom-for-forwarded-mesh-packet.patch
@@ -44993,6 +45015,7 @@
patches.fixes/0001-nfp-bpf-fix-ALU32-high-bits-clearance-bug.patch
patches.drivers/net-phy-marvell10g-Fix-Multi-G-advertisement-to-only.patch
patches.suse/net-x25-fix-a-race-in-x25_bind.patch
+ patches.fixes/tmpfs-fix-uninitialized-return-value-in-shmem_link.patch
patches.fixes/0001-mm-enforce-min-addr-even-if-capable-in-expand_downwa.patch
patches.fixes/crypto-sha256-arm-fix-crash-bug-in-Thumb2-build.patch
patches.fixes/crypto-sha512-arm-fix-crash-bug-in-Thumb2-build.patch
@@ -45338,6 +45361,7 @@
patches.arch/s390-setup-set-control-program-code-via-diag-318
patches.arch/s390-pci-improve-bar-check
patches.arch/s390-pci-map-iov-resources
+ patches.arch/s390-jump_label-Use-jdd-constraint-on-gcc9.patch
patches.arch/s390-ism-ignore-some-errors-during-deregistration
patches.fixes/0001-s390-vfio_ap-link-the-vfio_ap-devices-to-the-vfio_ap.patch
patches.drivers/clocksource-drivers-sun5i-Fail-gracefully-when-clock.patch
@@ -45446,6 +45470,7 @@
patches.arch/powerpc-kvm-Save-and-restore-host-AMR-IAMR-UAMOR.patch
patches.arch/powerpc-mm-Check-secondary-hash-page-table.patch
patches.fixes/lib-div64.c-off-by-one-in-shift.patch
+ patches.drivers/drivers-rapidio-rio_cm.c-fix-potential-oops-in-riocm.patch
patches.fixes/sysctl-handle-overflow-for-file-max.patch
patches.drm/drm-v3d-Drop-unused-v3d_flush_caches.patch
patches.drm/drm-v3d-Don-t-bother-flushing-L1TD-at-job-start.patch
@@ -46335,12 +46360,15 @@
patches.drivers/i2c-synquacer-fix-enumeration-of-slave-devices.patch
patches.arch/KVM-PPC-Book3S-Protect-memslots-while-validating-use.patch
patches.fixes/ufs-fix-braino-in-ufs_get_inode_gid-for-solaris-UFS-.patch
+ patches.arch/x86-mm-mem_encrypt-disable-all-instrumentation-for-early-sme-setup.patch
patches.arch/perf-x86-amd-update-generic-hardware-cache-events-for-family-17h.patch
patches.arch/cpu-speculation-add-mitigations-cmdline-option.patch
patches.arch/x86-speculation-support-mitigations-cmdline-option.patch
patches.arch/powerpc-speculation-support-mitigations-cmdline-option.patch
patches.arch/s390-speculation-support-mitigations-cmdline-option.patch
patches.arch/x86-cpu-hygon-fix-phys_proc_id-calculation-logic-for-multi-die-processors.patch
+ patches.suse/x86-smpboot-Rename-match_die-to-match_pkg.patch
+ patches.arch/x86-microcode-fix-the-ancient-deprecated-microcode-loading-method.patch
patches.arch/s390-uv-introduce-guest-side-ultravisor-code
patches.arch/s390-protvirt-add-memory-sharing-for-diag-308-set-store
patches.arch/s390-protvirt-block-kernel-command-line-alteration
@@ -46364,6 +46392,7 @@
patches.drivers/PM-core-Propagate-dev-power.wakeup_path-when-no-call.patch
patches.fixes/ACPI-property-restore-_DSD-data-subnodes-GUID-commen.patch
patches.fixes/ACPI-property-fix-handling-of-data_nodes-in-acpi_get.patch
+ patches.arch/x86-mce-fix-machine_check_poll-tests-for-error-types.patch
patches.arch/x86-mce-handle-varying-mca-bank-counts.patch
patches.drivers/hwmon-f71805f-Use-request_muxed_region-for-Super-IO-.patch
patches.drivers/hwmon-pc87427-Use-request_muxed_region-for-Super-IO-.patch
@@ -46448,6 +46477,7 @@
patches.fixes/block-fix-use-after-free-on-gendisk.patch
patches.fixes/nvme-multipath-split-bios-with-the-ns_head-bio_set-b.patch
patches.fixes/audit-fix-a-memleak-caused-by-auditing-load-module.patch
+ patches.fixes/audit-fix-a-memory-leak-bug.patch
patches.fixes/ext4-make-sanity-check-in-mballoc-more-strict.patch
patches.fixes/jbd2-check-superblock-mapped-prior-to-committing.patch
patches.fixes/ext4-fix-use-after-free-race-with-debug_want_extra_i.patch
@@ -46634,6 +46664,7 @@
patches.drivers/net-hns3-add-function-type-check-for-debugfs-help-in.patch
patches.drivers/net-phy-marvell-add-new-default-led-configure-for-m8.patch
patches.drivers/Bluetooth-hidp-fix-buffer-overflow.patch
+ patches.fixes/6lowpan-Off-by-one-handling-nexthdr.patch
patches.drivers/Bluetooth-Align-minimum-encryption-key-size-for-LE-a.patch
patches.drivers/cxgb4-cxgb4vf_main-Mark-expected-switch-fall-through.patch
patches.drivers/net-hns3-fix-data-race-between-ring-next_to_clean.patch
@@ -46736,6 +46767,7 @@
patches.drivers/USB-core-Don-t-unbind-interfaces-following-device-re.patch
patches.drivers/USB-cdc-acm-fix-unthrottle-races.patch
patches.fixes/0001-UAS-fix-alignment-of-scatter-gather-segments.patch
+ patches.fixes/0001-USB-serial-pl2303-fix-tranceiver-suspend-mode.patch
patches.drivers/USB-serial-fix-unthrottle-races.patch
patches.drivers/USB-serial-f81232-fix-interrupt-worker-not-stop.patch
patches.drivers/dwc2-gadget-Fix-completed-transfer-size-calculation-.patch
@@ -46913,12 +46945,14 @@
patches.drivers/IB-hfi1-Add-selected-Rcv-counters.patch
patches.fixes/RDMA-rxe-Consider-skb-reserve-space-based-on-netdev-.patch
patches.drivers/IB-hfi1-Fix-WQ_MEM_RECLAIM-warning.patch
+ patches.drivers/i2c-piix4-add-hygon-dhyana-smbus-support.patch
patches.drivers/rtc-don-t-reference-bogus-function-pointer-in-kdoc.patch
patches.drivers/rtc-88pm860x-prevent-use-after-free-on-device-remove.patch
patches.drivers/clk-rockchip-fix-wrong-clock-definitions-for-rk3328.patch
patches.drivers/clk-rockchip-Fix-video-codec-clocks-on-rk3288.patch
patches.drivers/net-hns3-remove-redundant-assignment-of-l2_hdr-to-it.patch
patches.suse/tipc-fix-hanging-clients-using-poll-with-EPOLLOUT-fl.patch
+ patches.fixes/vlan-disable-SIOCSHWTSTAMP-in-container.patch
patches.arch/powerpc-numa-improve-control-of-topology-updates.patch
patches.arch/powerpc-numa-document-topology_updates_enabled-disab.patch
patches.arch/powerpc-powernv-idle-Restore-IAMR-after-idle.patch
@@ -46999,6 +47033,7 @@
patches.drivers/backlight-lm3630a-Return-0-on-success-in-update_stat.patch
patches.suse/userfaultfd-use-RCU-to-free-the-task-struct-when-for.patch
patches.fixes/mm-mincore-c-make-mincore-more-conservative.patch
+ patches.drivers/rapidio-fix-a-NULL-pointer-dereference-when-create_w.patch
patches.drivers/crypto-chelsio-Fix-NULL-pointer-dereference.patch
patches.drivers/crypto-chelsio-Fix-softlockup-with-heavy-I-O.patch
patches.drivers/crypto-chelsio-count-incomplete-block-in-IV.patch
@@ -47021,9 +47056,15 @@
patches.drm/drm-i915-fbc-disable-framebuffer-compression-on-Gemi.patch
patches.drm/drm-bridge-adv7511-Fix-low-refresh-rate-selection.patch
patches.drm/drm-pl111-Initialize-clock-spinlock-early.patch
+ patches.fixes/drivers-thermal-tsens-Don-t-print-error-message-on-E.patch
+ patches.fixes/thermal-rcar_gen3_thermal-disable-interrupt-in-.remo.patch
patches.drivers/thermal-cpu_cooling-Actually-trace-CPU-load-in-therm.patch
+ patches.drivers/soc-mediatek-pwrap-Zero-initialize-rdata-in-pwrap_in.patch
+ patches.drivers/soc-rockchip-Set-the-proper-PWM-for-rk3288.patch
patches.suse/objtool-fix-function-fallthrough-detection.patch
+ patches.arch/x86-speculation-mds-revert-cpu-buffer-clear-on-double-fault-exit.patch
patches.fixes/configfs-fix-possible-use-after-free-in-configfs_reg.patch
+ patches.drivers/edac-mc-fix-edac_mc_find-in-case-no-device-is-found.patch
patches.drivers/media-atmel-atmel-isc-fix-INIT_WORK-misplacement.patch
patches.drivers/media-omap_vout-potential-buffer-overflow-in-vidioc_.patch
patches.drivers/media-davinci-vpbe-array-underflow-in-vpbe_enum_outp.patch
@@ -47071,6 +47112,8 @@
patches.drivers/platform-x86-pmc_atom-Add-several-Beckhoff-Automatio.patch
patches.fixes/blk-mq-fix-hang-caused-by-freeze-unfreeze-sequence.patch
patches.fixes/ext4-wait-for-outstanding-dio-during-truncate-in-noj.patch
+ patches.arch/kvm-x86-include-multiple-indices-with-cpuid-leaf-0x8000001d.patch
+ patches.arch/kvm-x86-include-cpuid-leaf-0x8000001e-in-kvm-s-supported-cpuid.patch
patches.drivers/gpio-fix-gpio-adp5588-build-errors.patch
patches.fixes/0001-docs-Fix-conf.py-for-Sphinx-2.0.patch
patches.drm/drm-i915-Maintain-consistent-documentation-subsectio.patch
@@ -47099,12 +47142,14 @@
patches.drivers/USB-rio500-fix-memory-leak-in-close-after-disconnect.patch
patches.drivers/media-usb-siano-Fix-false-positive-uninitialized-var.patch
patches.drivers/xhci-update-bounce-buffer-with-correct-sg-num.patch
+ patches.fixes/0001-usb-xhci-avoid-null-pointer-deref-when-bos-field-is-.patch
patches.drivers/xhci-Convert-xhci_handshake-to-use-readl_poll_timeou.patch
patches.drivers/xhci-Use-zu-for-printing-size_t-type.patch
patches.drivers/media-smsusb-better-handle-optional-alignment.patch
patches.drivers/usbip-usbip_host-fix-stub_dev-lock-context-imbalance.patch
patches.drivers/tty-serial-msm_serial-Fix-XON-XOFF.patch
patches.drivers/serial-sh-sci-disable-DMA-for-uart_console.patch
+ patches.drivers/tty-max310x-Fix-external-crystal-register-setup.patch
patches.drivers/staging-wlan-ng-fix-adapter-initialization-failure.patch
patches.drivers/Staging-vc04_services-Fix-a-couple-error-codes.patch
patches.drivers/staging-vc04_services-prevent-integer-overflow-in-cr.patch
@@ -47119,6 +47164,7 @@
patches.arch/KVM-PPC-Book3S-HV-XIVE-Do-not-clear-IRQ-data-of-pass.patch
patches.arch/powerpc-perf-Fix-MMCRA-corruption-by-bhrb_filter.patch
patches.fixes/efi-x86-Add-missing-error-handling-to-old_memmap-1-1.patch
+ patches.arch/x86-cpu-amd-don-t-force-the-cpb-cap-when-running-under-a-hypervisor.patch
patches.fixes/fuse-fallocate-fix-return-with-locked-inode.patch
patches.drivers/hwmon-core-add-thermal-sensors-only-if-dev-of_node-i.patch
patches.drivers/hwmon-pmbus-core-Treat-parameters-as-paged-if-on-mul.patch
@@ -47152,12 +47198,28 @@
patches.drm/drm-i915-perf-fix-whitelist-on-Gen10.patch
patches.drm/drm-edid-abstract-override-firmware-EDID-retrieval.patch
patches.drm/drm-add-fallback-override-firmware-EDID-modes-workar.patch
+ patches.suse/module-fix-livepatch-ftrace-module-text-permissions-race.patch
patches.drivers/usb-dwc2-Fix-DMA-cache-alignment-issues.patch
patches.drivers/platform-x86-asus-wmi-Only-Tell-EC-the-OS-will-handl.patch
patches.drivers/platform-x86-mlx-platform-Fix-parent-device-in-i2c-m.patch
patches.drivers/platform-mellanox-mlxreg-hotplug-Add-devm_free_irq-c.patch
+ patches.drivers/ras-cec-fix-binary-search-function.patch
+ patches.drivers/ras-cec-convert-the-timer-callback-to-a-workqueue.patch
+ patches.arch/x86-microcode-cpuhotplug-add-a-microcode-loader-cpu-hotplug-callback.patch
+ patches.fixes/0001-mwifiex-Fix-possible-buffer-overflows-at-parsing-bss.patch
+ patches.fixes/0001-mwifiex-Abort-at-too-short-BSS-descriptor-element.patch
+ patches.fixes/0001-mwifiex-Fix-heap-overflow-in-mwifiex_uap_parse_tail_.patch
patches.fixes/nl-mac-80211-allow-4addr-AP-operation-on-crypto-cont.patch
patches.fixes/nl80211-fix-station_info-pertid-memory-leak.patch
+ patches.fixes/cfg80211-fix-memory-leak-of-wiphy-device-name.patch
+ patches.drivers/qmi_wwan-add-support-for-QMAP-padding-in-the-RX-path.patch
+ patches.drivers/qmi_wwan-add-network-device-usage-statistics-for-qmi.patch
+ patches.drivers/qmi_wwan-avoid-RCU-stalls-on-device-disconnect-when-.patch
+ patches.drivers/qmi_wwan-extend-permitted-QMAP-mux_id-value-range.patch
+ patches.fixes/tcp-limit-payload-size-of-sacked-skbs.patch
+ patches.fixes/tcp-tcp_fragment-should-apply-sane-memory-limits.patch
+ patches.fixes/tcp-add-tcp_min_snd_mss-sysctl.patch
+ patches.fixes/tcp-enforce-tcp_min_snd_mss-in-tcp_mtu_probing.patch
# davem/net
patches.drivers/ibmvnic-Do-not-close-unopened-driver-during-reset.patch
@@ -47196,11 +47258,33 @@
patches.drivers/scsi-mpt3sas_ctl-fix-double-fetch-bug-in-ctl_ioctl_main
# powerpc/linux next
+ patches.arch/powerpc-pseries-dlpar-Fix-a-missing-check-in-dlpar_p.patch
patches.arch/powerpc-pseries-Fix-oops-in-hotplug-memory-notifier.patch
patches.arch/powerpc-cacheinfo-add-cacheinfo_teardown-cacheinfo_r.patch
patches.arch/powerpc-pseries-mobility-prevent-cpu-hotplug-during-.patch
patches.arch/powerpc-pseries-mobility-rebuild-cacheinfo-hierarchy.patch
+ # tip/tip
+ patches.suse/x86-topology-Add-CPUID.1F-multi-die-package-support.patch
+ patches.suse/x86-topology-Create-topology_max_die_per_package.patch
+ patches.suse/cpu-topology-Export-die_id.patch
+ patches.suse/x86-topology-Define-topology_die_id.patch
+ patches.suse/x86-topology-Define-topology_logical_die_id.patch
+ patches.suse/powercap-intel_rapl-Simplify-rapl_find_package.patch
+ patches.suse/powercap-intel_rapl-Support-multi-die-package.patch
+ patches.suse/thermal-x86_pkg_temp_thermal-Support-multi-die-packa.patch
+ patches.suse/powercap-intel_rapl-Update-RAPL-domain-name-and-debu.patch
+ patches.suse/hwmon-coretemp-Support-multi-die-package.patch
+ patches.suse/topology-Create-package_cpus-sysfs-attribute.patch
+ patches.suse/topology-Create-core_cpus-and-die_cpus-sysfs-attribu.patch
+ patches.suse/perf-x86-intel-uncore-Support-multi-die-package.patch
+ patches.suse/perf-x86-intel-rapl-Support-multi-die-package.patch
+ patches.suse/perf-x86-intel-cstate-Support-multi-die-package.patch
+ patches.suse/thermal-x86_pkg_temp_thermal-Cosmetic-Rename-interna.patch
+ patches.suse/hwmon-coretemp-Cosmetic-Rename-internal-variables-to.patch
+ patches.suse/perf-x86-intel-uncore-Cosmetic-renames-in-response-t.patch
+ patches.suse/perf-x86-intel-rapl-Cosmetic-rename-internal-variabl.patch
+
# dhowells/linux-fs keys-uefi
patches.suse/0001-KEYS-Allow-unrestricted-boot-time-addition-of-keys-t.patch
patches.suse/0002-efi-Add-EFI-signature-data-types.patch
@@ -47224,17 +47308,9 @@
patches.fixes/block-Don-t-revalidate-bdev-of-hidden-gendisk.patch
patches.suse/nvme-Do-not-remove-namespaces-during-reset.patch
patches.kabi/scsi-hisi-kabi-ignore-new-symbols
- patches.fixes/0001-mwifiex-Fix-possible-buffer-overflows-at-parsing-bss.patch
- patches.fixes/0001-mwifiex-Fix-heap-overflow-in-mwifiex_uap_parse_tail_.patch
- patches.fixes/0001-mwifiex-Abort-at-too-short-BSS-descriptor-element.patch
patches.suse/nvme-skip-nvme_update_disk_info-if-the-controller-is.patch
- patches.fixes/tcp-limit-payload-size-of-sacked-skbs.patch
- patches.fixes/tcp-tcp_fragment-should-apply-sane-memory-limits.patch
patches.kabi/kabi-drop-LINUX_MIB_TCPWQUEUETOOBIG-snmp-counter.patch
- patches.fixes/tcp-add-tcp_min_snd_mss-sysctl.patch
- patches.fixes/tcp-enforce-tcp_min_snd_mss-in-tcp_mtu_probing.patch
patches.kabi/kabi-move-sysctl_tcp_min_snd_mss-to-preserve-struct-.patch
- patches.fixes/tcp-fix-fack_count-accounting-on-tcp_shift_skb_data.patch
########################################################
# end of sorted patches
@@ -47243,6 +47319,11 @@
# git://git.infradead.org/nvme.git nvme-5.2
patches.fixes/nvme-multipath-avoid-crash-on-invalid-subsystem-cntl.patch
+ # tip/tip x86/cpu
+ patches.suse/x86-cpufeatures-Carve-out-CQM-features-retrieval.patch
+ patches.suse/x86-cpufeatures-Combine-word-11-and-12-into-a-new-sc.patch
+ patches.suse/x86-cpufeatures-Enumerate-the-new-AVX512-BFLOAT16-in.patch
+
########################################################
# upstream patches broken after a merge
########################################################
@@ -47607,6 +47688,7 @@
patches.fixes/sunrpc-cache-handle-missing-listeners-better.patch
patches.suse/NFS-optional-NFSv4_2.patch
+ patches.suse/NFS-optional-NFSv4_2-fix.patch
########################################################
# Overlayfs
@@ -47635,6 +47717,9 @@
patches.suse/cdrom-turn-off-autoclose-by-default.patch
patches.suse/scsi-sr-workaround-VMware-ESXi-cdrom-emulation-bug.patch
+ # bsc#1136922
+ patches.fixes/scsi-vmw_pscsi-Fix-use-after-free-in-pvscsi_queue_lc.patch
+
########################################################
# DRM/Video
########################################################
@@ -47666,6 +47751,7 @@
# Out-of-tree networking
########################################################
patches.suse/bsc1084332-0003-lan78xx-Enable-LEDs-and-auto-negotiation.patch
+ patches.suse/ibmveth-Update-ethtool-settings-to-reflect-virtual-p.patch
patches.fixes/irda-Fix-memory-leak-caused-by-repeated-binds-of-ird.patch
patches.fixes/irda-Only-insert-new-objects-into-the-global-databas.patch
@@ -47936,6 +48022,9 @@
patches.kabi/s390-show-statistics-for-msi-irqs
patches.kabi/pci-iov-add-flag-so-platforms-can-skip-vf-scanning
patches.kabi/asus-wmi-kabi-workaround.patch
+ patches.kabi/kabi-x86-microcode-hotplug-state-fix.patch
+ patches.kabi/x86-topology-Add-CPUID.1F-multi-die-package-support.patch
+ patches.kabi/x86-topology-Define-topology_logical_die_id.patch
########################################################
# You'd better have a good reason for adding a patch