Re: [PATCH 2/2] powernv:idle:Implement lite variant of power_enter_stop

2016-09-20 Thread Gautham R Shenoy
Hi Balbir, On Tue, Sep 20, 2016 at 03:54:43PM +1000, Balbir Singh wrote: > > diff --git a/arch/powerpc/platforms/powernv/idle.c > > b/arch/powerpc/platforms/powernv/idle.c > > index 479c256..c3d3fed 100644 > > --- a/arch/powerpc/platforms/powernv/idle.c > > +++ b/arch/powerpc/platforms/powernv/id

[PATCH 2/2] powernv:idle:Implement lite variant of power_enter_stop

2016-09-16 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" This patch adds a function named power_enter_stop_lite() that can execute a stop instruction when ESL and EC bits are set to zero in the PSSCR. The function handles the wake-up from idle at the instruction immediately after the stop instruction. I

[PATCH 1/2] powernv:idle: Add IDLE_STATE_ENTER_SEQ_NORET macro

2016-09-16 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Currently all the low-power idle states are expected to wake up at reset vector 0x100. Which is why the macro IDLE_STATE_ENTER_SEQ that puts the CPU to an idle state and never returns. On ISA_300, when the ESL and EC bits in the PSSCR are zero, the CPU is e

[PATCH 0/2] powernv: Implement lite variant of stop with ESL=EC=0

2016-09-16 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Hi, The Power ISA v3.0 allows us to execute the "stop" instruction with ESL and EC of the PSSCR set to 0. This will ensure no loss of state, and the wakeup from the stop will happen at an instruction following the executed stop instruction. This p

[PATCH] powernv: Restore SPRs correctly upon wake up from hypervisor state loss

2016-09-06 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" pnv_wakeup_tb_loss function currently expects the cr4 to be "eq" if the CPU is waking up from a complete hypervisor state loss. Hence, it currently restores the SPR contents only if cr4 is "eq". However, after the commit bcef83a00dc4 (

[RFC/PATCH 2/2] powernv:cpuidle: Enable winkle idle state in CPU-Idle.

2016-08-18 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" cpu-idle on powernv currently has support for only snooze, nap and fastsleep states. Winkle idle state was excluded due to its large exit-latency. This patch adds winkle as a cpu-idle state for experimental purposes. This state is disabled at start by defaul

[RFC/PATCH 0/2] powernv:cpuidle: Enable winkle idle state

2016-08-18 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Hi, The patches in these series enable support for Winkle idle state in CPU-Idle. The first patch is a platform-independent CPU-Idle patch that allows CPU-Idle states to be disabled at start (Currently they are all enabled by default). The second patc

[RFC/PATCH 1/2] cpuidle: Allow idle-states to be disabled at start

2016-08-18 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Currently all the idle states registered by a cpu-idle driver are enabled by default. This patch adds a mechanism which allows the driver to hint if an idle-state should start in a disabled state. The cpu-idle core will use this hint to appropriately init

Re: [PATCH 2/2] workqueue:Fix affinity of an unbound worker of a node with 1 online CPU

2016-07-14 Thread Gautham R Shenoy
Hi Tejun, On Thu, Jun 16, 2016 at 03:39:05PM -0400, Tejun Heo wrote: > On Thu, Jun 16, 2016 at 02:45:48PM +0200, Peter Zijlstra wrote: > > Subject: workqueue: Fix setting affinity of unbound worker threads > > From: Peter Zijlstra > > Date: Thu Jun 16 14:38:42 CEST 2016 > > > > With commit e9d86

Re: [PATCH 1/2] workqueue: Move wq_update_unbound_numa() to the beginning of CPU_ONLINE

2016-06-21 Thread Gautham R Shenoy
On Tue, Jun 21, 2016 at 09:47:19PM +0200, Peter Zijlstra wrote: > On Tue, Jun 21, 2016 at 03:43:56PM -0400, Tejun Heo wrote: > > On Tue, Jun 21, 2016 at 09:37:09PM +0200, Peter Zijlstra wrote: > > > Hurm.. So I've applied it, just to get this issue sorted, but I'm not > > > entirely sure I like it.

Re: [PATCH 1/2] workqueue: Move wq_update_unbound_numa() to the beginning of CPU_ONLINE

2016-06-21 Thread Gautham R Shenoy
gt; in its allowed mask and ends up overriding it to cpu_possible_mask. > > CPU_ONLINE callbacks should be able to put kthreads on the CPU which > is coming online. Update select_fallback_rq() so that it follows > cpu_online() rather than cpu_active() for kthreads. > > Signed-off

Re: [PATCH 1/2] workqueue: Move wq_update_unbound_numa() to the beginning of CPU_ONLINE

2016-06-15 Thread Gautham R Shenoy
Hello Tejun, On Wed, Jun 15, 2016 at 11:53:50AM -0400, Tejun Heo wrote: > Hello, > > On Tue, Jun 07, 2016 at 08:44:02PM +0530, Gautham R. Shenoy wrote: > > Currently in the CPU_ONLINE workqueue handler, the > > restore_unbound_workers_cpumask() will never call > > s

Re: [PATCH 2/2] workqueue:Fix affinity of an unbound worker of a node with 1 online CPU

2016-06-15 Thread Gautham R Shenoy
On Wed, Jun 15, 2016 at 01:32:49PM +0200, Peter Zijlstra wrote: > On Wed, Jun 15, 2016 at 03:49:36PM +0530, Gautham R Shenoy wrote: > > > Also, with the first patch in the series (which ensures that > > restore_unbound_workers are called *after* the new workers for the > >

Re: [PATCH 2/2] workqueue:Fix affinity of an unbound worker of a node with 1 online CPU

2016-06-15 Thread Gautham R Shenoy
Hi Peter, On Tue, Jun 14, 2016 at 01:22:34PM +0200, Peter Zijlstra wrote: > On Tue, Jun 07, 2016 at 08:44:03PM +0530, Gautham R. Shenoy wrote: > > I'm still puzzled why we don't see this on x86. Afaict there's nothing > PPC specific about this. You are right. On P

Re: [PATCH 0/2] Fix CPU Online handling for unbounded worker threads

2016-06-12 Thread Gautham R Shenoy
Hi Peter, Thomas, On Tue, Jun 07, 2016 at 08:44:01PM +0530, Gautham R. Shenoy wrote: > Hi, > > This patchset fixes a couple of issues in the CPU_ONLINE notification > handling for the workqueues with respect to unbounded worker threads. Any thoughts on these patches ? They fix a ra

[PATCH 2/2] workqueue:Fix affinity of an unbound worker of a node with 1 online CPU

2016-06-07 Thread Gautham R. Shenoy
cpumask of the worker pool when it comes online. b) the cpumask of the worker pool when the second CPU in the pool's cpumask comes online. Reported-by: Abdul Haleem Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Tejun Heo Cc: Michael Ellerman Signed-off-by: Gautham R. Shenoy ---

[PATCH 1/2] workqueue: Move wq_update_unbound_numa() to the beginning of CPU_ONLINE

2016-06-07 Thread Gautham R. Shenoy
Cc: Michael Ellerman Signed-off-by: Gautham R. Shenoy --- kernel/workqueue.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kernel/workqueue.c b/kernel/workqueue.c index e1c0e99..e412794 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c @@ -4638,6 +4638,10

[PATCH 0/2] Fix CPU Online handling for unbounded worker threads

2016-06-07 Thread Gautham R. Shenoy
6000 2fa3 409eff1c 813f0378 2f890001 419eff10 <0fe0> 4b08 6000 6000 ---[ end trace cbc1c5cfbc9591d0 ]--- The patches are based on 4.7-rc2. I have tested the patches on a multi-node x86_64 and a ppc64 Gautham R. Shenoy (2): workqueue: Move wq_update_unbound_numa()

Re: [PATCH v4 08/10] powerpc/powernv: Add platform support for stop instruction

2016-05-24 Thread Gautham R Shenoy
> Bits 60:63 - Requested Level > Used to specify which power-saving level must be entered on executing > stop instruction > > This patch adds support for stop instruction and PSSCR handling. This version looks good to me. Reviewed-by: Gautham R. Shenoy -- Thanks and

Re: [PATCH v3 8/9] cpuidle/powernv: Add support for POWER ISA v3 idle states

2016-05-24 Thread Gautham R Shenoy
CR value. > > This patch adds support for this new mechanism in cpuidle powernv driver. > > Cc: Rafael J. Wysocki > Cc: Daniel Lezcano > Cc: linux...@vger.kernel.org > Cc: Michael Ellerman > Cc: Paul Mackerras > Cc: linuxppc-dev@lists.ozlabs.org > Signe

Re: [PATCH v3 7/9] powerpc/powernv: Add platform support for stop instruction

2016-05-24 Thread Gautham R Shenoy
Hi Shreyas, On Mon, May 23, 2016 at 08:48:40PM +0530, Shreyas B. Prabhu wrote: > @@ -412,7 +517,8 @@ subcore_state_restored: > first_thread_in_core: > > /* > - * First thread in the core waking up from fastsleep. It needs to > + * First thread in the core waking up from any state

Re: [PATCH v3 5/9] powerpc/powernv: abstraction for saving SPRs before entering deep idle states

2016-05-24 Thread Gautham R Shenoy
On Mon, May 23, 2016 at 08:48:38PM +0530, Shreyas B. Prabhu wrote: > Create a function for saving SPRs before entering deep idle states. > This function can be reused for POWER9 deep idle states. > > Signed-off-by: Shreyas B. Prabhu Reviewed-by: Gauth

Re: [PATCH v3 4/9] powerpc/powernv: Make power7_powersave_common more generic

2016-05-24 Thread Gautham R Shenoy
THREAD_STATE to power7_powersave_common > from power7_enter_nap_mode and make it more generic by passing the rfid > address as a function parameter. > > Also make function name more generic. > > Reviewed-by: Gautham R. Shenoy > Signed-off-by: Shreyas B. Prabhu > --- >

Re: [PATCH v3 3/9] powerpc/powernv: Rename reusable idle functions to hardware agnostic names

2016-05-24 Thread Gautham R Shenoy
> Suggested-by: Gautham R. Shenoy > Signed-off-by: Shreyas B. Prabhu > --- > New in v3 > > arch/powerpc/kernel/exceptions-64s.S| 6 +++--- > arch/powerpc/kernel/idle_power_common.S | 16 > arch/powerpc/kvm/book3s_hv_rmhandlers.S | 4 ++-- &

Re: [PATCH v3 2/9] powerpc/powernv: Rename idle_power7.S to idle_power_common.S

2016-05-24 Thread Gautham R Shenoy
On Mon, May 23, 2016 at 08:48:35PM +0530, Shreyas B. Prabhu wrote: > idle_power7.S handles idle entry/exit for POWER7, POWER8 and in next > patch for POWER9. Rename the file to a non-hardware specific > name. > > Signed-off-by: Shreyas B. Prabhu Reviewed-by: Ga

Re: [PATCH v2 2/9] powerpc/kvm: make hypervisor state restore a function

2016-05-19 Thread Gautham R Shenoy
Hi Shreyas, On Wed, May 18, 2016 at 12:37:56PM +0530, Shreyas B Prabhu wrote: [..snip..] > >> diff --git a/arch/powerpc/kernel/exceptions-64s.S > >> b/arch/powerpc/kernel/exceptions-64s.S > >> index 7716ceb..7ebfbb0 100644 > >> --- a/arch/powerpc/kernel/exceptions-64s.S > >> +++ b/arch/powerpc/k

Re: [PATCH v2 5/9] powerpc/powernv: Move idle related macros to cpuidle.h

2016-05-19 Thread Gautham R Shenoy
On Tue, May 03, 2016 at 01:54:34PM +0530, Shreyas B. Prabhu wrote: > Move idle related macros to a common location asm/cpuidle.h so that > they can be used for stop instruction support. > > Signed-off-by: Shreyas B. Prabhy Reviewed-by: Gautham R. Shenoy -- Thanks and Reg

Re: [PATCH v2 4/9] powerpc/powernv: Make power7_powersave_common more generic

2016-05-19 Thread Gautham R Shenoy
On Wed, May 18, 2016 at 12:21:17PM +0530, Shreyas B Prabhu wrote: > With this patch, r5 which is the third parameter to > power_powersave_common contains the return address that needs to be > written to SRR0. So here I'm keeping r5 unaltered and using r7 for the MSR. Ok. Reviewed

Re: [PATCH v2 9/9] powerpc/powernv: Use deepest stop state when cpu is offlined

2016-05-18 Thread Gautham R Shenoy
On Tue, May 03, 2016 at 01:54:38PM +0530, Shreyas B. Prabhu wrote: > If hardware supports stop state, use the deepest stop state when > > the cpu is offlined. > > Signed-off-by: Shreyas B. Prabhu Reviewed-by: Gautham R. Shenoy -- Thanks and

Re: [PATCH v2 7/9] powerpc/powernv: Add platform support for stop instruction

2016-05-18 Thread Gautham R Shenoy
Hi Shreyas, On Tue, May 03, 2016 at 01:54:36PM +0530, Shreyas B. Prabhu wrote: > POWER ISA v3 defines a new idle processor core mechanism. In summary, > a) new instruction named stop is added. This instruction replaces > instructions like nap, sleep, rvwinkle. > b) new per thread SPR named

Re: [PATCH v2 6/9] powerpc/powernv: set power_save func after the idle states are initialized

2016-05-17 Thread Gautham R Shenoy
reyas B. Prabhy Reviewed-by: Gautham R. Shenoy > --- > arch/powerpc/platforms/powernv/idle.c | 3 +++ > arch/powerpc/platforms/powernv/setup.c | 2 +- > 2 files changed, 4 insertions(+), 1 deletion(-) > > diff --git a/arch/powerpc/platforms/powernv/idle.c > b/arch/powerpc/plat

Re: [PATCH v2 4/9] powerpc/powernv: Make power7_powersave_common more generic

2016-05-17 Thread Gautham R Shenoy
Hi Shreyas, On Tue, May 03, 2016 at 01:54:33PM +0530, Shreyas B. Prabhu wrote: > power7_powersave_common does common steps needed before entering idle > state and eventually changes MSR to MSR_IDLE and does rfid to > power7_enter_nap_mode. > > Make it more generic by passing the rfid address as a

Re: [PATCH v2 3/9] powerpc/powernv: Move idle code usable by multiple hardware to common location

2016-05-17 Thread Gautham R Shenoy
Hi Shreyas, On Tue, May 03, 2016 at 01:54:32PM +0530, Shreyas B. Prabhu wrote: > CPU-idle related code like context save/restore functions idle_power7.S > can reused for adding stop instruction support. Move this > code to a new commonly accessible location. [..snip..] > diff --git a/arch/powerp

Re: [PATCH v2 2/9] powerpc/kvm: make hypervisor state restore a function

2016-05-17 Thread Gautham R Shenoy
Hi Shreyas, On Tue, May 03, 2016 at 01:54:31PM +0530, Shreyas B. Prabhu wrote: > In the current code, when the thread wakes up in reset vector, some > of the state restore code and check for whether a thread needs to > branch to kvm is duplicated. Reorder the code such that this > duplication is a

Re: [PATCH v2 1/9] powerpc/powernv: Move CHECK_HMI_INTERRUPT to exception-64s header

2016-05-17 Thread Gautham R Shenoy
to facilitate the invocation of CHECK_HMI_INTERRUPT in some later patch ? In this case you could add this to the commit message. Otherwise, Reviewed-by: Gautham R. Shenoy > --- > arch/powerpc/include/asm/exception-64s.h | 18 ++ > arch/powerpc/kernel/idle_power7.S| 20

Re: [PATCH v8 6/6] cpufreq: powernv: Add sysfs attributes to show throttle stats

2016-02-03 Thread Gautham R Shenoy
Hi Viresh, > > What I can suggest is: > - Move this directory inside cpuX/cpufreq/ directory, in a similar way > as to how we create 'stats' directory today. > - You can then get policy->cpu, to get chip->id out of it. > - The only disadvantage here is that the same chip directory will be > r

Re: [PATCH v7 6/6] cpufreq: powernv: Add sysfs attributes to show throttle stats

2016-01-28 Thread Gautham R Shenoy
Hi Shilpa, A minor nit. On Thu, Jan 28, 2016 at 12:55:41PM +0530, Shilpasri G Bhat wrote: [..snip..] > + > +What: > /sys/devices/system/cpu/cpufreq/chip*/throttle_reasons/ > +Date:Jan 2016 > +Contact: Linux kernel mailing list > + Linux for PowerPC

Re: [PATCH v7 5/6] cpufreq: powernv: Replace pr_info with trace print for throttle event

2016-01-28 Thread Gautham R Shenoy
ts > like throttle below nominal frequency and OCC_RESET are reduced to > pr_warn/pr_warn_once as pointed by MFG to not mark them as critical > messages. This patch adds 'throttle_reason' to struct chip to store the > throttle reason. > > Signed-off-by: Shilpasri G

Re: [PATCH v7 3/6] cpufreq: powernv: Remove cpu_to_chip_id() from hot-path

2016-01-28 Thread Gautham R Shenoy
chip ids for all cores in the array 'core_to_chip_map' and use it > in the hotpath. > > Reported-by: Anton Blanchard > Signed-off-by: Shilpasri G Bhat Reviewed-by: Gautham R. Shenoy -- Thanks and Regards gautham. ___ Linu

Re: [PATCH v7 1/6] cpufreq: powernv: Free 'chips' on module exit

2016-01-28 Thread Gautham R Shenoy
On Thu, Jan 28, 2016 at 12:55:36PM +0530, Shilpasri G Bhat wrote: > This will free the dynamically allocated memory of'chips' on > module exit. > > Signed-off-by: Shilpasri G Bhat Reviewed-by: Gautham R. Shenoy -- Than

Re: [PATCH v6 2/5] cpufreq: powernv: Remove cpu_to_chip_id() from hot-path

2016-01-24 Thread Gautham R Shenoy
ary overhead > > in a hot path. So instead of calling cpu_to_chip_id() everytime cache > > the chip ids for all cores in the array 'core_to_chip_map' and use it > > in the hotpath. > > > > Reported-by: Anton Blanchard > > Signed-off-by: Shilpasri

Re: [PATCH v5 5/5] cpufreq: powernv: Add sysfs attributes to show throttle stats

2016-01-21 Thread Gautham R Shenoy
On Thu, Jan 21, 2016 at 03:08:59PM +0530, Shilpasri G Bhat wrote: > Signed-off-by: Shilpasri G Bhat Reviewed-by: Gautham R. Shenoy -- Thanks and Regards gautham. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.

Re: [PATCH RESEND v4 4/4] cpufreq: powernv: Add sysfs attributes to show throttle stats

2016-01-12 Thread Gautham R Shenoy
Hi Shilpa, On Tue, Jan 12, 2016 at 04:24:27AM -0600, Shilpasri G Bhat wrote: > +static inline int get_chip_index(struct kobject *kobj) Probably have "get_chip_index(int id)". See the reason below. > +{ > + int i, id; > + > + i = kstrtoint(kobj->name + 4, 0, &id); > + if (i) > +

Re: [PATCH RESEND v4 3/4] cpufreq: powernv: Add a trace print for the throttle event

2016-01-12 Thread Gautham R Shenoy
Hi Shilpa, Just saw this resend! On Tue, Jan 12, 2016 at 04:24:26AM -0600, Shilpasri G Bhat wrote: > Record the throttle event with a trace print replacing the printk, > except for events like throttling below nominal and occ reset > event which print a warning message. > > Signed-off-by: Shilpa

[PATCH] book3s_hv: Handle H_DOORBELL on the guest exit path

2015-10-14 Thread Gautham R. Shenoy
), we can unconditionally clear the doorbell message in kvmppc_check_wake_reason. Signed-off-by: Gautham R. Shenoy --- arch/powerpc/kvm/book3s_hv_rmhandlers.S | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerp

Re: [PATCH] book3s_hv_rmhandlers:Pass the correct trap argument to kvmhv_commence_exit

2015-08-16 Thread Gautham R Shenoy
Hi Sam, On Fri, Aug 14, 2015 at 03:07:28PM +1000, Sam Bobroff wrote: > On Thu, May 21, 2015 at 01:57:04PM +0530, Gautham R. Shenoy wrote: > > In guest_exit_cont we call kvmhv_commence_exit which expects the trap > > number as the argument. However r3 doesn't contain the tra

[PATCH v3] powerpc: Add an inline function to update POWER8 HID0

2015-08-05 Thread Gautham R. Shenoy
core path. Signed-off-by: Gautham R. Shenoy --- [v1 --> v2: Moved defn of update_hid0 to reg.h from kvm_ppc.h] [v2 --> v3: Renamed to update_power8_hid0 and used asm volatile] arch/powerpc/include/asm/reg.h | 9 + arch/powerpc/platforms/powernv/subcore.c | 4 ++-- 2 fi

Re: powerpc: Add an inline function to update HID0

2015-08-04 Thread Gautham R Shenoy
Hi Segher, Thanks for the suggestions. I will rename the function to update_power8_hid0() and use asm volatile. On Tue, Aug 04, 2015 at 09:30:57PM -0500, Segher Boessenkool wrote: > On Tue, Aug 04, 2015 at 08:08:58PM +1000, Michael Ellerman wrote: > > > +static inline void update_hid0(unsigned l

[PATCH v2] powerpc: Add an inline function to update HID0

2015-08-04 Thread Gautham R. Shenoy
path. Signed-off-by: Gautham R. Shenoy --- [v1--> v2: Moved defn of update_hid0 to reg.h from kvm_ppc.h] arch/powerpc/include/asm/reg.h | 13 + arch/powerpc/platforms/powernv/subcore.c | 4 ++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/arch/powerpc

Re: powerpc: Add an inline function to update HID0

2015-08-04 Thread Gautham R Shenoy
Hi Michael, On Tue, Aug 04, 2015 at 08:08:58PM +1000, Michael Ellerman wrote: > On Tue, 2015-04-08 at 08:30:58 UTC, "Gautham R. Shenoy" wrote: > > Section 3.7 of Version 1.2 of the Power8 Processor User's Manual > > prescribes that updates to HID0 be prec

[PATCH] powerpc: Add an inline function to update HID0

2015-08-04 Thread Gautham R. Shenoy
igned-off-by: Gautham R. Shenoy --- arch/powerpc/include/asm/kvm_ppc.h | 11 +++ arch/powerpc/platforms/powernv/subcore.c | 4 ++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/include/asm/kvm_ppc.h b/arch/powerpc/include/asm/kvm_ppc.h index c6

[PATCH] book3s_hv_rmhandlers:Pass the correct trap argument to kvmhv_commence_exit

2015-05-21 Thread Gautham R. Shenoy
_exit as r12 contains the trap number Signed-off-by: Gautham R. Shenoy --- arch/powerpc/kvm/book3s_hv_rmhandlers.S | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S index 4d70df2..f0d7c54 100644 --- a/arch/powerp

Re: [PATCH] powerpc/cpufreq: Add pr_warn() on OPAL firmware failures

2014-08-04 Thread Gautham R Shenoy
he pstate_id to go out of bounds ? Otherwise it looks ok. Acked-by: Gautham R. Shenoy > + } > > return powernv_freqs[i].frequency; > } -- Thanks and Regards gautham. ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH REPOST v5 1/3] powernv, cpufreq: Select CPUFreq related Kconfig options for powernv

2014-04-01 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Enable CPUFreq for PowerNV. Select "performance", "powersave", "userspace" and "ondemand" governors. Choose "ondemand" to be the default governor. Signed-off-by: Gautham R. Shenoy Signed-off-by: Srivatsa

[PATCH REPOST v5 3/3] powernv, cpufreq: Use cpufreq_frequency_table.driver_data to store pstate ids

2014-04-01 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" The .driver_data field in the cpufreq_frequency_table was supposed to be private to the drivers. However at some later point, it was being used to indicate if the particular frequency in the table is the BOOST_FREQUENCY. After patches [1] and [2], the .driv

[PATCH REPOST v5 2/3] powernv, cpufreq: cpufreq driver for powernv platform

2014-04-01 Thread Gautham R. Shenoy
_freq by setting powernv_cpufreq_driver.get to powernv_cpufreq_get(). [Authored by e...@linux.vnet.ibm.com] [Change log updated by e...@linux.vnet.ibm.com] Reviewed-by: Preeti U Murthy Signed-off-by: Vaidyanathan Srinivasan Signed-off-by: Srivatsa S. Bhat Signed-off-by: Anton Blanchard Signed-off-by: G

[PATCH v5 3/3] powernv, cpufreq: Use cpufreq_frequency_table.driver_data to store pstate ids

2014-03-28 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" The .driver_data field in the cpufreq_frequency_table was supposed to be private to the drivers. However at some later point, it was being used to indicate if the particular frequency in the table is the BOOST_FREQUENCY. After patches [1] and [2], the .driv

[PATCH v5 1/3] powernv, cpufreq: Select CPUFreq related Kconfig options for powernv

2014-03-28 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Enable CPUFreq for PowerNV. Select "performance", "powersave", "userspace" and "ondemand" governors. Choose "ondemand" to be the default governor. Signed-off-by: Gautham R. Shenoy Signed-off-by: Srivatsa

[PATCH v5 2/3] powernv, cpufreq: cpufreq driver for powernv platform

2014-03-28 Thread Gautham R. Shenoy
_freq by setting powernv_cpufreq_driver.get to powernv_cpufreq_get(). [Authored by e...@linux.vnet.ibm.com] [Change log updated by e...@linux.vnet.ibm.com] Reviewed-by: Preeti U Murthy Signed-off-by: Vaidyanathan Srinivasan Signed-off-by: Srivatsa S. Bhat Signed-off-by: Anton Blanchard Signed-off-by: G

[PATCH v5 0/3] powernv,cpufreq: Dynamic Frequency Scaling support

2014-03-28 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Hi, This is v5 of the patchset to enable dynamic frequency scaling on IBM PowerNV platforms. This patchset does address all the review comments obtained for v4 (which can be found at [1]). Changes from v4: * Created a separate patch to select the CPUFr

Re: [PATCH v4] powernv, cpufreq: cpufreq driver for powernv platform

2014-03-27 Thread Gautham R Shenoy
On Thu, Mar 27, 2014 at 03:29:36PM +0530, Viresh Kumar wrote: > On 27 March 2014 15:00, Gautham R Shenoy wrote: > > As of now, I prefer this patch be based on code that is in the -next > > tree. I'll get rid of the per-core locking once the serialization > > pat

Re: [PATCH v4] powernv, cpufreq: cpufreq driver for powernv platform

2014-03-27 Thread Gautham R Shenoy
On Thu, Mar 27, 2014 at 12:09:53PM +0530, Viresh Kumar wrote: > Cc'ing Rafael. > Thanks. It was a lapse on my part by not Cc'ing Rafael in the first place. > On 26 March 2014 22:25, Gautham R. Shenoy wrote: > > From: Vaidyanathan Srinivasan > > > > Back

[PATCH v4] powernv, cpufreq: cpufreq driver for powernv platform

2014-03-26 Thread Gautham R. Shenoy
Murthy Signed-off-by: Vaidyanathan Srinivasan Signed-off-by: Srivatsa S. Bhat Signed-off-by: Anton Blanchard Signed-off-by: Gautham R. Shenoy --- arch/powerpc/configs/pseries_defconfig| 1 + arch/powerpc/configs/pseries_le_defconfig | 1 + arch/powerpc/include/asm/reg.h| 4 + a

[PATCH v4] powernv: Dynamic Frequency Scaling Enablement

2014-03-26 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Hi, This is the v4 of the patchset to enable Dynamic Frequency Scaling on IBM PowerNV Platforms. I have incorporated the review comments from the previous version (can be found at [1]). In this version, * Multiple patches from the previous version have

Re: [PATCH v3 5/5] powernv:cpufreq: Implement the driver->get() method

2014-03-22 Thread Gautham R Shenoy
Hi Ben, On Sat, Mar 22, 2014 at 09:56:30AM +1100, Benjamin Herrenschmidt wrote: > On Fri, 2014-03-21 at 16:34 +0530, Gautham R Shenoy wrote: > > > > > > > > > +/* > > > > + * Computes the current frequency on this cpu > > > > + * and stores

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_co

Re: [PATCH v3 5/5] powernv:cpufreq: Implement the driver->get() method

2014-03-21 Thread Gautham R Shenoy
On Fri, Mar 21, 2014 at 06:42:50PM +0530, Viresh Kumar wrote: > On 21 March 2014 18:34, Gautham R Shenoy wrote: > > Consider the case when pmspr = 0x00fe; > > > > We are interested in extracting the value 'fe'. And ensure that when > > we store th

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 wrote: > > On Fri, Mar 21, 2014 at 02:11:32PM +0530, Viresh Kumar wrote: > > >> > + pr_debug("PState i

Re: [PATCH v3 5/5] powernv:cpufreq: Implement the driver->get() method

2014-03-21 Thread Gautham R Shenoy
On Fri, Mar 21, 2014 at 05:15:34PM +0530, Viresh Kumar wrote: > On 21 March 2014 16:34, Gautham R Shenoy wrote: > > Heh! Well, that wasn't the reason why this was sent out as a separate > > patch, but never mind. Though I don't understand why it would be > > diffi

Re: [PATCH v3 5/5] powernv:cpufreq: Implement the driver->get() method

2014-03-21 Thread Gautham R Shenoy
On Fri, Mar 21, 2014 at 12:01:07PM +, David Laight wrote: > From: Viresh Kumar > > > On 21 March 2014 16:34, Gautham R Shenoy wrote: > > > Heh! Well, that wasn't the reason why this was sent out as a separate > > > patch, but never mind. Though

Re: [PATCH v3 5/5] powernv:cpufreq: Implement the driver->get() method

2014-03-21 Thread Gautham R Shenoy
On Fri, Mar 21, 2014 at 03:01:29PM +0530, Viresh Kumar wrote: > On Thu, Mar 20, 2014 at 5:41 PM, Gautham R. Shenoy > wrote: > > From: "Gautham R. Shenoy" > > > > The current frequency of a cpu is reported through the sysfs file > > cpuinfo_cur_freq.

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 > wrote: > > From: Vaidyanathan Srinivasan > > Hi Vaidy, > > > diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig > &

Re: [PATCH v3 4/5] powernv:cpufreq: Export nominal frequency via sysfs.

2014-03-21 Thread Gautham R Shenoy
On Fri, Mar 21, 2014 at 02:17:28PM +0530, Viresh Kumar wrote: > > +static ssize_t show_cpuinfo_nominal_freq(struct cpufreq_policy *policy, > > + char *buf) > > +{ > > + int nominal_freq; > > + nominal_freq = > > pstate_id_to_freq(powernv_pstate_inf

Re: [PATCH v3 0/5] powernv: Enable Dynamic Frequency

2014-03-21 Thread Gautham R Shenoy
Hi Viresh, On Fri, Mar 21, 2014 at 01:16:03PM +0530, Viresh Kumar wrote: > On Thu, Mar 20, 2014 at 5:40 PM, Gautham R. Shenoy > wrote: > > This is the v3 of the consolidated patchset consisting > > patches for enabling cpufreq on IBM POWERNV platforms > > along with some

Re: [PATCH v3 5/5] powernv:cpufreq: Implement the driver->get() method

2014-03-20 Thread Gautham R Shenoy
On Thu, Mar 20, 2014 at 05:41:00PM +0530, Gautham R. Shenoy wrote: > From: "Gautham R. Shenoy" > > The current frequency of a cpu is reported through the sysfs file > cpuinfo_cur_freq. This requires the driver to implement a > "->get(unsigned int cpu)"

Re: [PATCH v3 3/5] powernv:cpufreq: Create pstate_id_to_freq() helper

2014-03-20 Thread Gautham R Shenoy
On Thu, Mar 20, 2014 at 05:40:58PM +0530, Gautham R. Shenoy wrote: > From: "Gautham R. Shenoy" > > Create a helper routine that can return the cpu-frequency for the > corresponding pstate_id. > > Also, cache the values of the pstate_max, pstate_min and > pst

Re: [PATCH v3 2/5] powernv, cpufreq:Add per-core locking to serialize frequency transitions

2014-03-20 Thread Gautham R Shenoy
On Thu, Mar 20, 2014 at 05:40:57PM +0530, Gautham R. Shenoy wrote: > From: "Srivatsa S. Bhat" > > On POWER systems, the CPU frequency is controlled at a core-level and > hence we need to serialize so that only one of the threads in the core > switches the core's fre

[PATCH v3 5/5] powernv:cpufreq: Implement the driver->get() method

2014-03-20 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" The current frequency of a cpu is reported through the sysfs file cpuinfo_cur_freq. This requires the driver to implement a "->get(unsigned int cpu)" method which will return the current operating frequency. Implement a function named powernv_cp

[PATCH v3 4/5] powernv:cpufreq: Export nominal frequency via sysfs.

2014-03-20 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Create a driver attribute named cpuinfo_nominal_freq which creates a sysfs read-only file named cpuinfo_nominal_freq. Export the frequency corresponding to the nominal_pstate through this interface. Nominal frequency is the highest non-turbo frequency for th

[PATCH v3 3/5] powernv:cpufreq: Create pstate_id_to_freq() helper

2014-03-20 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Create a helper routine that can return the cpu-frequency for the corresponding pstate_id. Also, cache the values of the pstate_max, pstate_min and pstate_nominal and nr_pstates in a static structure so that they can be reused in the future to perform any v

[PATCH v3 2/5] powernv, cpufreq:Add per-core locking to serialize frequency transitions

2014-03-20 Thread Gautham R. Shenoy
er-CPU lock and use the ones that belongs to the first thread sibling of the core. cpu_first_thread_sibling() macro is used to find the *common* lock for all thread siblings belonging to a core. Signed-off-by: Srivatsa S. Bhat Signed-off-by: Vaidyanathan Srinivasan Signed-off-by: Ga

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

2014-03-20 Thread Gautham R. Shenoy
] Signed-off-by: Vaidyanathan Srinivasan Signed-off-by: Srivatsa S. Bhat Signed-off-by: Anton Blanchard Signed-off-by: Gautham R. Shenoy --- arch/powerpc/include/asm/reg.h | 4 + arch/powerpc/platforms/powernv/Kconfig | 1 + drivers/cpufreq/Kconfig| 1 + drivers/cpufreq

[PATCH v3 0/5] powernv: Enable Dynamic Frequency

2014-03-20 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Hi, This is the v3 of the consolidated patchset consisting patches for enabling cpufreq on IBM POWERNV platforms along with some enhancements. I have incorporated the review for v2 (which can be found at [1]). - This patchset contains code for the platform

Re: [PATCH v2 2/6] powernv:cpufreq: Create a powernv_cpu_to_core_mask() helper.

2014-03-19 Thread Gautham R Shenoy
On Wed, Mar 19, 2014 at 12:05:20PM +0530, Srivatsa S. Bhat wrote: > On 03/19/2014 05:07 AM, Benjamin Herrenschmidt wrote: > > On Mon, 2014-03-10 at 16:40 +0530, Gautham R. Shenoy wrote: > >> From: "Srivatsa S. Bhat" > >> > >> Create a helper method

[RFC PATCH 0/2] powernv: Show the correct clock value in /proc/cpuinfo

2014-03-11 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Hi, Currently, the code in setup-common.c for powerpc assumes that all clock rates are same in a smp system. This value is cached in the variable named ppc_proc_freq and is the value that is reported in /proc/cpuinfo. However on the PowerNV platform, the clo

[RFC PATCH 2/2] powerpc: powernv: Implement ppc_md.get_proc_freq()

2014-03-11 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Implement a method named pnv_get_proc_freq(unsigned int cpu) which returns the current clock rate on the 'cpu' in Hz to be reported in /proc/cpuinfo. This method uses the value reported by cpufreq when such a value is sane. Otherwise it fall

[RFC PATCH 1/2] powerpc: powernv: Framework to show the correct clock in /proc/cpuinfo

2014-03-11 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Currently, the code in setup-common.c for powerpc assumes that all clock rates are same in a smp system. This value is cached in the variable named ppc_proc_freq and is the value that is reported in /proc/cpuinfo. However on the PowerNV platform, the clock ra

[PATCH v2 4/6] powernv:cpufreq: Create pstate_id_to_freq() helper

2014-03-10 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Create a helper routine that can return the cpu-frequency for the corresponding pstate_id. Also, cache the values of the pstate_max, pstate_min and pstate_nominal and nr_pstates in a static structure so that they can be reused in the future to perform any v

[PATCH v2 6/6] powernv:cpufreq: Implement the driver->get() method

2014-03-10 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" The current frequency of a cpu is reported through the sysfs file cpuinfo_cur_freq. This requires the driver to implement a "->get(unsigned int cpu)" method which will return the current operating frequency. Implement a function named powernv_cp

[PATCH v2 2/6] powernv:cpufreq: Create a powernv_cpu_to_core_mask() helper.

2014-03-10 Thread Gautham R. Shenoy
Signed-off-by: Srivatsa S. Bhat Signed-off-by: Gautham R. Shenoy --- drivers/cpufreq/powernv-cpufreq.c | 24 ++-- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/drivers/cpufreq/powernv-cpufreq.c b/drivers/cpufreq/powernv-cpufreq.c index ab1551f..4cad727 100644 --- a/dr

[PATCH v2 3/6] powernv, cpufreq:Add per-core locking to serialize frequency transitions

2014-03-10 Thread Gautham R. Shenoy
er-CPU lock and use the ones that belongs to the first thread sibling of the core. cpu_first_thread_sibling() macro is used to find the *common* lock for all thread siblings belonging to a core. Signed-off-by: Srivatsa S. Bhat Signed-off-by: Vaidyanathan Srinivasan Signed-off-by: Ga

[PATCH v2 1/6] powernv: cpufreq driver for powernv platform

2014-03-10 Thread Gautham R. Shenoy
idyanathan Srinivasan Signed-off-by: Srivatsa S. Bhat Signed-off-by: Anton Blanchard Signed-off-by: Gautham R. Shenoy --- arch/powerpc/include/asm/reg.h | 4 + arch/powerpc/platforms/powernv/Kconfig | 1 + drivers/cpufreq/Kconfig| 1 + drivers/cpufreq/Kconfig.powerpc

[PATCH v2 5/6] powernv:cpufreq: Export nominal frequency via sysfs.

2014-03-10 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Create a driver attribute named cpuinfo_nominal_freq which creates a sysfs read-only file named cpuinfo_nominal_freq. Export the frequency corresponding to the nominal_pstate through this interface. Nominal frequency is the highest non-turbo frequency for th

[PATCH v2 0/6] powernv:cpufreq: Dynamic cpu-frequency scaling

2014-03-10 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Hi, This is the v2 of the consolidated patchset consisting patches for enabling cpufreq on IBM POWERNV platforms along with some enhancements. The v1 of these patches have been previously submitted on linuxppc-dev [1][2]. - This patchset contains co

Re: [PATCH v2 14/52] powerpc, sysfs: Fix CPU hotplug callback registration

2014-03-06 Thread Gautham R Shenoy
Hello Ben, On Fri, Mar 07, 2014 at 01:57:31PM +1100, Benjamin Herrenschmidt wrote: > On Fri, 2014-02-14 at 13:22 +0530, Srivatsa S. Bhat wrote: > > Subsystems that want to register CPU hotplug callbacks, as well as perform > > initialization for the CPUs that are already online, often do it as sho

[PATCH 4/4] powernv:cpufreq: Implement the driver->get() method

2014-03-03 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" The current frequency of a cpu is reported through the sysfs file cpuinfo_cur_freq. This requires the driver to implement a "->get(unsigned int cpu)" method which will return the current operating frequency. Implement a function named powe

[PATCH 0/4] powernv:cpufreq: Export nominal and current frequency via sysfs

2014-03-03 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Hi, On IBM POWERNV platforms[1], presently we do not report the current operating frequency of the processor through the sysfs interface "cpuinfo_cur_freq" since the cpu frequency driver[1] has not implemented the ->get(unsigned int c

[PATCH 2/4] powernv:cpufreq: Export nominal frequency via sysfs.

2014-03-03 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Create a driver attribute named cpuinfo_nominal_frequency which creates a sysfs read-only file named cpuinfo_nominal_frequency. Export the frequency corresponding to the nominal_pstate through this interface. Signed-off-by: Gautham R. Shenoy --- drive

[PATCH 1/4] powernv:cpufreq: Create pstate_id_to_freq() helper

2014-03-03 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Create a helper routine that can return the cpu-frequency for the corresponding pstate_id. Also, cache the values of the pstate_max, pstate_min and pstate_nominal and nr_pstates in a static structure so that they can be reused in the future to perform any v

[PATCH 3/4] powernv:cpufreq: Create a powernv_cpu_to_core_mask() helper.

2014-03-03 Thread Gautham R. Shenoy
From: "Gautham R. Shenoy" Move the code that computes the cpumask corresponding to the thread-siblings of a cpu to a new method named powernv_cpu_to_core_mask() so that it can be used by other places in the code. Signed-off-by: Gautham R. Shenoy --- drivers/cpufreq/powernv-cpuf

<    1   2   3   4   5   6   7   >