Linux-PM Archive on lore.kernel.org
 help / color / Atom feed
From: Eduardo Valentin <edubezval@gmail.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: linux-pm@vger.kernel.org, linaro-kernel@lists.linaro.org,
	rui.zhang@intel.com,
	Amit Daniel Kachhap <amit.daniel@samsung.com>,
	Chanwoo Choi <cw00.choi@samsung.com>,
	Hongbo Zhang <hongbo.zhang@linaro.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Lukasz Majewski <l.majewski@samsung.com>,
	Shawn Guo <shawn.guo@linaro.org>
Subject: Re: [PATCH 00/26] thermal: cpu_cooling: Fixes and cleanups
Date: Fri, 28 Nov 2014 09:26:01 -0400
Message-ID: <20141128132559.GA23674@developer> (raw)
In-Reply-To: <cover.1417167599.git.viresh.kumar@linaro.org>


[-- Attachment #1: Type: text/plain, Size: 4637 bytes --]


Hello Viresh,

On Fri, Nov 28, 2014 at 03:13:54PM +0530, Viresh Kumar wrote:
> Hi Eduardo,
> 
> As you know I got into fixing cpu_cooling.c due to some cpufreq issues you and
> Lukasz were struggling with. I found some issues in cpu_cooling then and here
> are the fixes/cleanups.
> 

Ok. No problem. As I mentioned before, good to have a review in the code
by someone with extra experience with cpufreq. 

Well, I don't think there was an issue with cpufreq itself. The struggle
is with sequencing, specially during booting. The Linux booting sequencing,
when it comes to builtin module dependency and probing, does not help
much. So, we need to do some tricks with the APIs.


> Sorry for the long list. Haven't broken them into smaller sets as most of the
> patches are very small, easy to review and inter-dependent. Only few of them
> should take more time to review. If this doesn't work out, let me know and I
> will try to send separate inter-dependent sets.
> 

I am fine with this approach, because now you are dealing with a single
target: refactoring cpu cooling code.


> Just apply whatever looks fine and I will update/resend the ones left in V2 if
> at required.

sure, I will have a look.

> 
> First few are updates to platform drivers. Exynos fails to register after few
> patches in this series as it doesn't handle -EPROBE_DEFER properly (reported
> that in reply to your patch as well). Others weren't setting clip_cpus properly
> and are fixed.

OK. 

About Exynos, at which point/patch Exynos starts to fail?

As I mentioned in the thread about cpu cooling vs. cpufreq, I prefer to
update all users of the updated [of_]cpufreq_cooling_register API, if
you don't mind. 

Can you please elaborate a little more about how this failure is
happening?

> 
> Next ones are cleanups of cpu_cooling.c to get things properly organized.
> 
> Let me know if I screwed it up completely.
> 

hehehe.. Ok. I will let you know.

> Tested-on: Exynos5250 (Dual ARM Cortex A15).
> Rebased-over: v3.18-rc6
> Pushed here: git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/linux.git
> thermal/cpu-cooling-fixes
> 
> Cc: Amit Daniel Kachhap <amit.daniel@samsung.com>
> Cc: Chanwoo Choi <cw00.choi@samsung.com>
> Cc: Hongbo Zhang <hongbo.zhang@linaro.com>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Lukasz Majewski <l.majewski@samsung.com>
> Cc: Shawn Guo <shawn.guo@linaro.org>
> 
> Viresh Kumar (26):
>   thermal: db8500: pass cpu_present_mask to cpufreq_cooling_register()
>   thermal: imx: pass cpu_present_mask to cpufreq_cooling_register()
>   thermal: exynos: pass cpu_present_mask to cpufreq_cooling_register()
>   thermal: exynos: Handle -EPROBE_DEFER properly
>   cpu_cooling: random comment fixups
>   cpu_cooling: fix doc comment over struct cpufreq_cooling_device
>   cpu_cooling: Add comment to clarify relation between cooling state and
>     frequency
>   cpu_cooling: Pass variable instead of its type to sizeof()
>   cpu_cooling: no need to set cpufreq_state to zero
>   cpu_cooling: no need to set cpufreq_dev to NULL
>   cpu_cooling: propagate error returned by idr_alloc()
>   cpu_cooling: Don't match min/max frequencies for all CPUs on cooling
>     register
>   cpu_cooling: don't iterate over all allowed_cpus to update cpufreq
>     policy
>   cpu_cooling: Don't check is_cpufreq_valid()
>   cpu_cooling: do error handling at the bottom in
>     __cpufreq_cooling_register()
>   cpu_cooling: Drop useless locking around idr_alloc/idr_remove
>   cpu_cooling: Merge cpufreq_apply_cooling() into
>     cpufreq_set_cur_state()
>   cpu_cooling: Merge get_cpu_frequency() into cpufreq_set_cur_state()
>   cpu_cooling: find max level during device registration
>   cpu_cooling: get_property() doesn't need to support GET_MAXL anymore
>   cpu_cooling: create list of cpufreq_cooling_devices
>   cpu_cooling: use cpufreq_dev_list instead of cpufreq_dev_count
>   cpu_cooling: Pass 'cpufreq_dev' to get_property()
>   cpu_cooling: Store frequencies in descending order
>   cpu_cooling: Use cpufreq_dev->freq_table for finding level/freq
>   cpu_cooling: update copyright tags
> 
>  drivers/thermal/cpu_cooling.c                   | 405 +++++++++---------------
>  drivers/thermal/db8500_cpufreq_cooling.c        |   5 +-
>  drivers/thermal/imx_thermal.c                   |   4 +-
>  drivers/thermal/samsung/exynos_thermal_common.c |  11 +-
>  drivers/thermal/samsung/exynos_tmu.c            |   4 +-
>  5 files changed, 153 insertions(+), 276 deletions(-)
> 
> -- 
> 2.0.3.693.g996b0fd
> 

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  parent reply index

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-28  9:43 Viresh Kumar
2014-11-28  9:43 ` [PATCH 01/26] thermal: db8500: pass cpu_present_mask to cpufreq_cooling_register() Viresh Kumar
2014-11-28  9:43 ` [PATCH 02/26] thermal: imx: " Viresh Kumar
2014-11-28  9:43 ` [PATCH 03/26] thermal: exynos: " Viresh Kumar
2014-11-28  9:43 ` [PATCH 04/26] thermal: exynos: Handle -EPROBE_DEFER properly Viresh Kumar
2014-12-02 23:08   ` Eduardo Valentin
2014-11-28  9:43 ` [PATCH 05/26] cpu_cooling: random comment fixups Viresh Kumar
2014-12-02 23:09   ` Eduardo Valentin
2014-11-28  9:44 ` [PATCH 06/26] cpu_cooling: fix doc comment over struct cpufreq_cooling_device Viresh Kumar
2014-11-28  9:44 ` [PATCH 07/26] cpu_cooling: Add comment to clarify relation between cooling state and frequency Viresh Kumar
2014-11-28  9:44 ` [PATCH 08/26] cpu_cooling: Pass variable instead of its type to sizeof() Viresh Kumar
2014-12-02 15:26   ` Javi Merino
2014-12-02 23:07     ` Eduardo Valentin
2014-12-03  4:38       ` Viresh Kumar
2014-11-28  9:44 ` [PATCH 09/26] cpu_cooling: no need to set cpufreq_state to zero Viresh Kumar
2014-11-28  9:44 ` [PATCH 10/26] cpu_cooling: no need to set cpufreq_dev to NULL Viresh Kumar
2014-11-28  9:44 ` [PATCH 11/26] cpu_cooling: propagate error returned by idr_alloc() Viresh Kumar
2014-12-02 15:35   ` Javi Merino
2014-12-03  4:36     ` Viresh Kumar
2014-12-02 23:03   ` Eduardo Valentin
2014-11-28  9:44 ` [PATCH 12/26] cpu_cooling: Don't match min/max frequencies for all CPUs on cooling register Viresh Kumar
2014-11-28  9:44 ` [PATCH 13/26] cpu_cooling: don't iterate over all allowed_cpus to update cpufreq policy Viresh Kumar
2014-11-28  9:44 ` [PATCH 14/26] cpu_cooling: Don't check is_cpufreq_valid() Viresh Kumar
2014-11-28  9:44 ` [PATCH 15/26] cpu_cooling: do error handling at the bottom in __cpufreq_cooling_register() Viresh Kumar
2014-12-02 15:45   ` Javi Merino
2014-11-28  9:44 ` [PATCH 16/26] cpu_cooling: Drop useless locking around idr_alloc/idr_remove Viresh Kumar
2014-12-02 15:53   ` Javi Merino
2014-12-02 23:05   ` Eduardo Valentin
2014-12-03  9:32     ` Viresh Kumar
2014-11-28  9:44 ` [PATCH 17/26] cpu_cooling: Merge cpufreq_apply_cooling() into cpufreq_set_cur_state() Viresh Kumar
2014-11-28  9:44 ` [PATCH 18/26] cpu_cooling: Merge get_cpu_frequency() " Viresh Kumar
2014-11-28  9:44 ` [PATCH 19/26] cpu_cooling: find max level during device registration Viresh Kumar
2014-12-02 23:39   ` Eduardo Valentin
2014-12-03  4:57     ` Viresh Kumar
2014-12-03 13:40       ` Eduardo Valentin
2014-11-28  9:44 ` [PATCH 20/26] cpu_cooling: get_property() doesn't need to support GET_MAXL anymore Viresh Kumar
2014-11-28  9:44 ` [PATCH 21/26] cpu_cooling: create list of cpufreq_cooling_devices Viresh Kumar
2014-12-02 23:12   ` Eduardo Valentin
2014-11-28  9:44 ` [PATCH 22/26] cpu_cooling: use cpufreq_dev_list instead of cpufreq_dev_count Viresh Kumar
2014-11-28  9:44 ` [PATCH 23/26] cpu_cooling: Pass 'cpufreq_dev' to get_property() Viresh Kumar
2014-11-28  9:44 ` [PATCH 24/26] cpu_cooling: Store frequencies in descending order Viresh Kumar
2014-12-02 23:21   ` Eduardo Valentin
2014-12-03  4:52     ` Viresh Kumar
2014-12-03 13:41       ` Eduardo Valentin
     [not found]         ` <CAKohponw7E9yyvjhP97CzjtcFcq3N+5ysde7DR5q+Nm0s=bKAw@mail.gmail.com>
2014-12-03 14:00           ` Eduardo Valentin
2014-11-28  9:44 ` [PATCH 25/26] cpu_cooling: Use cpufreq_dev->freq_table for finding level/freq Viresh Kumar
2014-12-02 23:36   ` Eduardo Valentin
2014-12-03  5:10     ` Viresh Kumar
2014-12-03 13:32       ` Eduardo Valentin
2014-11-28  9:44 ` [PATCH 26/26] cpu_cooling: update copyright tags Viresh Kumar
2014-12-02 19:41   ` Eduardo Valentin
2014-12-03  4:34     ` Viresh Kumar
2014-12-04  4:41       ` amit daniel kachhap
2014-11-28 13:26 ` Eduardo Valentin [this message]
2014-11-28 13:41   ` [PATCH 00/26] thermal: cpu_cooling: Fixes and cleanups Viresh Kumar

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=20141128132559.GA23674@developer \
    --to=edubezval@gmail.com \
    --cc=amit.daniel@samsung.com \
    --cc=cw00.choi@samsung.com \
    --cc=hongbo.zhang@linaro.com \
    --cc=kyungmin.park@samsung.com \
    --cc=l.majewski@samsung.com \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=shawn.guo@linaro.org \
    --cc=viresh.kumar@linaro.org \
    /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

Linux-PM Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-pm/0 linux-pm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-pm linux-pm/ https://lore.kernel.org/linux-pm \
		linux-pm@vger.kernel.org
	public-inbox-index linux-pm

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-pm


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git