Re: [PATCH] powerpc/64s: relocation, register save fixes for system reset interrupt

2016-11-02 Thread Shreyas B. Prabhu
On Thu, Nov 3, 2016 at 2:17 AM, Nicholas Piggin wrote: > On Thu, 3 Nov 2016 01:56:46 -0400 > "Shreyas B. Prabhu" wrote: > >> On Thu, Nov 3, 2016 at 1:21 AM, Nicholas Piggin wrote: >> > On Wed, 2 Nov 2016 14:15:48 +0530 >> > Gautham R Shenoy wrote: >

Re: [PATCH] powerpc/64s: relocation, register save fixes for system reset interrupt

2016-11-02 Thread Shreyas B. Prabhu
On Thu, Nov 3, 2016 at 1:21 AM, Nicholas Piggin wrote: > On Wed, 2 Nov 2016 14:15:48 +0530 > Gautham R Shenoy wrote: > >> Hi Nick, >> >> On Wed, Nov 02, 2016 at 07:36:24PM +1100, Nicholas Piggin wrote: >> > >> > Okay, I'll work with that. What's the best way to make a P8 do >> > winkle sleeps? >>

Re: [PATCH 1/2] powerpc/64: Re-fix race condition between going idle and entering guest

2016-10-21 Thread Shreyas B. Prabhu
r and shoutier comment > explaining the potential race condition. > > Cc: sta...@vger.kernel.org # v4.8 > Fixes: 4eae2c9ae54a > Signed-off-by: Paul Mackerras > --- > Serious oversight on my part. Thanks for fixing this. Reviewed-by: Shreyas B. Prabhu Thanks, Shreyas

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

2016-09-07 Thread Shreyas B. Prabhu
l to restore the SPRs on waking up from such a state. > > Fix the code in pnv_wakeup_tb_loss to restore the SPR states when cr4 is > "eq" or "gt". > > Fixes: Commit bcef83a00dc4 ("powerpc/powernv: Add platform support for > stop instruction&quo

[PATCH v8 11/11] powerpc/powernv: Use deepest stop state when cpu is offlined

2016-07-07 Thread Shreyas B. Prabhu
If hardware supports stop state, use the deepest stop state when the cpu is offlined. Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- - No changes since v1 arch/powerpc/platforms/powernv/idle.c| 15 +-- arch/powerpc/platforms/powernv/powernv.h | 1 + arch

[PATCH v8 10/11] cpuidle/powernv: Add support for POWER ISA v3 idle states

2016-07-07 Thread Shreyas B. Prabhu
: Daniel Lezcano Cc: Rob Herring Cc: Lorenzo Pieralisi Cc: linux...@vger.kernel.org Cc: Michael Ellerman Cc: Paul Mackerras Cc: linuxppc-dev@lists.ozlabs.org Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- Note: Documentation for the device tree bindings is posted here- http

[PATCH v8 09/11] cpuidle/powernv: cleanup cpuidle-powernv.c

2016-07-07 Thread Shreyas B. Prabhu
ssary "&" while assigning function pointer Cc: Rafael J. Wysocki Cc: Daniel Lezcano Cc: linux...@vger.kernel.org Signed-off-by: Shreyas B. Prabhu --- Changes in v8 = - &snooze_loop -> snooze_loop Changes in v7 = - New in v7. This was mainly

[PATCH v8 08/11] cpuidle/powernv: Use CPUIDLE_STATE_MAX instead of MAX_POWERNV_IDLE_STATES

2016-07-07 Thread Shreyas B. Prabhu
Use cpuidle's CPUIDLE_STATE_MAX macro instead of powernv specific MAX_POWERNV_IDLE_STATES. Cc: Rafael J. Wysocki Cc: Daniel Lezcano Cc: linux...@vger.kernel.org Acked-by: Daniel Lezcano Signed-off-by: Shreyas B. Prabhu --- - No changes after v5 Changes in v5 = - New

[PATCH v8 07/11] powerpc/powernv: Add platform support for stop instruction

2016-07-07 Thread Shreyas B. Prabhu
instruction and PSSCR handling. Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- Changes in v8 = - Initializing pnv_first_deep_stop_state - Changing MMU_FTR_SECTION condition to reduce FTR section length Changes in v7 = - LMRR, LMSER and ADSR not restored

[PATCH v8 06/11] powerpc/powernv: abstraction for saving SPRs before entering deep idle states

2016-07-07 Thread Shreyas B. Prabhu
Create a function for saving SPRs before entering deep idle states. This function can be reused for POWER9 deep idle states. Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- - No changes since v3 Changes in v3: = - Newly added in v3 arch/powerpc/kernel

[PATCH v8 05/11] powerpc/powernv: Make pnv_powersave_common more generic

2016-07-07 Thread Shreyas B. Prabhu
rfid address as a function parameter. Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- - No changes since v4 Changes in v4: == - Moved renaming of power7_powersave_common to earlier patch Changes in v3: == - Moved HSTATE_HWTHREAD_STATE updation to

[PATCH v8 04/11] powerpc/powernv: Rename reusable idle functions to hardware agnostic names

2016-07-07 Thread Shreyas B. Prabhu
Functions like power7_wakeup_loss, power7_wakeup_noloss, power7_wakeup_tb_loss are used by POWER7 and POWER8 hardware. They can also be used by POWER9. Hence rename these functions hardware agnostic names. Suggested-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- - No changes since

[PATCH v8 03/11] powerpc/powernv: Rename idle_power7.S to idle_book3s.S

2016-07-07 Thread Shreyas B. Prabhu
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. Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- Changes in v7: = - File renamed to idle_book3s.S instead of

[PATCH v8 02/11] powerpc/kvm: make hypervisor state restore a function

2016-07-07 Thread Shreyas B. Prabhu
kvm) goto kvm_start_guest goto power7_wakeup_loss Reviewed-by: Paul Mackerras Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- - No changes since v3 Changes in v3: = - Retaining GET_PACA(r13) in System Reset vector instead of moving it to

[PATCH v8 01/11] powerpc/powernv: Use PNV_THREAD_WINKLE macro while requesting for winkle

2016-07-07 Thread Shreyas B. Prabhu
Signed-off-by: Shreyas B. Prabhu --- -No changes since v4 Changes in v4 = - New in v4 arch/powerpc/kernel/idle_power7.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/idle_power7.S b/arch/powerpc/kernel/idle_power7.S index 470ceeb..705c867

[PATCH v8 00/11] powerpc/powernv/cpuidle: Add support for POWER ISA v3 idle states

2016-07-07 Thread Shreyas B. Prabhu
Lorenzo Pieralisi Cc: linux...@vger.kernel.org Cc: Benjamin Herrenschmidt Cc: Michael Ellerman Cc: Paul Mackerras Cc: Michael Neuling Cc: linuxppc-dev@lists.ozlabs.org Shreyas B. Prabhu (11): powerpc/powernv: Use PNV_THREAD_WINKLE macro while requesting for winkle powerpc/kvm: make hype

Re: [PATCH v7 07/11] powerpc/powernv: Add platform support for stop instruction

2016-07-07 Thread Shreyas B Prabhu
On 07/08/2016 07:50 AM, Michael Neuling wrote: > >> diff --git a/arch/powerpc/include/asm/cpuidle.h >> b/arch/powerpc/include/asm/cpuidle.h >> index d2f99ca..3d7fc06 100644 >> --- a/arch/powerpc/include/asm/cpuidle.h >> +++ b/arch/powerpc/include/asm/cpuidle.h >> @@ -13,6 +13,8 @@ >> #ifndef _

[PATCH v7 11/11] powerpc/powernv: Use deepest stop state when cpu is offlined

2016-07-07 Thread Shreyas B. Prabhu
If hardware supports stop state, use the deepest stop state when the cpu is offlined. Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- - No changes since v1 arch/powerpc/platforms/powernv/idle.c| 15 +-- arch/powerpc/platforms/powernv/powernv.h | 1 + arch

[PATCH v7 10/11] cpuidle/powernv: Add support for POWER ISA v3 idle states

2016-07-07 Thread Shreyas B. Prabhu
: Daniel Lezcano Cc: Rob Herring Cc: Lorenzo Pieralisi Cc: linux...@vger.kernel.org Cc: Michael Ellerman Cc: Paul Mackerras Cc: linuxppc-dev@lists.ozlabs.org Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- Note: Documentation for the device tree bindings is posted here- http

[PATCH v7 09/11] cpuidle/powernv: cleanup powernv_add_idle_states

2016-07-07 Thread Shreyas B. Prabhu
ssary "&" while assigning function pointer Cc: Rafael J. Wysocki Cc: Daniel Lezcano Cc: linux...@vger.kernel.org Signed-off-by: Shreyas B. Prabhu --- - New in v7. This was mainly to make the existing code consistent with the review comments for new code drivers/cpuidle/cpu

[PATCH v7 08/11] cpuidle/powernv: Use CPUIDLE_STATE_MAX instead of MAX_POWERNV_IDLE_STATES

2016-07-07 Thread Shreyas B. Prabhu
Use cpuidle's CPUIDLE_STATE_MAX macro instead of powernv specific MAX_POWERNV_IDLE_STATES. Cc: Rafael J. Wysocki Cc: Daniel Lezcano Cc: linux...@vger.kernel.org Acked-by: Daniel Lezcano Signed-off-by: Shreyas B. Prabhu --- - No changes after v5 Changes in v5 = - New

[PATCH v7 07/11] powerpc/powernv: Add platform support for stop instruction

2016-07-07 Thread Shreyas B. Prabhu
instruction and PSSCR handling. Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- Changes in v7 = - LMRR, LMSER and ADSR not restored since its not necessary - power_stop0, power_stop renamed to power9_idle and power_idle_stop - PSSCR template is now a macro instead of

[PATCH v7 06/11] powerpc/powernv: abstraction for saving SPRs before entering deep idle states

2016-07-07 Thread Shreyas B. Prabhu
Create a function for saving SPRs before entering deep idle states. This function can be reused for POWER9 deep idle states. Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- - No changes since v3 Changes in v3: = - Newly added in v3 arch/powerpc/kernel

[PATCH v7 05/11] powerpc/powernv: Make pnv_powersave_common more generic

2016-07-07 Thread Shreyas B. Prabhu
rfid address as a function parameter. Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- - No changes since v4 Changes in v4: == - Moved renaming of power7_powersave_common to earlier patch Changes in v3: == - Moved HSTATE_HWTHREAD_STATE updation to

[PATCH v7 04/11] powerpc/powernv: Rename reusable idle functions to hardware agnostic names

2016-07-07 Thread Shreyas B. Prabhu
Functions like power7_wakeup_loss, power7_wakeup_noloss, power7_wakeup_tb_loss are used by POWER7 and POWER8 hardware. They can also be used by POWER9. Hence rename these functions hardware agnostic names. Suggested-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- - No changes since

[PATCH v7 03/11] powerpc/powernv: Rename idle_power7.S to idle_book3s.S

2016-07-07 Thread Shreyas B. Prabhu
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. Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- Changes in v7: = - File renamed to idle_book3s.S instead of

[PATCH v7 02/11] powerpc/kvm: make hypervisor state restore a function

2016-07-07 Thread Shreyas B. Prabhu
kvm) goto kvm_start_guest goto power7_wakeup_loss Reviewed-by: Paul Mackerras Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- - No changes since v3 Changes in v3: = - Retaining GET_PACA(r13) in System Reset vector instead of moving it to

[PATCH v7 01/11] powerpc/powernv: Use PNV_THREAD_WINKLE macro while requesting for winkle

2016-07-07 Thread Shreyas B. Prabhu
Signed-off-by: Shreyas B. Prabhu --- -No changes since v4 Changes in v4 = - New in v4 arch/powerpc/kernel/idle_power7.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/idle_power7.S b/arch/powerpc/kernel/idle_power7.S index 470ceeb..705c867

[PATCH v7 00/11] powerpc/powernv/cpuidle: Add support for POWER ISA v3 idle states

2016-07-07 Thread Shreyas B. Prabhu
cki Cc: Daniel Lezcano Cc: linux...@vger.kernel.org Cc: Benjamin Herrenschmidt Cc: Michael Ellerman Cc: Paul Mackerras Cc: Michael Neuling Cc: linuxppc-dev@lists.ozlabs.org Cc: Rob Herring Cc: Lorenzo Pieralisi Shreyas B. Prabhu (11): powerpc/powernv: Use PNV_THREAD_WINKLE macro while

[PATCH v5] cpuidle: Fix last_residency division

2016-07-01 Thread Shreyas B. Prabhu
isected-by: Shilpasri G Bhat Signed-off-by: Shreyas B. Prabhu --- Changes in v5 = - Replacing approximation division with ktime_us_delta. Changes in v4 = - Increasing the threshold upto which approximation can be used. - Removed explicit cast. Instead added a comment sayin

Re: [PATCH v4] cpuidle: Fix last_residency division

2016-07-01 Thread Shreyas B Prabhu
On 07/01/2016 01:36 PM, Daniel Lezcano wrote: > On 06/30/2016 05:37 PM, Nicolas Pitre wrote: >> On Thu, 30 Jun 2016, Daniel Lezcano wrote: >>> +} +} >>> >>> >>> What bothers me with this division is the benefit of adding an extra >>> ultra >>> optimized division by 1000 in cpuidle.h whil

[PATCH v4] cpuidle: Fix last_residency division

2016-06-30 Thread Shreyas B. Prabhu
Bisected-by: Shilpasri G Bhat Suggested-by David Laight Signed-off-by: Shreyas B. Prabhu --- Changes in v4 = - Increasing the threshold upto which approximation can be used. - Removed explicit cast. Instead added a comment saying why cast is safe. Changes in v3

Re: [PATCH] cpuidle: Fix last_residency division

2016-06-30 Thread Shreyas B Prabhu
Please ignore this mail. I have resent this post using the correct version number. Sorry for the noise. On 06/30/2016 07:57 PM, Shreyas B. Prabhu wrote: > Snooze is a poll idle state in powernv and pseries platforms. Snooze > has a timeout so that if a cpu stays in snooze for more than

[PATCH] cpuidle: Fix last_residency division

2016-06-30 Thread Shreyas B. Prabhu
Bisected-by: Shilpasri G Bhat Suggested-by David Laight Signed-off-by: Shreyas B. Prabhu --- Changes in v4 = - Increasing the threshold upto which approximation can be used. - Removed explicit cast. Instead added a comment saying why cast is safe. Changes in v3

Re: [PATCH v3] cpuidle: Fix last_residency division

2016-06-30 Thread Shreyas B Prabhu
On 06/29/2016 08:31 PM, Nicolas Pitre wrote: > On Wed, 29 Jun 2016, Daniel Lezcano wrote: > >> On 06/29/2016 09:06 AM, Shreyas B. Prabhu wrote: >>> diff --git a/drivers/cpuidle/cpuidle.h b/drivers/cpuidle/cpuidle.h >>> index f87f399..c8ea5ad 100644 >>> --

Re: [PATCH v3] cpuidle: Fix last_residency division

2016-06-29 Thread Shreyas B Prabhu
>> >> +/* >> + * Used for calculating last_residency in usec. Optimized for case >> + * where last_residency in nsecs is < INT_MAX/2 by using faster >> + * approximation. Approximated value has less than 1% error. >> + */ >> +static inline int convert_nsec_to_usec(u64 nsec) >> +{ >> +if (likel

[PATCH v3] cpuidle: Fix last_residency division

2016-06-29 Thread Shreyas B. Prabhu
Bisected-by: Shilpasri G Bhat Suggested-by David Laight Signed-off-by: Shreyas B. Prabhu --- Changes in v3 = - Using approximation suggested by David Changes in v2 = - Fixing it in the cpuidle core code instead of driver code. drivers/cpuidle/cpuidle.c | 11 +++---

Re: [PATCH v2] cpuidle: Fix last_residency division

2016-06-29 Thread Shreyas B Prabhu
On 06/27/2016 02:29 PM, David Laight wrote: > From: Arnd Bergmann >> Sent: 24 June 2016 20:43 >> On Friday, June 24, 2016 9:31:35 PM CEST Shreyas B Prabhu wrote: >>>> If those functions are called less often than cpuidle_enter_state(), >>>> we could

Re: [PATCH v2] cpuidle: Fix last_residency division

2016-06-24 Thread Shreyas B Prabhu
On 06/24/2016 03:41 PM, Arnd Bergmann wrote: > On Friday, June 24, 2016 9:00:48 AM CEST David Laight wrote: >> The intent of the >> 10 was probably to avoid an expensive 64bit divide. >> So maybe something like: >> diff = time_end - time_start; >> if (diff >= INT_MAX/2) >>

[PATCH v2] cpuidle: Fix last_residency division

2016-06-24 Thread Shreyas B. Prabhu
-by: Anton Blanchard Bisected-by: Shilpasri G Bhat Signed-off-by: Shreyas B. Prabhu --- Changes in v2 = - Fixing it in the cpuidle core code instead of driver code. drivers/cpuidle/cpuidle.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/cpuidle/c

Re: [PATCH] cpuidle/powernv: Fix snooze timeout

2016-06-23 Thread Shreyas B Prabhu
On 06/23/2016 03:31 PM, Daniel Lezcano wrote: > On 06/23/2016 11:28 AM, Balbir Singh wrote: > > [ ... ] > >>> cpuidle_enter_state() >>> { >>> [...] >>> time_start = local_clock(); >>> [enter idle state] >>> time_end = local_clock(); >>> /* >>> * local_clock() retur

Re: [PATCH] cpuidle/powernv: Fix snooze timeout

2016-06-23 Thread Shreyas B Prabhu
On 06/23/2016 02:58 PM, Balbir Singh wrote: > > > On 23/06/16 14:58, Shreyas B Prabhu wrote: >> >> >> On 06/23/2016 05:18 AM, Balbir Singh wrote: >>> >>> >>> On 23/06/16 05:36, Shreyas B. Prabhu wrote: >>>> Snooze is a poll idle

Re: [PATCH] cpuidle/powernv: Fix snooze timeout

2016-06-22 Thread Shreyas B Prabhu
On 06/23/2016 05:18 AM, Balbir Singh wrote: > > > On 23/06/16 05:36, Shreyas B. Prabhu wrote: >> Snooze is a poll idle state in powernv and pseries platforms. Snooze >> has a timeout so that if a cpu stays in snooze for more than target >> residency of the next av

Re: cpuidle broken on mainline

2016-06-22 Thread Shreyas B Prabhu
Hi, On 06/22/2016 08:46 PM, Anton Blanchard wrote: > Hi, > > I was noticing some pretty big run to run variations on single threaded > benchmarks, and I've isolated it cpuidle issues. If I look at > the cpuidle tracepoint, I notice we only go into the snooze state. > > Do we have any known bugs

[PATCH] cpuidle/powernv: Fix snooze timeout

2016-06-22 Thread Shreyas B. Prabhu
timeout to 105% of target_residency of next available idle state. This also adds comment around why snooze timeout is necessary. Reported-by: Anton Blanchard Signed-off-by: Shreyas B. Prabhu --- drivers/cpuidle/cpuidle-powernv.c | 14 ++ drivers/cpuidle/cpuidle-pseries.c | 13 ++

Re: [v6, 08/11] powerpc/powernv: Add platform support for stop instruction

2016-06-15 Thread Shreyas B Prabhu
Hi Michael, On 06/15/2016 04:44 PM, Michael Ellerman wrote: > Hi Shreyas, > > Comments inline ... > > On Wed, 2016-08-06 at 16:54:28 UTC, "Shreyas B. Prabhu" wrote: >> POWER ISA v3 defines a new idle processor core mechanism. In summary, >> a) new

Re: [v6, 07/11] powerpc/powernv: set power_save func after the idle states are initialized

2016-06-14 Thread Shreyas B Prabhu
On 06/15/2016 11:11 AM, Michael Ellerman wrote: > On Wed, 2016-08-06 at 16:54:27 UTC, "Shreyas B. Prabhu" wrote: >> pnv_init_idle_states discovers supported idle states from the >> device tree and does the required initialization. Set power_save >> function pointer

Re: [PATCH v6 10/11] cpuidle/powernv: Add support for POWER ISA v3 idle states

2016-06-14 Thread Shreyas B Prabhu
On 06/14/2016 04:59 PM, Benjamin Herrenschmidt wrote: > On Tue, 2016-06-14 at 16:17 +0530, Shreyas B Prabhu wrote: > >> >> I ignored adding this check because this is part of initcall and we are >> unlikely to run out of memory at this state. But I'll add the check

Re: [PATCH v6 10/11] cpuidle/powernv: Add support for POWER ISA v3 idle states

2016-06-14 Thread Shreyas B Prabhu
On 06/14/2016 03:18 AM, Benjamin Herrenschmidt wrote: > On Wed, 2016-06-08 at 11:54 -0500, Shreyas B. Prabhu wrote: >> >> /* >> * States for dedicated partition case. >> */ >> @@ -167,6 +183,8 @@ static int powernv_add_idle_states(void) >>

Re: [PATCH v6 10/11] cpuidle/powernv: Add support for POWER ISA v3 idle states

2016-06-14 Thread Shreyas B Prabhu
On 06/13/2016 09:04 PM, Daniel Lezcano wrote: > On Wed, Jun 08, 2016 at 11:54:30AM -0500, Shreyas B. Prabhu wrote: >> POWER ISA v3 defines a new idle processor core mechanism. In summary, >> a) new instruction named stop is added. >> b) new per thread SPR named PSSCR is

Re: [PATCH v5 08/11] powerpc/powernv: Add platform support for stop instruction

2016-06-09 Thread Shreyas B Prabhu
On 06/09/2016 10:12 AM, Sam Bobroff wrote: > On Thu, Jun 02, 2016 at 07:38:58AM -0500, Shreyas B. Prabhu wrote: > > ... > >> +/* Power Management - PSSCR Fields */ > > It might be nice to give the full name of the register, as below with the > FPSCR. > I&#x

Re: [PATCH v5 08/11] powerpc/powernv: Add platform support for stop instruction

2016-06-08 Thread Shreyas B Prabhu
Hi Ben, Sorry for the delayed response. On 06/06/2016 03:58 AM, Benjamin Herrenschmidt wrote: > On Thu, 2016-06-02 at 07:38 -0500, Shreyas B. Prabhu wrote: >> @@ -61,8 +72,13 @@ save_sprs_to_stack: >> * Note all register i.e per-core, per-subcore or per-

[PATCH v6 11/11] powerpc/powernv: Use deepest stop state when cpu is offlined

2016-06-08 Thread Shreyas B. Prabhu
If hardware supports stop state, use the deepest stop state when the cpu is offlined. Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- - No changes since v1 arch/powerpc/platforms/powernv/idle.c| 15 +-- arch/powerpc/platforms/powernv/powernv.h | 1 + arch

[PATCH v6 10/11] cpuidle/powernv: Add support for POWER ISA v3 idle states

2016-06-08 Thread Shreyas B. Prabhu
: Daniel Lezcano Cc: Rob Herring Cc: Lorenzo Pieralisi Cc: linux...@vger.kernel.org Cc: Michael Ellerman Cc: Paul Mackerras Cc: linuxppc-dev@lists.ozlabs.org Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- Note: Documentation for the device tree bindings is posted here- http

[PATCH v6 09/11] cpuidle/powernv: Use CPUIDLE_STATE_MAX instead of MAX_POWERNV_IDLE_STATES

2016-06-08 Thread Shreyas B. Prabhu
Use cpuidle's CPUIDLE_STATE_MAX macro instead of powernv specific MAX_POWERNV_IDLE_STATES. Cc: Rafael J. Wysocki Cc: Daniel Lezcano Cc: linux...@vger.kernel.org Suggested-by: Daniel Lezcano Signed-off-by: Shreyas B. Prabhu --- - No changes after v5 Changes in v5 = - New

[PATCH v6 05/11] powerpc/powernv: Make pnv_powersave_common more generic

2016-06-08 Thread Shreyas B. Prabhu
rfid address as a function parameter. Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- - No changes since v4 Changes in v4: == - Moved renaming of power7_powersave_common to earlier patch Changes in v3: == - Moved HSTATE_HWTHREAD_STATE updation to

[PATCH v6 08/11] powerpc/powernv: Add platform support for stop instruction

2016-06-08 Thread Shreyas B. Prabhu
instruction and PSSCR handling. Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- Changes in v6 = - Save/restore new P9 SPRs when using deep idle states Changes in v4: == - Added PSSCR layout to commit message - Improved / Fixed comments - Fixed whitespace

[PATCH v6 06/11] powerpc/powernv: abstraction for saving SPRs before entering deep idle states

2016-06-08 Thread Shreyas B. Prabhu
Create a function for saving SPRs before entering deep idle states. This function can be reused for POWER9 deep idle states. Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- - No changes since v3 Changes in v3: = - Newly added in v3 arch/powerpc/kernel

[PATCH v6 07/11] powerpc/powernv: set power_save func after the idle states are initialized

2016-06-08 Thread Shreyas B. Prabhu
pnv_init_idle_states discovers supported idle states from the device tree and does the required initialization. Set power_save function pointer only after this initialization is done Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- - No changes since v1 arch/powerpc

[PATCH v6 01/11] powerpc/powernv: Use PNV_THREAD_WINKLE macro while requesting for winkle

2016-06-08 Thread Shreyas B. Prabhu
Signed-off-by: Shreyas B. Prabhu --- -No changes since v4 Changes in v4 = - New in v4 arch/powerpc/kernel/idle_power7.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/idle_power7.S b/arch/powerpc/kernel/idle_power7.S index 470ceeb..705c867

[PATCH v6 03/11] powerpc/powernv: Rename idle_power7.S to idle_power_common.S

2016-06-08 Thread Shreyas B. Prabhu
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. Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- - No changes since v3 Changes in v3: == - Instead of moving few common

[PATCH v6 04/11] powerpc/powernv: Rename reusable idle functions to hardware agnostic names

2016-06-08 Thread Shreyas B. Prabhu
Functions like power7_wakeup_loss, power7_wakeup_noloss, power7_wakeup_tb_loss are used by POWER7 and POWER8 hardware. They can also be used by POWER9. Hence rename these functions hardware agnostic names. Suggested-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- - No changes since

[PATCH v6 02/11] powerpc/kvm: make hypervisor state restore a function

2016-06-08 Thread Shreyas B. Prabhu
kvm) goto kvm_start_guest goto power7_wakeup_loss Reviewed-by: Paul Mackerras Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- - No changes since v3 Changes in v3: = - Retaining GET_PACA(r13) in System Reset vector instead of moving it to

[PATCH v6 00/11] powerpc/powernv/cpuidle: Add support for POWER ISA v3 idle states

2016-06-08 Thread Shreyas B. Prabhu
Cc: linuxppc-dev@lists.ozlabs.org Cc: Rob Herring Cc: Lorenzo Pieralisi Shreyas B. Prabhu (11): powerpc/powernv: Use PNV_THREAD_WINKLE macro while requesting for winkle powerpc/kvm: make hypervisor state restore a function powerpc/powernv: Rename idle_power7.S to idle_power_common.S pow

[PATCH v5 11/11] powerpc/powernv: Use deepest stop state when cpu is offlined

2016-06-02 Thread Shreyas B. Prabhu
If hardware supports stop state, use the deepest stop state when the cpu is offlined. Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- - No changes since v1 arch/powerpc/platforms/powernv/idle.c| 15 +-- arch/powerpc/platforms/powernv/powernv.h | 1 + arch

[PATCH v5 10/11] cpuidle/powernv: Add support for POWER ISA v3 idle states

2016-06-02 Thread Shreyas B. Prabhu
: Daniel Lezcano Cc: Rob Herring Cc: Lorenzo Pieralisi Cc: linux...@vger.kernel.org Cc: Michael Ellerman Cc: Paul Mackerras Cc: linuxppc-dev@lists.ozlabs.org Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- Note: Documentation for the device tree bindings is posted here- http

[PATCH v5 09/11] cpuidle/powernv: Use CPUIDLE_STATE_MAX instead of MAX_POWERNV_IDLE_STATES

2016-06-02 Thread Shreyas B. Prabhu
Use cpuidle's CPUIDLE_STATE_MAX macro instead of powernv specific MAX_POWERNV_IDLE_STATES. Cc: Rafael J. Wysocki Cc: Daniel Lezcano Cc: linux...@vger.kernel.org Suggested-by: Daniel Lezcano Signed-off-by: Shreyas B. Prabhu --- - New in v5 drivers/cpuidle/cpuidle-powernv.c | 4 +--- 1

[PATCH v5 08/11] powerpc/powernv: Add platform support for stop instruction

2016-06-02 Thread Shreyas B. Prabhu
instruction and PSSCR handling. Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- - No changes in v5 Changes in v4: == - Added PSSCR layout to commit message - Improved / Fixed comments - Fixed whitespace error in paca.h - Using MAX_POSSIBLE_STOP_STATE macro instead of

[PATCH v5 07/11] powerpc/powernv: set power_save func after the idle states are initialized

2016-06-02 Thread Shreyas B. Prabhu
pnv_init_idle_states discovers supported idle states from the device tree and does the required initialization. Set power_save function pointer only after this initialization is done Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- - No changes since v1 arch/powerpc

[PATCH v5 06/11] powerpc/powernv: abstraction for saving SPRs before entering deep idle states

2016-06-02 Thread Shreyas B. Prabhu
Create a function for saving SPRs before entering deep idle states. This function can be reused for POWER9 deep idle states. Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- - No changes from v3 Changes in v3: = - Newly added in v3 arch/powerpc/kernel

[PATCH v5 05/11] powerpc/powernv: Make pnv_powersave_common more generic

2016-06-02 Thread Shreyas B. Prabhu
rfid address as a function parameter. Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- - No changes in v5 Changes in v4: == - Moved renaming of power7_powersave_common to earlier patch Changes in v3: == - Moved HSTATE_HWTHREAD_STATE updation to

[PATCH v5 04/11] powerpc/powernv: Rename reusable idle functions to hardware agnostic names

2016-06-02 Thread Shreyas B. Prabhu
Functions like power7_wakeup_loss, power7_wakeup_noloss, power7_wakeup_tb_loss are used by POWER7 and POWER8 hardware. They can also be used by POWER9. Hence rename these functions hardware agnostic names. Suggested-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- - No changes in v5

[PATCH v5 03/11] powerpc/powernv: Rename idle_power7.S to idle_power_common.S

2016-06-02 Thread Shreyas B. Prabhu
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. Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- - No changes from v3 Changes in v3: == - Instead of moving few common

[PATCH v5 02/11] powerpc/kvm: make hypervisor state restore a function

2016-06-02 Thread Shreyas B. Prabhu
kvm) goto kvm_start_guest goto power7_wakeup_loss Reviewed-by: Paul Mackerras Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- - No changes in v4 Changes in v3: = - Retaining GET_PACA(r13) in System Reset vector instead of moving it to

[PATCH v5 01/11] powerpc/powernv: Use PNV_THREAD_WINKLE macro while requesting for winkle

2016-06-02 Thread Shreyas B. Prabhu
Signed-off-by: Shreyas B. Prabhu --- -No changes in v5 Changes in v4 = - New in v4 arch/powerpc/kernel/idle_power7.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/idle_power7.S b/arch/powerpc/kernel/idle_power7.S index 470ceeb..705c867

[PATCH v5 00/11] powerpc/powernv/cpuidle: Add support for POWER ISA v3 idle states

2016-06-02 Thread Shreyas B. Prabhu
ARCH_300 bit instead of CPU_FTR_STOP_INST Cc: Rafael J. Wysocki Cc: Daniel Lezcano Cc: linux...@vger.kernel.org Cc: Michael Ellerman Cc: Paul Mackerras Cc: Michael Neuling Cc: linuxppc-dev@lists.ozlabs.org Cc: Rob Herring Cc: Lorenzo Pieralisi Shreyas B. Prabhu (11): powerpc/

Re: [PATCH v4 09/10] cpuidle/powernv: Add support for POWER ISA v3 idle states

2016-05-31 Thread Shreyas B Prabhu
Hi Daniel, On 05/30/2016 07:56 PM, Daniel Lezcano wrote: > On 05/24/2016 03:15 PM, Shreyas B. Prabhu wrote: >> POWER ISA v3 defines a new idle processor core mechanism. In summary, >> a) new instruction named stop is added. >> b) new per thread SPR named PSSCR is add

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

2016-05-30 Thread Shreyas B Prabhu
Hi Ram, On 05/28/2016 05:36 AM, Ram Pai wrote: > On Tue, May 24, 2016 at 06:45:12PM +0530, Shreyas B. Prabhu wrote: [snip] >> @@ -230,11 +236,18 @@ static DEVICE_ATTR(fastsleep_workaround_applyonce, >> 0600, >> show_fastsleep

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

2016-05-24 Thread Shreyas B Prabhu
On 05/24/2016 02:17 PM, Madhavan Srinivasan wrote: > > > On Monday 23 May 2016 08:48 PM, 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 >> i

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

2016-05-24 Thread Shreyas B Prabhu
On 05/24/2016 03:54 PM, Gautham R Shenoy wrote: > 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 cor

[PATCH v4 06/10] powerpc/powernv: abstraction for saving SPRs before entering deep idle states

2016-05-24 Thread Shreyas B. Prabhu
Create a function for saving SPRs before entering deep idle states. This function can be reused for POWER9 deep idle states. Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- - No changes in v4 Changes in v3: = - Newly added in v3 arch/powerpc/kernel

[PATCH v4 10/10] powerpc/powernv: Use deepest stop state when cpu is offlined

2016-05-24 Thread Shreyas B. Prabhu
If hardware supports stop state, use the deepest stop state when the cpu is offlined. Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- - No changes since v1 arch/powerpc/platforms/powernv/idle.c| 15 +-- arch/powerpc/platforms/powernv/powernv.h | 1 + arch

[PATCH v4 09/10] cpuidle/powernv: Add support for POWER ISA v3 idle states

2016-05-24 Thread Shreyas B. Prabhu
: Daniel Lezcano Cc: linux...@vger.kernel.org Cc: Michael Ellerman Cc: Paul Mackerras Cc: linuxppc-dev@lists.ozlabs.org Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- - No changes since v1 drivers/cpuidle/cpuidle-powernv.c | 57 ++- 1 file

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

2016-05-24 Thread Shreyas B. Prabhu
instruction and PSSCR handling. Signed-off-by: Shreyas B. Prabhu --- Changes in v4: == - Added PSSCR layout to commit message - Improved / Fixed comments - Fixed whitespace error in paca.h - Using MAX_POSSIBLE_STOP_STATE macro instead of hardcoding 0xF has max possible stop state

[PATCH v4 04/10] powerpc/powernv: Rename reusable idle functions to hardware agnostic names

2016-05-24 Thread Shreyas B. Prabhu
Functions like power7_wakeup_loss, power7_wakeup_noloss, power7_wakeup_tb_loss are used by POWER7 and POWER8 hardware. They can also be used by POWER9. Hence rename these functions hardware agnostic names. Suggested-by: Gautham R. Shenoy Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B

[PATCH v4 07/10] powerpc/powernv: set power_save func after the idle states are initialized

2016-05-24 Thread Shreyas B. Prabhu
pnv_init_idle_states discovers supported idle states from the device tree and does the required initialization. Set power_save function pointer only after this initialization is done Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- - No changes since v1 arch/powerpc

[PATCH v4 05/10] powerpc/powernv: Make pnv_powersave_common more generic

2016-05-24 Thread Shreyas B. Prabhu
rfid address as a function parameter. Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- Changes in v4: == - Moved renaming of power7_powersave_common to earlier patch Changes in v3: == - Moved HSTATE_HWTHREAD_STATE updation to power_powersave_common

[PATCH v4 03/10] powerpc/powernv: Rename idle_power7.S to idle_power_common.S

2016-05-24 Thread Shreyas B. Prabhu
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. Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- - No changes in v4 Changes in v3: == - Instead of moving few common

[PATCH v4 02/10] powerpc/kvm: make hypervisor state restore a function

2016-05-24 Thread Shreyas B. Prabhu
kvm) goto kvm_start_guest goto power7_wakeup_loss Reviewed-by: Paul Mackerras Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- - No changes in v4 Changes in v3: = - Retaining GET_PACA(r13) in System Reset vector instead of moving it to

[PATCH v4 01/10] powerpc/powernv: Use PNV_THREAD_WINKLE macro while requesting for winkle

2016-05-24 Thread Shreyas B. Prabhu
Signed-off-by: Shreyas B. Prabhu --- Changes in v4 = - New in v4 arch/powerpc/kernel/idle_power7.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/idle_power7.S b/arch/powerpc/kernel/idle_power7.S index 470ceeb..705c867 100644 --- a/arch

[PATCH v4 00/10] powerpc/powernv/cpuidle: Add support for POWER ISA v3 idle states

2016-05-24 Thread Shreyas B. Prabhu
in v2 = - Rebased on v4.6-rc6 - Using CPU_FTR_ARCH_300 bit instead of CPU_FTR_STOP_INST Cc: Rafael J. Wysocki Cc: Daniel Lezcano Cc: linux...@vger.kernel.org Cc: Michael Ellerman Cc: Paul Mackerras Cc: Michael Neuling Cc: linuxppc-dev@lists.ozlabs.org Shreyas B. Prabh

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

2016-05-23 Thread Shreyas B. Prabhu
If hardware supports stop state, use the deepest stop state when the cpu is offlined. Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- arch/powerpc/platforms/powernv/idle.c| 15 +-- arch/powerpc/platforms/powernv/powernv.h | 1 + arch/powerpc/platforms

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

2016-05-23 Thread Shreyas B. Prabhu
: Daniel Lezcano Cc: linux...@vger.kernel.org Cc: Michael Ellerman Cc: Paul Mackerras Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Shreyas B. Prabhu --- drivers/cpuidle/cpuidle-powernv.c | 57 ++- 1 file changed, 56 insertions(+), 1 deletion(-) diff --git a

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

2016-05-23 Thread Shreyas B. Prabhu
for stop instruction and PSSCR handling. Signed-off-by: Shreyas B. Prabhu --- Changes in v3: == - Instead of introducing new file idle_power_stop.S, P9 idle support is added to idle_power_common.S using CPU_FTR sections. - Fixed r4 reg clobbering in power_stop0 - Improved

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

2016-05-23 Thread Shreyas B. Prabhu
pnv_init_idle_states discovers supported idle states from the device tree and does the required initialization. Set power_save function pointer only after this initialization is done Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- arch/powerpc/platforms/powernv/idle.c | 3

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

2016-05-23 Thread Shreyas B. Prabhu
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 --- New in v3 arch/powerpc/kernel/idle_power_common.S | 54 +++-- 1 file changed, 32 insertions(+), 22

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

2016-05-23 Thread Shreyas B. Prabhu
address as a function parameter. Also make function name more generic. Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- Changes in v3: == - Moved HSTATE_HWTHREAD_STATE updation to power_powersave_common arch/powerpc/kernel/idle_power_common.S | 30

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

2016-05-23 Thread Shreyas B. Prabhu
Functions like power7_wakeup_loss, power7_wakeup_noloss, power7_wakeup_tb_loss are used by POWER7 and POWER8 hardware. They can also be used by POWER9. Hence rename these functions hardware agnostic names. Suggested-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- New in v3 arch

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

2016-05-23 Thread Shreyas B. Prabhu
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 --- Changes in v3: == - Instead of moving few common functions from idle_power7.S to idle_power_common.S

[PATCH v3 1/9] powerpc/kvm: make hypervisor state restore a function

2016-05-23 Thread Shreyas B. Prabhu
kvm) goto kvm_start_guest goto power7_wakeup_loss Reviewed-by: Paul Mackerras Reviewed-by: Gautham R. Shenoy Signed-off-by: Shreyas B. Prabhu --- Changes in v3: = - Retaining GET_PACA(r13) in System Reset vector instead of moving it to

  1   2   3   >