All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2 0/2] cpufreq: Stop validating cpufreq table in drivers
@ 2018-04-03 10:07 ` Viresh Kumar
  0 siblings, 0 replies; 12+ messages in thread
From: Viresh Kumar @ 2018-04-03 10:07 UTC (permalink / raw)
  To: Rafael Wysocki, Sudeep Holla
  Cc: Viresh Kumar, Vincent Guittot, linux-arm-kernel, linux-pm

Hi,

Most of the patches from the previous series are already applied but we
didn't remove the cpufreq_table_validate_and_show() helper yet as the
scmi driver came from a different tree than PM.

These can be applied over 4.17-rc1 (that would come out after a week),
currently based off linux next.

Viresh Kumar (2):
  cpufreq: scmi: Don't validate the frequency table twice
  cpufreq: Drop cpufreq_table_validate_and_show()

 Documentation/cpu-freq/core.txt        | 12 +++++-------
 Documentation/cpu-freq/cpu-drivers.txt |  6 ++----
 drivers/cpufreq/freq_table.c           | 14 --------------
 drivers/cpufreq/scmi-cpufreq.c         | 10 +---------
 include/linux/cpufreq.h                |  2 --
 5 files changed, 8 insertions(+), 36 deletions(-)

-- 
2.15.0.194.g9af6a3dea062

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH V2 0/2] cpufreq: Stop validating cpufreq table in drivers
@ 2018-04-03 10:07 ` Viresh Kumar
  0 siblings, 0 replies; 12+ messages in thread
From: Viresh Kumar @ 2018-04-03 10:07 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

Most of the patches from the previous series are already applied but we
didn't remove the cpufreq_table_validate_and_show() helper yet as the
scmi driver came from a different tree than PM.

These can be applied over 4.17-rc1 (that would come out after a week),
currently based off linux next.

Viresh Kumar (2):
  cpufreq: scmi: Don't validate the frequency table twice
  cpufreq: Drop cpufreq_table_validate_and_show()

 Documentation/cpu-freq/core.txt        | 12 +++++-------
 Documentation/cpu-freq/cpu-drivers.txt |  6 ++----
 drivers/cpufreq/freq_table.c           | 14 --------------
 drivers/cpufreq/scmi-cpufreq.c         | 10 +---------
 include/linux/cpufreq.h                |  2 --
 5 files changed, 8 insertions(+), 36 deletions(-)

-- 
2.15.0.194.g9af6a3dea062

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH V2 1/2] cpufreq: scmi: Don't validate the frequency table twice
  2018-04-03 10:07 ` Viresh Kumar
@ 2018-04-03 10:07   ` Viresh Kumar
  -1 siblings, 0 replies; 12+ messages in thread
From: Viresh Kumar @ 2018-04-03 10:07 UTC (permalink / raw)
  To: Rafael Wysocki, Sudeep Holla
  Cc: Viresh Kumar, Vincent Guittot, linux-arm-kernel, linux-pm

The cpufreq core is already validating the CPU frequency table after
calling the ->init() callback of the cpufreq drivers and the drivers
don't need to do the same anymore. Though they need to set the
policy->freq_table field directly from the ->init() callback now.

Stop validating the frequency table from scmi driver.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/cpufreq/scmi-cpufreq.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/cpufreq/scmi-cpufreq.c b/drivers/cpufreq/scmi-cpufreq.c
index 959a1dbe3835..b4dbc77459b6 100644
--- a/drivers/cpufreq/scmi-cpufreq.c
+++ b/drivers/cpufreq/scmi-cpufreq.c
@@ -159,13 +159,7 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy)
 	priv->domain_id = handle->perf_ops->device_domain_id(cpu_dev);
 
 	policy->driver_data = priv;
-
-	ret = cpufreq_table_validate_and_show(policy, freq_table);
-	if (ret) {
-		dev_err(cpu_dev, "%s: invalid frequency table: %d\n", __func__,
-			ret);
-		goto out_free_cpufreq_table;
-	}
+	policy->freq_table = freq_table;
 
 	/* SCMI allows DVFS request for any domain from any CPU */
 	policy->dvfs_possible_from_any_cpu = true;
@@ -179,8 +173,6 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy)
 	policy->fast_switch_possible = true;
 	return 0;
 
-out_free_cpufreq_table:
-	dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table);
 out_free_priv:
 	kfree(priv);
 out_free_opp:
-- 
2.15.0.194.g9af6a3dea062

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH V2 1/2] cpufreq: scmi: Don't validate the frequency table twice
@ 2018-04-03 10:07   ` Viresh Kumar
  0 siblings, 0 replies; 12+ messages in thread
From: Viresh Kumar @ 2018-04-03 10:07 UTC (permalink / raw)
  To: linux-arm-kernel

The cpufreq core is already validating the CPU frequency table after
calling the ->init() callback of the cpufreq drivers and the drivers
don't need to do the same anymore. Though they need to set the
policy->freq_table field directly from the ->init() callback now.

Stop validating the frequency table from scmi driver.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
 drivers/cpufreq/scmi-cpufreq.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/cpufreq/scmi-cpufreq.c b/drivers/cpufreq/scmi-cpufreq.c
index 959a1dbe3835..b4dbc77459b6 100644
--- a/drivers/cpufreq/scmi-cpufreq.c
+++ b/drivers/cpufreq/scmi-cpufreq.c
@@ -159,13 +159,7 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy)
 	priv->domain_id = handle->perf_ops->device_domain_id(cpu_dev);
 
 	policy->driver_data = priv;
-
-	ret = cpufreq_table_validate_and_show(policy, freq_table);
-	if (ret) {
-		dev_err(cpu_dev, "%s: invalid frequency table: %d\n", __func__,
-			ret);
-		goto out_free_cpufreq_table;
-	}
+	policy->freq_table = freq_table;
 
 	/* SCMI allows DVFS request for any domain from any CPU */
 	policy->dvfs_possible_from_any_cpu = true;
@@ -179,8 +173,6 @@ static int scmi_cpufreq_init(struct cpufreq_policy *policy)
 	policy->fast_switch_possible = true;
 	return 0;
 
-out_free_cpufreq_table:
-	dev_pm_opp_free_cpufreq_table(cpu_dev, &freq_table);
 out_free_priv:
 	kfree(priv);
 out_free_opp:
-- 
2.15.0.194.g9af6a3dea062

^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH V2 1/2] cpufreq: scmi: Don't validate the frequency table twice
  2018-04-03 10:07   ` Viresh Kumar
@ 2018-04-04  9:48     ` Sudeep Holla
  -1 siblings, 0 replies; 12+ messages in thread
From: Sudeep Holla @ 2018-04-04  9:48 UTC (permalink / raw)
  To: Viresh Kumar, Rafael Wysocki
  Cc: linux-pm, Vincent Guittot, linux-arm-kernel, Sudeep Holla


(I have exact patches ready :), was on vacation)

On 03/04/18 11:07, Viresh Kumar wrote:
> The cpufreq core is already validating the CPU frequency table after
> calling the ->init() callback of the cpufreq drivers and the drivers
> don't need to do the same anymore. Though they need to set the
> policy->freq_table field directly from the ->init() callback now.
> 
> Stop validating the frequency table from scmi driver.
> 
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

Acked-by: Sudeep Holla <sudeep.holla@arm.com>

-- 
Regards,
Sudeep

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH V2 1/2] cpufreq: scmi: Don't validate the frequency table twice
@ 2018-04-04  9:48     ` Sudeep Holla
  0 siblings, 0 replies; 12+ messages in thread
From: Sudeep Holla @ 2018-04-04  9:48 UTC (permalink / raw)
  To: linux-arm-kernel


(I have exact patches ready :), was on vacation)

On 03/04/18 11:07, Viresh Kumar wrote:
> The cpufreq core is already validating the CPU frequency table after
> calling the ->init() callback of the cpufreq drivers and the drivers
> don't need to do the same anymore. Though they need to set the
> policy->freq_table field directly from the ->init() callback now.
> 
> Stop validating the frequency table from scmi driver.
> 
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

Acked-by: Sudeep Holla <sudeep.holla@arm.com>

-- 
Regards,
Sudeep

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH V2 1/2] cpufreq: scmi: Don't validate the frequency table twice
  2018-04-04  9:48     ` Sudeep Holla
@ 2018-04-09 11:39       ` Rafael J. Wysocki
  -1 siblings, 0 replies; 12+ messages in thread
From: Rafael J. Wysocki @ 2018-04-09 11:39 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: Viresh Kumar, Rafael Wysocki, Vincent Guittot, linux-arm-kernel,
	Linux PM

On Wed, Apr 4, 2018 at 11:48 AM, Sudeep Holla <sudeep.holla@arm.com> wrote:
>
> (I have exact patches ready :), was on vacation)

What am I expected to do with this one?

> On 03/04/18 11:07, Viresh Kumar wrote:
>> The cpufreq core is already validating the CPU frequency table after
>> calling the ->init() callback of the cpufreq drivers and the drivers
>> don't need to do the same anymore. Though they need to set the
>> policy->freq_table field directly from the ->init() callback now.
>>
>> Stop validating the frequency table from scmi driver.
>>
>> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
>
> Acked-by: Sudeep Holla <sudeep.holla@arm.com>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH V2 1/2] cpufreq: scmi: Don't validate the frequency table twice
@ 2018-04-09 11:39       ` Rafael J. Wysocki
  0 siblings, 0 replies; 12+ messages in thread
From: Rafael J. Wysocki @ 2018-04-09 11:39 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Apr 4, 2018 at 11:48 AM, Sudeep Holla <sudeep.holla@arm.com> wrote:
>
> (I have exact patches ready :), was on vacation)

What am I expected to do with this one?

> On 03/04/18 11:07, Viresh Kumar wrote:
>> The cpufreq core is already validating the CPU frequency table after
>> calling the ->init() callback of the cpufreq drivers and the drivers
>> don't need to do the same anymore. Though they need to set the
>> policy->freq_table field directly from the ->init() callback now.
>>
>> Stop validating the frequency table from scmi driver.
>>
>> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
>
> Acked-by: Sudeep Holla <sudeep.holla@arm.com>

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH V2 1/2] cpufreq: scmi: Don't validate the frequency table twice
  2018-04-09 11:39       ` Rafael J. Wysocki
@ 2018-04-09 13:20         ` Sudeep Holla
  -1 siblings, 0 replies; 12+ messages in thread
From: Sudeep Holla @ 2018-04-09 13:20 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Vincent Guittot, Linux PM, Viresh Kumar, Rafael Wysocki,
	Sudeep Holla, linux-arm-kernel



On 09/04/18 12:39, Rafael J. Wysocki wrote:
> On Wed, Apr 4, 2018 at 11:48 AM, Sudeep Holla <sudeep.holla@arm.com> wrote:
>>
>> (I have exact patches ready :), was on vacation)
> 
> What am I expected to do with this one?
> 

Sorry for not being explicit. I assumed you can pick up this patch along
with 2/2 removing the function, that's why I just acked the patch. The
SCMI code is now merged.

>> On 03/04/18 11:07, Viresh Kumar wrote:
>>> The cpufreq core is already validating the CPU frequency table after
>>> calling the ->init() callback of the cpufreq drivers and the drivers
>>> don't need to do the same anymore. Though they need to set the
>>> policy->freq_table field directly from the ->init() callback now.
>>>
>>> Stop validating the frequency table from scmi driver.
>>>
>>> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
>>
>> Acked-by: Sudeep Holla <sudeep.holla@arm.com>

-- 
Regards,
Sudeep

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH V2 1/2] cpufreq: scmi: Don't validate the frequency table twice
@ 2018-04-09 13:20         ` Sudeep Holla
  0 siblings, 0 replies; 12+ messages in thread
From: Sudeep Holla @ 2018-04-09 13:20 UTC (permalink / raw)
  To: linux-arm-kernel



On 09/04/18 12:39, Rafael J. Wysocki wrote:
> On Wed, Apr 4, 2018 at 11:48 AM, Sudeep Holla <sudeep.holla@arm.com> wrote:
>>
>> (I have exact patches ready :), was on vacation)
> 
> What am I expected to do with this one?
> 

Sorry for not being explicit. I assumed you can pick up this patch along
with 2/2 removing the function, that's why I just acked the patch. The
SCMI code is now merged.

>> On 03/04/18 11:07, Viresh Kumar wrote:
>>> The cpufreq core is already validating the CPU frequency table after
>>> calling the ->init() callback of the cpufreq drivers and the drivers
>>> don't need to do the same anymore. Though they need to set the
>>> policy->freq_table field directly from the ->init() callback now.
>>>
>>> Stop validating the frequency table from scmi driver.
>>>
>>> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
>>
>> Acked-by: Sudeep Holla <sudeep.holla@arm.com>

-- 
Regards,
Sudeep

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH V2 1/2] cpufreq: scmi: Don't validate the frequency table twice
  2018-04-09 13:20         ` Sudeep Holla
@ 2018-04-10  6:42           ` Rafael J. Wysocki
  -1 siblings, 0 replies; 12+ messages in thread
From: Rafael J. Wysocki @ 2018-04-10  6:42 UTC (permalink / raw)
  To: Sudeep Holla
  Cc: Vincent Guittot, Linux PM, Viresh Kumar, Rafael J. Wysocki,
	Rafael Wysocki, linux-arm-kernel

On Mon, Apr 9, 2018 at 3:20 PM, Sudeep Holla <sudeep.holla@arm.com> wrote:
>
>
> On 09/04/18 12:39, Rafael J. Wysocki wrote:
>> On Wed, Apr 4, 2018 at 11:48 AM, Sudeep Holla <sudeep.holla@arm.com> wrote:
>>>
>>> (I have exact patches ready :), was on vacation)
>>
>> What am I expected to do with this one?
>>
>
> Sorry for not being explicit. I assumed you can pick up this patch along
> with 2/2 removing the function, that's why I just acked the patch. The
> SCMI code is now merged.

OK, applied now, thanks!

^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH V2 1/2] cpufreq: scmi: Don't validate the frequency table twice
@ 2018-04-10  6:42           ` Rafael J. Wysocki
  0 siblings, 0 replies; 12+ messages in thread
From: Rafael J. Wysocki @ 2018-04-10  6:42 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Apr 9, 2018 at 3:20 PM, Sudeep Holla <sudeep.holla@arm.com> wrote:
>
>
> On 09/04/18 12:39, Rafael J. Wysocki wrote:
>> On Wed, Apr 4, 2018 at 11:48 AM, Sudeep Holla <sudeep.holla@arm.com> wrote:
>>>
>>> (I have exact patches ready :), was on vacation)
>>
>> What am I expected to do with this one?
>>
>
> Sorry for not being explicit. I assumed you can pick up this patch along
> with 2/2 removing the function, that's why I just acked the patch. The
> SCMI code is now merged.

OK, applied now, thanks!

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-04-10  6:42 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-03 10:07 [PATCH V2 0/2] cpufreq: Stop validating cpufreq table in drivers Viresh Kumar
2018-04-03 10:07 ` Viresh Kumar
2018-04-03 10:07 ` [PATCH V2 1/2] cpufreq: scmi: Don't validate the frequency table twice Viresh Kumar
2018-04-03 10:07   ` Viresh Kumar
2018-04-04  9:48   ` Sudeep Holla
2018-04-04  9:48     ` Sudeep Holla
2018-04-09 11:39     ` Rafael J. Wysocki
2018-04-09 11:39       ` Rafael J. Wysocki
2018-04-09 13:20       ` Sudeep Holla
2018-04-09 13:20         ` Sudeep Holla
2018-04-10  6:42         ` Rafael J. Wysocki
2018-04-10  6:42           ` 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.