]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Mar 2018 07:32:25 +0000 (09:32 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Mar 2018 07:32:25 +0000 (09:32 +0200)
added patches:
hwmon-k10temp-add-temperature-offset-for-ryzen-1900x.patch
hwmon-k10temp-only-apply-temperature-offset-if-result-is-positive.patch

queue-4.15/hwmon-k10temp-add-temperature-offset-for-ryzen-1900x.patch [new file with mode: 0644]
queue-4.15/hwmon-k10temp-only-apply-temperature-offset-if-result-is-positive.patch [new file with mode: 0644]
queue-4.15/series

diff --git a/queue-4.15/hwmon-k10temp-add-temperature-offset-for-ryzen-1900x.patch b/queue-4.15/hwmon-k10temp-add-temperature-offset-for-ryzen-1900x.patch
new file mode 100644 (file)
index 0000000..634dbdf
--- /dev/null
@@ -0,0 +1,29 @@
+From 6509614fdd2d05c6926d50901a45d5dfb852b715 Mon Sep 17 00:00:00 2001
+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
+
+From: Guenter Roeck <linux@roeck-us.net>
+
+commit 6509614fdd2d05c6926d50901a45d5dfb852b715 upstream.
+
+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>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/hwmon/k10temp.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/hwmon/k10temp.c
++++ b/drivers/hwmon/k10temp.c
+@@ -86,6 +86,7 @@ static const struct tctl_offset tctl_off
+       { 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/queue-4.15/hwmon-k10temp-only-apply-temperature-offset-if-result-is-positive.patch b/queue-4.15/hwmon-k10temp-only-apply-temperature-offset-if-result-is-positive.patch
new file mode 100644 (file)
index 0000000..8b939a8
--- /dev/null
@@ -0,0 +1,45 @@
+From aef17ca1271948ee57cc39b2493d31110cc42625 Mon Sep 17 00:00:00 2001
+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
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Guenter Roeck <linux@roeck-us.net>
+
+commit aef17ca1271948ee57cc39b2493d31110cc42625 upstream.
+
+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>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/hwmon/k10temp.c |    5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/drivers/hwmon/k10temp.c
++++ b/drivers/hwmon/k10temp.c
+@@ -128,7 +128,10 @@ static ssize_t temp1_input_show(struct d
+       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);
+ }
index 2d019fd69219f7dee79a80110cd598171f5847de..31f58d0cbf76e9f6ebf88c607b3d3712cf983320 100644 (file)
@@ -88,3 +88,5 @@ posix-timers-protect-posix-clock-array-access-against-speculation.patch
 kvm-x86-fix-icebp-instruction-handling.patch
 x86-build-64-force-the-linker-to-use-2mb-page-size.patch
 x86-boot-64-verify-alignment-of-the-load-segment.patch
+hwmon-k10temp-only-apply-temperature-offset-if-result-is-positive.patch
+hwmon-k10temp-add-temperature-offset-for-ryzen-1900x.patch