* [PATCH 1/1] Cpufreq: Remove fossil comment of cpufreq_set_policy
@ 2013-09-10 14:44 tianyu.lan
2013-09-10 15:31 ` Viresh Kumar
0 siblings, 1 reply; 6+ messages in thread
From: tianyu.lan @ 2013-09-10 14:44 UTC (permalink / raw)
To: rjw, viresh.kumar; +Cc: Lan Tianyu, cpufreq, linux-pm, linux-kernel
From: Lan Tianyu <tianyu.lan@intel.com>
The cpufreq_set_policy() has been removed by commit 632786c. So remove
related comment.
---
drivers/cpufreq/cpufreq.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 5c75e31..a504313 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -506,10 +506,6 @@ static ssize_t store_scaling_governor(struct cpufreq_policy *policy,
&new_policy.governor))
return -EINVAL;
- /*
- * Do not use cpufreq_set_policy here or the user_policy.max
- * will be wrongly overridden
- */
ret = __cpufreq_set_policy(policy, &new_policy);
policy->user_policy.policy = policy->policy;
--
1.8.2.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] Cpufreq: Remove fossil comment of cpufreq_set_policy
2013-09-10 14:44 [PATCH 1/1] Cpufreq: Remove fossil comment of cpufreq_set_policy tianyu.lan
@ 2013-09-10 15:31 ` Viresh Kumar
2013-09-11 3:28 ` Lan Tianyu
0 siblings, 1 reply; 6+ messages in thread
From: Viresh Kumar @ 2013-09-10 15:31 UTC (permalink / raw)
To: Lan Tianyu
Cc: Rafael J. Wysocki, cpufreq, linux-pm, Linux Kernel Mailing List
On 10 September 2013 20:14, <tianyu.lan@intel.com> wrote:
> From: Lan Tianyu <tianyu.lan@intel.com>
>
> The cpufreq_set_policy() has been removed by commit 632786c. So remove
> related comment.
> ---
> drivers/cpufreq/cpufreq.c | 4 ----
> 1 file changed, 4 deletions(-)
I have got another patch that takes care of this while fixing other issues..
Yet to be posted though.. but I have queued it up for 3.13..
https://git.linaro.org/gitweb?p=people/vireshk/linux.git;a=commit;h=85267596078e3160b3b03de39d95c8e4b5bdf554
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] Cpufreq: Remove fossil comment of cpufreq_set_policy
2013-09-10 15:31 ` Viresh Kumar
@ 2013-09-11 3:28 ` Lan Tianyu
0 siblings, 0 replies; 6+ messages in thread
From: Lan Tianyu @ 2013-09-11 3:28 UTC (permalink / raw)
To: Viresh Kumar
Cc: Rafael J. Wysocki, cpufreq, linux-pm, Linux Kernel Mailing List
On 2013年09月10日 23:31, Viresh Kumar wrote:
> On 10 September 2013 20:14, <tianyu.lan@intel.com> wrote:
>> From: Lan Tianyu <tianyu.lan@intel.com>
>>
>> The cpufreq_set_policy() has been removed by commit 632786c. So remove
>> related comment.
>> ---
>> drivers/cpufreq/cpufreq.c | 4 ----
>> 1 file changed, 4 deletions(-)
>
> I have got another patch that takes care of this while fixing other issues..
> Yet to be posted though.. but I have queued it up for 3.13..
>
> https://git.linaro.org/gitweb?p=people/vireshk/linux.git;a=commit;h=85267596078e3160b3b03de39d95c8e4b5bdf554
>
Ok. I get it. Please ignore it. I just find another such comment related
with cpufreq_set_policy(). Please have a look.
>From 668e1b6fd94b5c0e56a651b4c60cbbc7a6868b46 Mon Sep 17 00:00:00 2001
From: Lan Tianyu <tianyu.lan@intel.com>
Date: Wed, 11 Sep 2013 11:31:15 +0800
Subject: [PATCH] Cpufreq/governor: Remove fossil comment
cpufreq_set_policy() has been changed to origin __cpufreq_set_policy()
and policy->lock has been converted to rewrite lock by commit 5a01f2.
So remove it.
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
---
drivers/cpufreq/cpufreq_userspace.c | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/drivers/cpufreq/cpufreq_userspace.c
b/drivers/cpufreq/cpufreq_userspace.c
index 0307809..4dbf1db 100644
--- a/drivers/cpufreq/cpufreq_userspace.c
+++ b/drivers/cpufreq/cpufreq_userspace.c
@@ -38,18 +38,7 @@ static int cpufreq_set(struct cpufreq_policy *policy,
unsigned int freq)
if (!per_cpu(cpu_is_managed, policy->cpu))
goto err;
- /*
- * We're safe from concurrent calls to ->target() here
- * as we hold the userspace_mutex lock. If we were calling
- * cpufreq_driver_target, a deadlock situation might occur:
- * A: cpufreq_set (lock userspace_mutex) ->
- * cpufreq_driver_target(lock policy->lock)
- * B: cpufreq_set_policy(lock policy->lock) ->
- * __cpufreq_governor ->
- * cpufreq_governor_userspace (lock userspace_mutex)
- */
ret = __cpufreq_driver_target(policy, freq, CPUFREQ_RELATION_L);
-
err:
mutex_unlock(&userspace_mutex);
return ret;
--
1.8.4.rc0.1.g8f6a3e5.dirty
--
Best regards
Tianyu Lan
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] Cpufreq: Remove fossil comment of cpufreq_set_policy
@ 2013-09-11 3:28 ` Lan Tianyu
0 siblings, 0 replies; 6+ messages in thread
From: Lan Tianyu @ 2013-09-11 3:28 UTC (permalink / raw)
To: Viresh Kumar
Cc: Rafael J. Wysocki, cpufreq, linux-pm, Linux Kernel Mailing List
On 2013年09月10日 23:31, Viresh Kumar wrote:
> On 10 September 2013 20:14, <tianyu.lan@intel.com> wrote:
>> From: Lan Tianyu <tianyu.lan@intel.com>
>>
>> The cpufreq_set_policy() has been removed by commit 632786c. So remove
>> related comment.
>> ---
>> drivers/cpufreq/cpufreq.c | 4 ----
>> 1 file changed, 4 deletions(-)
>
> I have got another patch that takes care of this while fixing other issues..
> Yet to be posted though.. but I have queued it up for 3.13..
>
> https://git.linaro.org/gitweb?p=people/vireshk/linux.git;a=commit;h=85267596078e3160b3b03de39d95c8e4b5bdf554
>
Ok. I get it. Please ignore it. I just find another such comment related
with cpufreq_set_policy(). Please have a look.
From 668e1b6fd94b5c0e56a651b4c60cbbc7a6868b46 Mon Sep 17 00:00:00 2001
From: Lan Tianyu <tianyu.lan@intel.com>
Date: Wed, 11 Sep 2013 11:31:15 +0800
Subject: [PATCH] Cpufreq/governor: Remove fossil comment
cpufreq_set_policy() has been changed to origin __cpufreq_set_policy()
and policy->lock has been converted to rewrite lock by commit 5a01f2.
So remove it.
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
---
drivers/cpufreq/cpufreq_userspace.c | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/drivers/cpufreq/cpufreq_userspace.c
b/drivers/cpufreq/cpufreq_userspace.c
index 0307809..4dbf1db 100644
--- a/drivers/cpufreq/cpufreq_userspace.c
+++ b/drivers/cpufreq/cpufreq_userspace.c
@@ -38,18 +38,7 @@ static int cpufreq_set(struct cpufreq_policy *policy,
unsigned int freq)
if (!per_cpu(cpu_is_managed, policy->cpu))
goto err;
- /*
- * We're safe from concurrent calls to ->target() here
- * as we hold the userspace_mutex lock. If we were calling
- * cpufreq_driver_target, a deadlock situation might occur:
- * A: cpufreq_set (lock userspace_mutex) ->
- * cpufreq_driver_target(lock policy->lock)
- * B: cpufreq_set_policy(lock policy->lock) ->
- * __cpufreq_governor ->
- * cpufreq_governor_userspace (lock userspace_mutex)
- */
ret = __cpufreq_driver_target(policy, freq, CPUFREQ_RELATION_L);
-
err:
mutex_unlock(&userspace_mutex);
return ret;
--
1.8.4.rc0.1.g8f6a3e5.dirty
--
Best regards
Tianyu Lan
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] Cpufreq: Remove fossil comment of cpufreq_set_policy
2013-09-11 3:28 ` Lan Tianyu
(?)
@ 2013-09-11 10:08 ` Viresh Kumar
2013-09-11 12:39 ` Lan Tianyu
-1 siblings, 1 reply; 6+ messages in thread
From: Viresh Kumar @ 2013-09-11 10:08 UTC (permalink / raw)
To: Lan Tianyu
Cc: Rafael J. Wysocki, cpufreq, linux-pm, Linux Kernel Mailing List
On 11 September 2013 08:58, Lan Tianyu <tianyu.lan@intel.com> wrote:
> From 668e1b6fd94b5c0e56a651b4c60cbbc7a6868b46 Mon Sep 17 00:00:00 2001
> From: Lan Tianyu <tianyu.lan@intel.com>
> Date: Wed, 11 Sep 2013 11:31:15 +0800
> Subject: [PATCH] Cpufreq/governor: Remove fossil comment
>
> cpufreq_set_policy() has been changed to origin __cpufreq_set_policy()
> and policy->lock has been converted to rewrite lock by commit 5a01f2.
> So remove it.
>
> Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
> ---
> drivers/cpufreq/cpufreq_userspace.c | 11 -----------
> 1 file changed, 11 deletions(-)
>
> diff --git a/drivers/cpufreq/cpufreq_userspace.c
> b/drivers/cpufreq/cpufreq_userspace.c
> index 0307809..4dbf1db 100644
> --- a/drivers/cpufreq/cpufreq_userspace.c
> +++ b/drivers/cpufreq/cpufreq_userspace.c
> @@ -38,18 +38,7 @@ static int cpufreq_set(struct cpufreq_policy *policy,
> unsigned int freq)
> if (!per_cpu(cpu_is_managed, policy->cpu))
> goto err;
>
> - /*
> - * We're safe from concurrent calls to ->target() here
> - * as we hold the userspace_mutex lock. If we were calling
> - * cpufreq_driver_target, a deadlock situation might occur:
> - * A: cpufreq_set (lock userspace_mutex) ->
> - * cpufreq_driver_target(lock policy->lock)
> - * B: cpufreq_set_policy(lock policy->lock) ->
> - * __cpufreq_governor ->
> - * cpufreq_governor_userspace (lock userspace_mutex)
> - */
> ret = __cpufreq_driver_target(policy, freq, CPUFREQ_RELATION_L);
> -
> err:
> mutex_unlock(&userspace_mutex);
> return ret;
Looks fine:
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] Cpufreq: Remove fossil comment of cpufreq_set_policy
2013-09-11 10:08 ` Viresh Kumar
@ 2013-09-11 12:39 ` Lan Tianyu
0 siblings, 0 replies; 6+ messages in thread
From: Lan Tianyu @ 2013-09-11 12:39 UTC (permalink / raw)
To: Viresh Kumar
Cc: Rafael J. Wysocki, cpufreq, linux-pm, Linux Kernel Mailing List
On 09/11/2013 06:08 AM, Viresh Kumar wrote:
> On 11 September 2013 08:58, Lan Tianyu <tianyu.lan@intel.com> wrote:
>> From 668e1b6fd94b5c0e56a651b4c60cbbc7a6868b46 Mon Sep 17 00:00:00 2001
>> From: Lan Tianyu <tianyu.lan@intel.com>
>> Date: Wed, 11 Sep 2013 11:31:15 +0800
>> Subject: [PATCH] Cpufreq/governor: Remove fossil comment
>>
>> cpufreq_set_policy() has been changed to origin __cpufreq_set_policy()
>> and policy->lock has been converted to rewrite lock by commit 5a01f2.
>> So remove it.
>>
>> Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
>> ---
>> drivers/cpufreq/cpufreq_userspace.c | 11 -----------
>> 1 file changed, 11 deletions(-)
>>
>> diff --git a/drivers/cpufreq/cpufreq_userspace.c
>> b/drivers/cpufreq/cpufreq_userspace.c
>> index 0307809..4dbf1db 100644
>> --- a/drivers/cpufreq/cpufreq_userspace.c
>> +++ b/drivers/cpufreq/cpufreq_userspace.c
>> @@ -38,18 +38,7 @@ static int cpufreq_set(struct cpufreq_policy *policy,
>> unsigned int freq)
>> if (!per_cpu(cpu_is_managed, policy->cpu))
>> goto err;
>>
>> - /*
>> - * We're safe from concurrent calls to ->target() here
>> - * as we hold the userspace_mutex lock. If we were calling
>> - * cpufreq_driver_target, a deadlock situation might occur:
>> - * A: cpufreq_set (lock userspace_mutex) ->
>> - * cpufreq_driver_target(lock policy->lock)
>> - * B: cpufreq_set_policy(lock policy->lock) ->
>> - * __cpufreq_governor ->
>> - * cpufreq_governor_userspace (lock userspace_mutex)
>> - */
>> ret = __cpufreq_driver_target(policy, freq, CPUFREQ_RELATION_L);
>> -
>> err:
>> mutex_unlock(&userspace_mutex);
>> return ret;
>
> Looks fine:
>
> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
>
Thanks. I will send formal version.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-09-11 12:39 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-10 14:44 [PATCH 1/1] Cpufreq: Remove fossil comment of cpufreq_set_policy tianyu.lan
2013-09-10 15:31 ` Viresh Kumar
2013-09-11 3:28 ` Lan Tianyu
2013-09-11 3:28 ` Lan Tianyu
2013-09-11 10:08 ` Viresh Kumar
2013-09-11 12:39 ` Lan Tianyu
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.