* [PATCH] cpufreq: AMD: Ignore the check for ProcFeedback in ST/CZ
@ 2018-01-18 8:51 Akshu Agrawal
2018-01-18 9:11 ` Viresh Kumar
0 siblings, 1 reply; 7+ messages in thread
From: Akshu Agrawal @ 2018-01-18 8:51 UTC (permalink / raw)
To: rjw; +Cc: linux-pm, viresh.kumar, satyajit.sahu
In ST/CZ CPUID 8000_0007_EDX[11, ProcFeedbackInterface] is 0,
but the mechanism is still available and can be used.
Change-Id: I5751d92c628da9ad4e15ec34079090c4315d4f2a
Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com>
---
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;
--
2.13.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] cpufreq: AMD: Ignore the check for ProcFeedback in ST/CZ
2018-01-18 8:51 [PATCH] cpufreq: AMD: Ignore the check for ProcFeedback in ST/CZ Akshu Agrawal
@ 2018-01-18 9:11 ` Viresh Kumar
2018-01-18 10:04 ` Agrawal, Akshu
0 siblings, 1 reply; 7+ messages in thread
From: Viresh Kumar @ 2018-01-18 9:11 UTC (permalink / raw)
To: Akshu Agrawal; +Cc: rjw, linux-pm, satyajit.sahu
On 18-01-18, 14:21, Akshu Agrawal wrote:
> In ST/CZ CPUID 8000_0007_EDX[11, ProcFeedbackInterface] is 0,
> but the mechanism is still available and can be used.
>
> Change-Id: I5751d92c628da9ad4e15ec34079090c4315d4f2a
??
> Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com>
> ---
> 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;
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
--
viresh
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] cpufreq: AMD: Ignore the check for ProcFeedback in ST/CZ
2018-01-18 9:11 ` Viresh Kumar
@ 2018-01-18 10:04 ` Agrawal, Akshu
2018-01-18 10:11 ` Viresh Kumar
0 siblings, 1 reply; 7+ messages in thread
From: Agrawal, Akshu @ 2018-01-18 10:04 UTC (permalink / raw)
To: Viresh Kumar; +Cc: rjw, linux-pm, satyajit.sahu
On 1/18/2018 2:41 PM, Viresh Kumar wrote:
> On 18-01-18, 14:21, Akshu Agrawal wrote:
>> In ST/CZ CPUID 8000_0007_EDX[11, ProcFeedbackInterface] is 0,
>> but the mechanism is still available and can be used.
>>
>> Change-Id: I5751d92c628da9ad4e15ec34079090c4315d4f2a
>
> ??
unique-id to keep track of changes. Came in because I made the patch on
a different git.
Removing it and sending a v2.
>
>> Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com>
>> ---
>> 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;
>
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] cpufreq: AMD: Ignore the check for ProcFeedback in ST/CZ
2018-01-18 10:04 ` Agrawal, Akshu
@ 2018-01-18 10:11 ` Viresh Kumar
0 siblings, 0 replies; 7+ messages in thread
From: Viresh Kumar @ 2018-01-18 10:11 UTC (permalink / raw)
To: Agrawal, Akshu; +Cc: rjw, linux-pm, satyajit.sahu
On 18-01-18, 15:34, Agrawal, Akshu wrote:
>
>
> On 1/18/2018 2:41 PM, Viresh Kumar wrote:
> >On 18-01-18, 14:21, Akshu Agrawal wrote:
> >>In ST/CZ CPUID 8000_0007_EDX[11, ProcFeedbackInterface] is 0,
> >>but the mechanism is still available and can be used.
> >>
> >>Change-Id: I5751d92c628da9ad4e15ec34079090c4315d4f2a
> >
> >??
>
> unique-id to keep track of changes. Came in because I made the patch on a
> different git.
> Removing it and sending a v2.
Yeah, I know its a gerrit thing. Just wanted to point out that you
should drop it :)
--
viresh
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] cpufreq: AMD: Ignore the check for ProcFeedback in ST/CZ
2018-01-18 10:42 ` Viresh Kumar
@ 2018-02-08 10:03 ` Rafael J. Wysocki
0 siblings, 0 replies; 7+ messages in thread
From: Rafael J. Wysocki @ 2018-02-08 10:03 UTC (permalink / raw)
To: Viresh Kumar, Akshu Agrawal; +Cc: linux-pm, satyajit.sahu
On Thursday, January 18, 2018 11:42:51 AM CET Viresh Kumar wrote:
> On 18-01-18, 15:51, Akshu Agrawal wrote:
> > 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>
> > ---
> > 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;
>
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Patch applied, thanks!
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] cpufreq: AMD: Ignore the check for ProcFeedback in ST/CZ
2018-01-18 10:21 Akshu Agrawal
@ 2018-01-18 10:42 ` Viresh Kumar
2018-02-08 10:03 ` Rafael J. Wysocki
0 siblings, 1 reply; 7+ messages in thread
From: Viresh Kumar @ 2018-01-18 10:42 UTC (permalink / raw)
To: Akshu Agrawal; +Cc: rjw, linux-pm, satyajit.sahu
On 18-01-18, 15:51, Akshu Agrawal wrote:
> 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>
> ---
> 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;
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
--
viresh
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] cpufreq: AMD: Ignore the check for ProcFeedback in ST/CZ
@ 2018-01-18 10:21 Akshu Agrawal
2018-01-18 10:42 ` Viresh Kumar
0 siblings, 1 reply; 7+ messages in thread
From: Akshu Agrawal @ 2018-01-18 10:21 UTC (permalink / raw)
To: rjw; +Cc: linux-pm, viresh.kumar, satyajit.sahu
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>
---
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;
--
2.13.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-02-08 10:05 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-18 8:51 [PATCH] cpufreq: AMD: Ignore the check for ProcFeedback in ST/CZ Akshu Agrawal
2018-01-18 9:11 ` Viresh Kumar
2018-01-18 10:04 ` Agrawal, Akshu
2018-01-18 10:11 ` Viresh Kumar
2018-01-18 10:21 Akshu Agrawal
2018-01-18 10:42 ` Viresh Kumar
2018-02-08 10:03 ` Rafael J. Wysocki
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.