linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eduardo Valentin <edubezval@gmail.com>
To: Kapileshwar Singh <kapileshwar.singh@arm.com>
Cc: linux-pm@vger.kernel.org, rui.zhang@intel.com,
	Javi.Merino@arm.com, Punit.Agrawal@arm.com
Subject: Re: [PATCH 1/2] thermal: cpu_cooling: Remove cpu_dev update on policy CPU update
Date: Fri, 13 Mar 2015 00:39:22 -0400	[thread overview]
Message-ID: <20150313043920.GA29762@developer.hsd1.ca.comcast.net> (raw)
In-Reply-To: <1426096417-27522-2-git-send-email-kapileshwar.singh@arm.com>

KP,

On Wed, Mar 11, 2015 at 05:53:36PM +0000, Kapileshwar Singh wrote:
> It was initially understood that an update to the cpu_device
> (cached in cpufreq_cooling_device) was required to ascertain the
> correct operating point of the device on a cpufreq policy->cpu update
> or creation or deletion of a cpufreq policy.
> (e.g. when the existing policy CPU goes offline).
> 
> This was added in:
> 
> e0128d8ab423 - thermal: cpu_cooling: implement the power cooling device API


Can you please add a 'fixes' entry here?

> 
> This update is not required and it is possible to ascertain the OPPs
> from the leading CPU in a cpufreq domain even if the CPU is hotplugged out.
> 
> Acked-by: Javi Merino <javi.merino@arm.com>
> Signed-off-by: Kapileshwar Singh <kapileshwar.singh@arm.com>
> ---
>  drivers/thermal/cpu_cooling.c |   40 ----------------------------------------

Your patch looks fine to me, but you have to resend it (same applies to
patch 02). The reason is that I've got it with the charset issue and
characters are mangled. Can you please check with Javi or Punit on how
to setup your mailer?

Thanks,

Eduardo Valentin
>  1 file changed, 40 deletions(-)
> 
> diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
> index c4974144c787..2e15133b4793 100644
> --- a/drivers/thermal/cpu_cooling.c
> +++ b/drivers/thermal/cpu_cooling.c
> @@ -199,39 +199,6 @@ unsigned long cpufreq_cooling_get_level(unsigned int cpu, unsigned int freq)
>  }
>  EXPORT_SYMBOL_GPL(cpufreq_cooling_get_level);
>  
> -static void update_cpu_device(int cpu)
> -{
> -	struct cpufreq_cooling_device *cpufreq_dev;
> -
> -	mutex_lock(&cooling_cpufreq_lock);
> -	list_for_each_entry(cpufreq_dev, &cpufreq_dev_list, node) {
> -		if (cpumask_test_cpu(cpu, &cpufreq_dev->allowed_cpus)) {
> -			cpufreq_dev->cpu_dev = get_cpu_device(cpu);
> -			if (!cpufreq_dev->cpu_dev) {
> -				dev_warn(&cpufreq_dev->cool_dev->device,
> -					"No cpu device for new policy cpu %d\n",
> -					 cpu);
> -			}
> -			break;
> -		}
> -	}
> -	mutex_unlock(&cooling_cpufreq_lock);
> -}
> -
> -static void remove_cpu_device(int cpu)
> -{
> -	struct cpufreq_cooling_device *cpufreq_dev;
> -
> -	mutex_lock(&cooling_cpufreq_lock);
> -	list_for_each_entry(cpufreq_dev, &cpufreq_dev_list, node) {
> -		if (cpumask_test_cpu(cpu, &cpufreq_dev->allowed_cpus)) {
> -			cpufreq_dev->cpu_dev = NULL;
> -			break;
> -		}
> -	}
> -	mutex_unlock(&cooling_cpufreq_lock);
> -}
> -
>  /**
>   * cpufreq_thermal_notifier - notifier callback for cpufreq policy change.
>   * @nb:	struct notifier_block * with callback info.
> @@ -268,13 +235,6 @@ static int cpufreq_thermal_notifier(struct notifier_block *nb,
>  		}
>  		mutex_unlock(&cooling_cpufreq_lock);
>  		break;
> -
> -	case CPUFREQ_CREATE_POLICY:
> -		update_cpu_device(policy->cpu);
> -		break;
> -	case CPUFREQ_REMOVE_POLICY:
> -		remove_cpu_device(policy->cpu);
> -		break;
>  	default:
>  		return NOTIFY_DONE;
>  	}
> -- 
> 1.7.9.5
> 
> 

  reply	other threads:[~2015-03-13  4:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-11 17:53 thermal: cpu_cooling: Power calculation when CPUs are hotplugged Kapileshwar Singh
2015-03-11 17:53 ` [PATCH 1/2] thermal: cpu_cooling: Remove cpu_dev update on policy CPU update Kapileshwar Singh
2015-03-13  4:39   ` Eduardo Valentin [this message]
2015-03-11 17:53 ` [PATCH 2/2] thermal: cpu_cooling: Fix power calculation when CPUs are offline Kapileshwar Singh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150313043920.GA29762@developer.hsd1.ca.comcast.net \
    --to=edubezval@gmail.com \
    --cc=Javi.Merino@arm.com \
    --cc=Punit.Agrawal@arm.com \
    --cc=kapileshwar.singh@arm.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=rui.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).