Re: [PATCH v3 1/5] powernv: cpufreq driver for powernv platform

2014-03-21 Thread Viresh Kumar
On Thu, Mar 20, 2014 at 5:40 PM, Gautham R. Shenoy e...@linux.vnet.ibm.com wrote: From: Vaidyanathan Srinivasan sva...@linux.vnet.ibm.com Hi Vaidy, diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig index 4b029c0..4ba1632 100644 --- a/drivers/cpufreq/Kconfig +++

Re: [PATCH v3 1/5] powernv: cpufreq driver for powernv platform

2014-03-21 Thread Gautham R Shenoy
Hi Viresh, On Fri, Mar 21, 2014 at 02:11:32PM +0530, Viresh Kumar wrote: On Thu, Mar 20, 2014 at 5:40 PM, Gautham R. Shenoy e...@linux.vnet.ibm.com wrote: From: Vaidyanathan Srinivasan sva...@linux.vnet.ibm.com Hi Vaidy, diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig

Re: [PATCH v3 1/5] powernv: cpufreq driver for powernv platform

2014-03-21 Thread Viresh Kumar
On 21 March 2014 16:13, Gautham R Shenoy e...@linux.vnet.ibm.com wrote: On Fri, Mar 21, 2014 at 02:11:32PM +0530, Viresh Kumar wrote: + pr_debug(PState id %d freq %d MHz\n, id, freq); + powernv_freqs[i].driver_data = i; I don't think you are using this field at

Re: [PATCH v3 1/5] powernv: cpufreq driver for powernv platform

2014-03-21 Thread Srivatsa S. Bhat
On 03/21/2014 04:24 PM, Viresh Kumar wrote: On 21 March 2014 16:13, Gautham R Shenoy e...@linux.vnet.ibm.com wrote: On Fri, Mar 21, 2014 at 02:11:32PM +0530, Viresh Kumar wrote: + pr_debug(PState id %d freq %d MHz\n, id, freq); + powernv_freqs[i].driver_data = i;

Re: [PATCH v3 1/5] powernv: cpufreq driver for powernv platform

2014-03-21 Thread Srivatsa S. Bhat
On 03/21/2014 02:11 PM, Viresh Kumar wrote: On Thu, Mar 20, 2014 at 5:40 PM, Gautham R. Shenoy e...@linux.vnet.ibm.com wrote: From: Vaidyanathan Srinivasan sva...@linux.vnet.ibm.com Hi Vaidy, diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig index 4b029c0..4ba1632 100644

Re: [PATCH v3 1/5] powernv: cpufreq driver for powernv platform

2014-03-21 Thread Viresh Kumar
On 21 March 2014 17:15, Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com wrote: I think you have Srivatsa there who has seen lots of cpufreq code and could have helped you a lot :) :-) I was waiting for your reply here :) I have followed the locking and synchronization aspects of cpufreq

Re: [PATCH v3 1/5] powernv: cpufreq driver for powernv platform

2014-03-21 Thread Gautham R Shenoy
Hi Viresh, On Fri, Mar 21, 2014 at 04:24:27PM +0530, Viresh Kumar wrote: On 21 March 2014 16:13, Gautham R Shenoy e...@linux.vnet.ibm.com wrote: On Fri, Mar 21, 2014 at 02:11:32PM +0530, Viresh Kumar wrote: + pr_debug(PState id %d freq %d MHz\n, id, freq); +

Re: [PATCH v3 1/5] powernv: cpufreq driver for powernv platform

2014-03-21 Thread Viresh Kumar
On 21 March 2014 18:53, Gautham R Shenoy e...@linux.vnet.ibm.com wrote: Ok, I had based my code on linus's git tree. I checked the 'pm-cpufreq' Always check his bleeding-edge or linux-next branch. branch of Rafael's 'linux-pm' tree and freq_table.c contains the following code snippet in

Re: [PATCH v3 1/5] powernv: cpufreq driver for powernv platform

2014-03-21 Thread Vaidyanathan Srinivasan
* Gautham R Shenoy e...@linux.vnet.ibm.com [2014-03-21 16:13:17]: Hi Viresh, On Fri, Mar 21, 2014 at 02:11:32PM +0530, Viresh Kumar wrote: On Thu, Mar 20, 2014 at 5:40 PM, Gautham R. Shenoy e...@linux.vnet.ibm.com wrote: From: Vaidyanathan Srinivasan sva...@linux.vnet.ibm.com Hi

Re: [PATCH v3 1/5] powernv: cpufreq driver for powernv platform

2014-03-21 Thread Gautham R Shenoy
On Fri, Mar 21, 2014 at 04:24:27PM +0530, Viresh Kumar wrote: +static int powernv_cpufreq_cpu_init(struct cpufreq_policy *policy) +{ + int base, i; + + base = cpu_first_thread_sibling(policy-cpu); + + for (i = 0; i threads_per_core; i++) +

Re: [PATCH v3 1/5] powernv: cpufreq driver for powernv platform

2014-03-21 Thread Viresh Kumar
On 21 March 2014 20:18, Vaidyanathan Srinivasan sva...@linux.vnet.ibm.com wrote: Yeah, I had the driver written using driver_data to store pstates. Gautham found the bug that we are missing one PState when we match the ID with CPUFREQ_BOOST_FREQ! I see.. We did not know that you have taken

Re: [PATCH v3 1/5] powernv: cpufreq driver for powernv platform

2014-03-21 Thread Viresh Kumar
On 21 March 2014 20:24, Gautham R Shenoy e...@linux.vnet.ibm.com wrote: Ok, I guess the right thing to do at this point is call cpufreq_table_validate_and_show(policy, powernv_freqs); Will fix the code to take care of this. Yes. ___ Linuxppc-dev

[PATCH v3 1/5] powernv: cpufreq driver for powernv platform

2014-03-20 Thread Gautham R. Shenoy
From: Vaidyanathan Srinivasan sva...@linux.vnet.ibm.com Backend driver to dynamically set voltage and frequency on IBM POWER non-virtualized platforms. Power management SPRs are used to set the required PState. This driver works in conjunction with cpufreq governors like 'ondemand' to provide a