From: Greg Kroah-Hartman Date: Tue, 27 Mar 2018 07:32:25 +0000 (+0200) Subject: 4.15-stable patches X-Git-Tag: v4.15.14~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=11dbbac98761efd3265feb219fc2c8e9169eb1a7;p=thirdparty%2Fkernel%2Fstable-queue.git 4.15-stable patches added patches: hwmon-k10temp-add-temperature-offset-for-ryzen-1900x.patch hwmon-k10temp-only-apply-temperature-offset-if-result-is-positive.patch --- 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 index 00000000000..634dbdf09ff --- /dev/null +++ b/queue-4.15/hwmon-k10temp-add-temperature-offset-for-ryzen-1900x.patch @@ -0,0 +1,29 @@ +From 6509614fdd2d05c6926d50901a45d5dfb852b715 Mon Sep 17 00:00:00 2001 +From: Guenter Roeck +Date: Fri, 19 Jan 2018 06:38:03 -0800 +Subject: hwmon: (k10temp) Add temperature offset for Ryzen 1900X + +From: Guenter Roeck + +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 +Signed-off-by: Greg Kroah-Hartman + +--- + 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 index 00000000000..8b939a80257 --- /dev/null +++ b/queue-4.15/hwmon-k10temp-only-apply-temperature-offset-if-result-is-positive.patch @@ -0,0 +1,45 @@ +From aef17ca1271948ee57cc39b2493d31110cc42625 Mon Sep 17 00:00:00 2001 +From: Guenter Roeck +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 + +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 +Signed-off-by: Greg Kroah-Hartman + +--- + 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, ®val); + 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/queue-4.15/series b/queue-4.15/series index 2d019fd6921..31f58d0cbf7 100644 --- a/queue-4.15/series +++ b/queue-4.15/series @@ -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