Home Home > GIT Browse > SLE15-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBorislav Petkov <bp@suse.de>2019-06-15 16:33:47 +0200
committerBorislav Petkov <bp@suse.de>2019-06-15 16:33:47 +0200
commit1efb484301d0a0d1fd6f0b4e2899b44b57cda916 (patch)
tree640b617a5827ccdbfe1ca364fb67b760241362c4
parent29482a8dfa914b5e2c2390593cf473ea1429679d (diff)
cpufreq: AMD: Ignore the check for ProcFeedback in ST/CZ
-rw-r--r--patches.drivers/cpufreq-amd-ignore-the-check-for-procfeedback-in-st-cz.patch52
-rw-r--r--series.conf1
2 files changed, 53 insertions, 0 deletions
diff --git a/patches.drivers/cpufreq-amd-ignore-the-check-for-procfeedback-in-st-cz.patch b/patches.drivers/cpufreq-amd-ignore-the-check-for-procfeedback-in-st-cz.patch
new file mode 100644
index 0000000000..57f06dc96c
--- /dev/null
+++ b/patches.drivers/cpufreq-amd-ignore-the-check-for-procfeedback-in-st-cz.patch
@@ -0,0 +1,52 @@
+From: Akshu Agrawal <Akshu.Agrawal@amd.com>
+Date: Thu, 18 Jan 2018 15:51:30 +0530
+Subject: cpufreq: AMD: Ignore the check for ProcFeedback in ST/CZ
+Git-commit: 59a3b3a8db16621574cbac69f6f1eddb9c60e821
+Patch-mainline: v4.16-rc1
+References: fate#327735
+
+In ST/CZ CPUID 8000_0007_EDX[11, ProcFeedbackInterface] is 0,
+but the mechanism is still available and can be used.
+
+Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com>
+Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Acked-by: Borislav Petkov <bp@suse.de>
+---
+ drivers/cpufreq/amd_freq_sensitivity.c | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/cpufreq/amd_freq_sensitivity.c b/drivers/cpufreq/amd_freq_sensitivity.c
+index 042023bbbf62..be926d9a66e5 100644
+--- a/drivers/cpufreq/amd_freq_sensitivity.c
++++ b/drivers/cpufreq/amd_freq_sensitivity.c
+@@ -14,6 +14,7 @@
+ #include <linux/kernel.h>
+ #include <linux/module.h>
+ #include <linux/types.h>
++#include <linux/pci.h>
+ #include <linux/percpu-defs.h>
+ #include <linux/init.h>
+ #include <linux/mod_devicetable.h>
+@@ -109,12 +110,18 @@ static unsigned int amd_powersave_bias_target(struct cpufreq_policy *policy,
+ static int __init amd_freq_sensitivity_init(void)
+ {
+ u64 val;
++ struct pci_dev *pcidev;
+
+ if (boot_cpu_data.x86_vendor != X86_VENDOR_AMD)
+ return -ENODEV;
+
+- if (!static_cpu_has(X86_FEATURE_PROC_FEEDBACK))
+- return -ENODEV;
++ pcidev = pci_get_device(PCI_VENDOR_ID_AMD,
++ PCI_DEVICE_ID_AMD_KERNCZ_SMBUS, NULL);
++
++ if (!pcidev) {
++ if (!static_cpu_has(X86_FEATURE_PROC_FEEDBACK))
++ return -ENODEV;
++ }
+
+ if (rdmsrl_safe(MSR_AMD64_FREQ_SENSITIVITY_ACTUAL, &val))
+ return -ENODEV;
+
diff --git a/series.conf b/series.conf
index 9d11fc2e87..d23ff8fc0d 100644
--- a/series.conf
+++ b/series.conf
@@ -13532,6 +13532,7 @@
patches.fixes/gcc-plugins-add-include-required-by-gcc-release-8.patch
patches.fixes/gcc-plugins-use-dynamic-initializers.patch
patches.fixes/nfsd4-permit-layoutget-of-executable-only-files.patch
+ patches.drivers/cpufreq-amd-ignore-the-check-for-procfeedback-in-st-cz.patch
patches.arch/x86-pm-make-apm-idle-driver-initialize-polling-state
patches.drivers/ACPI-sbshc-remove-raw-pointer-from-printk-message
patches.drivers/ACPI-bus-Do-not-call-_STA-on-battery-devices-with-un