[PATCH v4 0/3] powerpc: powernv: Fastsleep workaround behavior

2015-04-13 Thread Shreyas B. Prabhu
ibute Changes in v2: -- -Changed commit message to accurately describe the downside of running workaround always applied. Shreyas B. Prabhu (3): powerpc: Fix cpu_online_cores_map to return only online threads mask powerpc/powernv: Move cpuidle related code from setup.c to new file powerpc/powe

[PATCH v4 1/3] powerpc: Fix cpu_online_cores_map to return only online threads mask

2015-04-13 Thread Shreyas B. Prabhu
ction cpu_thread_mask_to_cores. The result has the property that for all cores with online threads, there is one bit set in the returned map. And further, all bits that are set in the returned map correspond to online threads. Signed-off-by: Shreyas B. Prabhu Reviewed-by: Preeti U Murthy [ Changelog from Mi

[PATCH v4 2/3] powerpc/powernv: Move cpuidle related code from setup.c to new file

2015-04-13 Thread Shreyas B. Prabhu
This is a cleanup patch; doesn't change any functionality. Moves all cpuidle related code from setup.c to a new file. Signed-off-by: Shreyas B. Prabhu --- arch/powerpc/platforms/powernv/Makefile | 2 +- arch/powerpc/platforms/powernv/idle.c | 191

[PATCH v4 3/3] powerpc/powernv: Introduce sysfs control for fastsleep workaround behavior

2015-04-13 Thread Shreyas B. Prabhu
ate. Signed-off-by: Shreyas B. Prabhu --- arch/powerpc/include/asm/opal-api.h| 7 ++ arch/powerpc/include/asm/opal.h| 1 + arch/powerpc/platforms/powernv/idle.c | 132 + arch/powerpc/platforms/powernv/opal-wrappers.S | 1 + 4 fi

Re: [PATCH v4 3/3] powerpc/powernv: Introduce sysfs control for fastsleep workaround behavior

2015-04-14 Thread Shreyas B Prabhu
>> >> By default, fastsleep_workaround_state = dynamic. In this case, workaround >> is applied/undone everytime the core enters/exits fastsleep. >> >> fastsleep_workaround_state = applyonce. In this case the workaround is >> applied once on all the cores and never undone. This can be triggered by

Re: [PATCH v4 3/3] powerpc/powernv: Introduce sysfs control for fastsleep workaround behavior

2015-04-14 Thread Shreyas B Prabhu
> > A point that bothers me here is if we can potentially race with cpu > hotplug ? If cpuX and its siblings are offline and it was interrupted to > come online: > > cpuX cpuY > Interrupted to come online > Undo workaround > >

[PATCH v5 0/3] powerpc: powernv: Fastsleep workaround behavior

2015-04-14 Thread Shreyas B. Prabhu
elogs Changes in v3: -- -Kernel parameter changed to sysfs attribute Changes in v2: -- -Changed commit message to accurately describe the downside of running workaround always applied. Shreyas B. Prabhu (3): powerpc: Fix cpu_online_cores_map to return only online threads mask p

[PATCH v5 1/3] powerpc: Fix cpu_online_cores_map to return only online threads mask

2015-04-14 Thread Shreyas B. Prabhu
ction cpu_thread_mask_to_cores. The result has the property that for all cores with online threads, there is one bit set in the returned map. And further, all bits that are set in the returned map correspond to online threads. Signed-off-by: Shreyas B. Prabhu Reviewed-by: Preeti U Murthy [ Changelog from Mi

[PATCH v5 2/3] powerpc/powernv: Move cpuidle related code from setup.c to new file

2015-04-14 Thread Shreyas B. Prabhu
This is a cleanup patch; doesn't change any functionality. Moves all cpuidle related code from setup.c to a new file. Signed-off-by: Shreyas B. Prabhu Reviewed-by: Preeti U Murthy --- arch/powerpc/platforms/powernv/Makefile | 2 +- arch/powerpc/platforms/powernv/idle.c

[PATCH v5 3/3] powerpc/powernv: Introduce sysfs control for fastsleep workaround behavior

2015-04-14 Thread Shreyas B. Prabhu
ate. Signed-off-by: Shreyas B. Prabhu --- arch/powerpc/include/asm/opal-api.h| 7 ++ arch/powerpc/include/asm/opal.h| 1 + arch/powerpc/platforms/powernv/idle.c | 134 + arch/powerpc/platforms/powernv/opal-wrappers.S | 1 + 4 fi

[PATCH] kvm: powerpc: Fix ppc64_defconfig + PPC_POWERNV=n build error

2015-04-16 Thread Shreyas B. Prabhu
y: Shreyas B. Prabhu --- arch/powerpc/kvm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kvm/Kconfig b/arch/powerpc/kvm/Kconfig index 11850f3..b3b3d9f 100644 --- a/arch/powerpc/kvm/Kconfig +++ b/arch/powerpc/kvm/Kconfig @@ -75,7 +75,7 @@ config KVM

[PATCH v6 0/3] powerpc: powernv: Fastsleep workaround behavior

2015-04-19 Thread Shreyas B. Prabhu
namic" vs "applyonce") as input. -Improved changelogs Changes in v3: -- -Kernel parameter changed to sysfs attribute Changes in v2: -- -Changed commit message to accurately describe the downside of running workaround always applied. Shreyas B. Prabhu

[PATCH v6 1/3] powerpc: Fix cpu_online_cores_map to return only online threads mask

2015-04-19 Thread Shreyas B. Prabhu
ction cpu_thread_mask_to_cores. The result has the property that for all cores with online threads, there is one bit set in the returned map. And further, all bits that are set in the returned map correspond to online threads. Signed-off-by: Shreyas B. Prabhu Reviewed-by: Preeti U Murthy [ Changelog from Mi

[PATCH v6 2/3] powerpc/powernv: Move cpuidle related code from setup.c to new file

2015-04-19 Thread Shreyas B. Prabhu
This is a cleanup patch; doesn't change any functionality. Moves all cpuidle related code from setup.c to a new file. Signed-off-by: Shreyas B. Prabhu Reviewed-by: Preeti U Murthy --- arch/powerpc/platforms/powernv/Makefile | 2 +- arch/powerpc/platforms/powernv/idle.c

[PATCH v6 3/3] powerpc/powernv: Introduce sysfs control for fastsleep workaround behavior

2015-04-19 Thread Shreyas B. Prabhu
ned-off-by: Shreyas B. Prabhu --- arch/powerpc/include/asm/opal-api.h| 7 ++ arch/powerpc/include/asm/opal.h| 1 + arch/powerpc/platforms/powernv/idle.c | 101 + arch/powerpc/platforms/powernv/opal-wrappers.S | 1 + 4 files chan

Re: [PATCH] kvm: powerpc: Fix ppc64_defconfig + PPC_POWERNV=n build error

2015-04-22 Thread Shreyas B Prabhu
Any suggestions on this? On Thursday 16 April 2015 04:28 PM, Shreyas B. Prabhu wrote: > kvm_no_guest function calls power7_wakeup_loss to put the thread into > the deepest supported idle state. power7_wakeup_loss is defined in > arch/powerpc/kernel/idle_power7.S, which is compiled

[PATCH] powerpc: Make doorbell check preemption safe

2015-05-19 Thread Shreyas B. Prabhu
into issues if after we check if the destination cpu is a sibling cpu, the task gets migrated from a sibling cpu to a cpu on another core. Fix this by using get_cpu()/ put_cpu() Signed-off-by: Shreyas B. Prabhu --- arch/powerpc/sysdev/xics/icp-native.c | 14 +- 1 file changed, 9

Re: [PATCH] powerpc/powernv: Fix idle state allocation corruption

2015-05-20 Thread Shreyas B Prabhu
On Wednesday 20 May 2015 10:43 PM, Jack Miller wrote: > pnv_alloc_idle_core_states is iterating over PACAs based on the > configured maximum number of CPUs (NR_CPUS), but PACAs are only > initialized up to nr_cpu_ids, so rein in loops to keep from overwriting > adjacent memory. > Hi Jack, Jan

Re: [PATCH] powerpc: Make doorbell check preemption safe

2015-06-04 Thread Shreyas B Prabhu
On Wednesday 20 May 2015 06:30 AM, Michael Neuling wrote: > On Wed, 2015-05-20 at 00:30 +0530, Shreyas B. Prabhu wrote: >> Doorbell can be used to cause ipi on cpus which are sibling threads on >> the same core. So icp_native_cause_ipi checks if the destination cpu >> is a

[PATCH 7/9] powerpc/powernv: Add winkle infrastructure

2014-08-25 Thread Shreyas B. Prabhu
renschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org Suggested-by: Vaidyanathan Srinivasan Signed-off-by: Shreyas B. Prabhu --- arch/powerpc/include/asm/machdep.h | 1 + arch/powerpc/include/asm/paca.h| 3 ++ arch/powerpc/include/asm/ppc-opco

[PATCH 9/9] powerpc/powernv: Enter deepest supported idle state in offline

2014-08-25 Thread Shreyas B. Prabhu
Enter winkle during offline if supported, else revert to sleep or nap. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Shreyas B. Prabhu --- arch/powerpc/platforms/powernv/smp.c | 6 -- 1 file changed, 4 insertions(+), 2

Re: [PATCH 0/9] powerpc/powernv: Support for fastsleep and winkle

2014-09-11 Thread Shreyas B Prabhu
Hi, Any updates on this patch series? On Monday 25 August 2014 11:31 PM, Shreyas B. Prabhu wrote: > Fast sleep is an idle state, where the core and the L1 and L2 > caches are brought down to a threshold voltage. This also means that > the communication between L2 and L3 caches have to

Re: [PATCH 0/9] powerpc/powernv: Support for fastsleep and winkle

2014-09-17 Thread Shreyas B Prabhu
4 4. Online the core 5. Start a guest (Topology 1 core 2 threads) on a subcore, in this case on cpu 36 This works without any glitch. Thanks, Shreyas On Monday 25 August 2014 11:31 PM, Shreyas B. Prabhu wrote: > Fast sleep is an idle state, where the core and the L1 and L2 > caches are b

Re: [PATCH 0/9] powerpc/powernv: Support for fastsleep and winkle

2014-09-29 Thread Shreyas B Prabhu
Hi, Any updates on this patch series? On Thursday 18 September 2014 08:41 AM, Shreyas B Prabhu wrote: > Hi, > > In this patch series we use winkle for offlined cores. I successfully > tested the working of this with subcore functionality. > > Test scenario was as follows: >

Re: [PATCH 0/9] powerpc/powernv: Support for fastsleep and winkle

2014-09-30 Thread Shreyas B Prabhu
Hi Rafael, On Tuesday 30 September 2014 04:58 AM, Rafael J. Wysocki wrote: > On Monday, September 29, 2014 03:53:06 PM Shreyas B Prabhu wrote: >> Hi, >> Any updates on this patch series? > > I have a couple of patches from there in my tree it seems. Please have a look &g

[PATCH v2] cpuidle/powernv: Populate cpuidle state details by querying the device-tree

2014-10-01 Thread Shreyas B. Prabhu
Cc: Grant Likely Cc: devicet...@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Cc: Michael Ellerman Signed-off-by: Preeti U. Murthy Signed-off-by: Shreyas B. Prabhu --- v2: Rebased on 3.17-rc7 Separated from 'powerpc/powernv: Support for fastsleep and winkle' v1: Initial post https:

[PATCH v2 0/3] powernv/cpuidle: Fastsleep workaround and fixes

2014-10-01 Thread Shreyas B. Prabhu
v1: https://lkml.org/lkml/2014/8/25/446 Preeti U Murthy (1): powerpc/powernv/cpuidle: Add workaround to enable fastsleep Shreyas B. Prabhu (1): powerpc/kvm/book3s_hv: Enable CPUs to run guest after waking up from fast-sleep Srivatsa S. Bhat (1): powerpc/powernv: Enable Offline CPUs to enter

[PATCH v2 1/3] powerpc/powernv: Enable Offline CPUs to enter deep idle states

2014-10-01 Thread Shreyas B. Prabhu
chmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Rafael J. Wysocki Cc: linux...@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Srivatsa S. Bhat Signed-off-by: Shreyas B. Prabhu [ Changelog modified by pre...@linux.vnet.ibm.com ] Signed-off-by: Preeti U. Murthy --- arch/power

[PATCH v2 2/3] powerpc/kvm/book3s_hv: Enable CPUs to run guest after waking up from fast-sleep

2014-10-01 Thread Shreyas B. Prabhu
check in the wakeup from any of the deep idle states path as well. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org Suggested-by: "Srivatsa S. Bhat" Signed-off-by: Shreyas B. Prabhu [ Changelog added by ] Signed-off-by: Preet

[PATCH v2 3/3] powerpc/powernv/cpuidle: Add workaround to enable fastsleep

2014-10-01 Thread Shreyas B. Prabhu
rman Cc: Rafael J. Wysocki Signed-off-by: Shreyas B. Prabhu Signed-off-by: Preeti U Murthy --- arch/powerpc/include/asm/machdep.h | 3 + arch/powerpc/include/asm/opal.h| 3 + arch/powerpc/include/asm/processor.h | 4 +- arch/power

[PATCH v2 0/5] Winkle support for offline cpus

2014-10-01 Thread Shreyas B. Prabhu
v@lists.ozlabs.org v2: Rebased on 3.17-rc7 Split from 'powerpc/powernv: Support for fastsleep and winkle' v1: https://lkml.org/lkml/2014/8/25/446 Shreyas B. Prabhu (5): powerpc/powernv: Add OPAL call to save and restore powerpc: Adding macro for accessing Thread Switch Control

[PATCH v2 1/5] powerpc/powernv: Add OPAL call to save and restore

2014-10-01 Thread Shreyas B. Prabhu
Mackerras Cc: Michael Ellerman Suggested-by: Vaidyanathan Srinivasan Signed-off-by: Shreyas B. Prabhu --- arch/powerpc/include/asm/opal.h| 2 ++ arch/powerpc/platforms/powernv/opal-wrappers.S | 1 + 2 files changed, 3 insertions(+) diff --git a/arch/powerpc/include/asm/opal.h b/arch

[PATCH v2 2/5] powerpc: Adding macro for accessing Thread Switch Control Register

2014-10-01 Thread Shreyas B. Prabhu
Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Shreyas B. Prabhu --- arch/powerpc/include/asm/reg.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h index

[PATCH v2 3/5] powerpc/powernv: Add winkle infrastructure

2014-10-01 Thread Shreyas B. Prabhu
s, recover slb Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org Suggested-by: Vaidyanathan Srinivasan Signed-off-by: Shreyas B. Prabhu --- arch/powerpc/include/asm/machdep.h | 1 + arch/powerpc/include/asm/paca.h| 3 ++ ar

[PATCH v2 4/5] powerpc/powernv: Discover and enable winkle

2014-10-01 Thread Shreyas B. Prabhu
Signed-off-by: Shreyas B. Prabhu --- arch/powerpc/include/asm/opal.h | 1 + arch/powerpc/platforms/powernv/powernv.h | 1 + arch/powerpc/platforms/powernv/setup.c | 75 arch/powerpc/platforms/powernv/subcore.c | 15 +++ 4 files changed, 92

[PATCH v2 5/5] powerpc/powernv: Enter deepest supported idle state in offline

2014-10-01 Thread Shreyas B. Prabhu
Enter winkle during offline if supported, else revert to sleep or nap. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Shreyas B. Prabhu --- arch/powerpc/platforms/powernv/smp.c | 6 -- 1 file changed, 4 insertions(+), 2

Re: [PATCH v2 2/3] powerpc/kvm/book3s_hv: Enable CPUs to run guest after waking up from fast-sleep

2014-10-02 Thread Shreyas B Prabhu
CCing Rafael J. Wysocki and linux...@vger.kernel.org On Wednesday 01 October 2014 01:15 PM, Shreyas B. Prabhu wrote: > When guests have to be launched, the secondary threads which are offline > are woken up to run the guests. Today these threads wake up from nap > and check if they ha

Re: [PATCH v2 0/3] powernv/cpuidle: Fastsleep workaround and fixes

2014-10-02 Thread Shreyas B Prabhu
On Thursday 02 October 2014 02:16 AM, Rafael J. Wysocki wrote: > On Wednesday, October 01, 2014 01:15:57 PM Shreyas B. Prabhu wrote: >> Fast sleep is an idle state, where the core and the L1 and L2 >> caches are brought down to a threshold voltage. This also means that >&

Re: [PATCH v2 3/5] powerpc/powernv: Add winkle infrastructure

2014-10-07 Thread Shreyas B Prabhu
On Tuesday 07 October 2014 11:03 AM, Benjamin Herrenschmidt wrote: > On Wed, 2014-10-01 at 13:16 +0530, Shreyas B. Prabhu wrote: >> Winkle causes power to be gated off to the entire chiplet. Hence the >> hypervisor/firmware state in the entire chiplet is lost. >> >>

[PATCH 0/4] powernv: cpuidle: Redesign idle states management

2014-11-03 Thread Shreyas B. Prabhu
: Enable Offline CPUs to enter deep idle states Shreyas B. Prabhu (2): powernv: cpuidle: Redesign idle states management powernv: powerpc: Add winkle support for offline cpus arch/powerpc/include/asm/cpuidle.h | 14 ++ arch/powerpc/include/asm/opal.h| 13 + arch

[PATCH 1/4] powerpc: powernv: Switch off MMU before entering nap/sleep/rvwinkle mode

2014-11-03 Thread Shreyas B. Prabhu
on relocation-on ISIs at 0xc...4400. This fixes it by setting the MSR as required by the architecture before setting the flag or executing the nap/sleep/rvwinkle instruction. [ shre...@linux.vnet.ibm.com: Edited to handle LE ] Signed-off-by: Paul Mackerras Signed-off-by: Shreyas B. Prabhu Cc: Benja

[PATCH 2/4] powerpc/powernv: Enable Offline CPUs to enter deep idle states

2014-11-03 Thread Shreyas B. Prabhu
Srivatsa S. Bhat Signed-off-by: Preeti U. Murthy Signed-off-by: Shreyas B. Prabhu Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Rafael J. Wysocki Cc: linux...@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org --- arch/powerpc/include/asm/opal.h | 8 ++ ar

[PATCH 4/4] powernv: powerpc: Add winkle support for offline cpus

2014-11-03 Thread Shreyas B. Prabhu
state. To manage this, extend the infrastructure introduced for sleep. Mainly we add a paca variable subcore_sibling_mask. Using this and the core_idle_state we can distingush first thread in core and subcore. Signed-off-by: Shreyas B. Prabhu Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael

[PATCH 3/4] powernv: cpuidle: Redesign idle states management

2014-11-03 Thread Shreyas B. Prabhu
this info to perform tasks like fastsleep workaround and timebase resync only once per core. Signed-off-by: Shreyas B. Prabhu Originally-by: Preeti U. Murthy Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Rafael J. Wysocki Cc: linux...@vger.kernel.org Cc: linuxppc-dev

Re: [PATCH 3/4] powernv: cpuidle: Redesign idle states management

2014-11-16 Thread Shreyas B Prabhu
Hi Preeti, On Wednesday 12 November 2014 12:21 PM, Preeti U Murthy wrote: > Hi Shreyas, > > On 11/03/2014 09:38 PM, Shreyas B. Prabhu wrote: >> diff --git a/arch/powerpc/kernel/idle_power7.S >> b/arch/powerpc/kernel/idle_power7.S >> index 283c603..df11acb 100644 &

[PATCH v2 0/4] powernv: cpuidle: Redesign idle states management

2014-11-25 Thread Shreyas B. Prabhu
Srinivasan Cc: Preeti U Murthy Paul Mackerras (1): powerpc: powernv: Switch off MMU before entering nap/sleep/rvwinkle mode Preeti U. Murthy (1): powerpc/powernv: Enable Offline CPUs to enter deep idle states Shreyas B. Prabhu (2): powernv: cpuidle: Redesign idle states management

[PATCH v2 1/4] powerpc: powernv: Switch off MMU before entering nap/sleep/rvwinkle mode

2014-11-25 Thread Shreyas B. Prabhu
on relocation-on ISIs at 0xc...4400. This fixes it by setting the MSR as required by the architecture before setting the flag or executing the nap/sleep/rvwinkle instruction. [ shre...@linux.vnet.ibm.com: Edited to handle LE ] Signed-off-by: Paul Mackerras Signed-off-by: Shreyas B. Prabhu Cc: Benja

[PATCH v2 2/4] powerpc/powernv: Enable Offline CPUs to enter deep idle states

2014-11-25 Thread Shreyas B. Prabhu
Srivatsa S. Bhat Signed-off-by: Preeti U. Murthy Signed-off-by: Shreyas B. Prabhu Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Rafael J. Wysocki Cc: linux...@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org --- arch/powerpc/include/asm/opal.h | 8 ++ ar

[PATCH v2 4/4] powernv: powerpc: Add winkle support for offline cpus

2014-11-25 Thread Shreyas B. Prabhu
state. To manage this, extend the infrastructure introduced for sleep. Mainly we add a paca variable subcore_sibling_mask. Using this and the core_idle_state we can distingush first thread in core and subcore. Signed-off-by: Shreyas B. Prabhu Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael

[PATCH v2 3/4] powernv: cpuidle: Redesign idle states management

2014-11-25 Thread Shreyas B. Prabhu
this info to perform tasks like fastsleep workaround and timebase resync only once per core. Signed-off-by: Shreyas B. Prabhu Originally-by: Preeti U. Murthy Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Rafael J. Wysocki Cc: linux...@vger.kernel.org Cc: linuxppc-dev

Re: [PATCH v2 3/4] powernv: cpuidle: Redesign idle states management

2014-11-26 Thread Shreyas B Prabhu
Hi Ben, On Thursday 27 November 2014 06:07 AM, Benjamin Herrenschmidt wrote: > >> >> @@ -37,8 +38,7 @@ >> >> /* >> * Pass requested state in r3: >> - * 0 - nap >> - * 1 - sleep >> + * r3 - PNV_THREAD_NAP/SLEEP/WINKLE >> * >> * To check IRQ_HAPPENED in r4 >> * 0 - don't check >> @

Re: [PATCH v2 4/4] powernv: powerpc: Add winkle support for offline cpus

2014-11-26 Thread Shreyas B Prabhu
Hi Ben, On Thursday 27 November 2014 07:25 AM, Benjamin Herrenschmidt wrote: > On Tue, 2014-11-25 at 16:47 +0530, Shreyas B. Prabhu wrote: > >> diff --git a/arch/powerpc/kernel/cpu_setup_power.S >> b/arch/powerpc/kernel/cpu_setup_power.S >> index 4673353..66874aa 1006

Re: [PATCH v2 3/4] powernv: cpuidle: Redesign idle states management

2014-11-30 Thread Shreyas B Prabhu
On Friday 28 November 2014 05:20 AM, Paul Mackerras wrote: > On Tue, Nov 25, 2014 at 04:47:58PM +0530, Shreyas B. Prabhu wrote: > [snip] >> +2: >> +/* Sleep or winkle */ >> +li r7,1 >> +mfspr r8,SPRN_PIR >> +/* >> + * The last

[PATCH v3 0/4] powernv: cpuidle: Redesign idle states management

2014-12-03 Thread Shreyas B. Prabhu
Cc: Preeti U Murthy Paul Mackerras (1): powerpc: powernv: Switch off MMU before entering nap/sleep/rvwinkle mode Preeti U. Murthy (1): powerpc/powernv: Enable Offline CPUs to enter deep idle states Shreyas B. Prabhu (2): powernv: cpuidle: Redesign idle states management powernv

[PATCH v3 1/4] powerpc: powernv: Switch off MMU before entering nap/sleep/rvwinkle mode

2014-12-03 Thread Shreyas B. Prabhu
on relocation-on ISIs at 0xc...4400. This fixes it by setting the MSR as required by the architecture before setting the flag or executing the nap/sleep/rvwinkle instruction. [ shre...@linux.vnet.ibm.com: Edited to handle LE ] Signed-off-by: Paul Mackerras Signed-off-by: Shreyas B. Prabhu Cc: Benja

[PATCH v3 3/4] powernv: cpuidle: Redesign idle states management

2014-12-03 Thread Shreyas B. Prabhu
this info to perform tasks like fastsleep workaround and timebase resync only once per core. Signed-off-by: Shreyas B. Prabhu Originally-by: Preeti U. Murthy Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Rafael J. Wysocki Cc: linux...@vger.kernel.org Cc: linuxppc-dev

[PATCH v3 2/4] powerpc/powernv: Enable Offline CPUs to enter deep idle states

2014-12-03 Thread Shreyas B. Prabhu
Srivatsa S. Bhat Signed-off-by: Preeti U. Murthy Signed-off-by: Shreyas B. Prabhu Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Rafael J. Wysocki Cc: linux...@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org --- arch/powerpc/include/asm/opal.h | 8 ++ ar

[PATCH v3 4/4] powernv: powerpc: Add winkle support for offline cpus

2014-12-03 Thread Shreyas B. Prabhu
state. To manage this, extend the infrastructure introduced for sleep. Mainly we add a paca variable subcore_sibling_mask. Using this and the core_idle_state we can distingush first thread in core and subcore. Signed-off-by: Shreyas B. Prabhu Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael

Re: [PATCH v3 3/4] powernv: cpuidle: Redesign idle states management

2014-12-07 Thread Shreyas B Prabhu
Hi Paul, On Monday 08 December 2014 10:31 AM, Paul Mackerras wrote: > On Thu, Dec 04, 2014 at 12:58:22PM +0530, Shreyas B. Prabhu wrote: >> Deep idle states like sleep and winkle are per core idle states. A core >> enters these states only when all the threads enter either the >

Re: [PATCH v3 4/4] powernv: powerpc: Add winkle support for offline cpus

2014-12-08 Thread Shreyas B Prabhu
On Monday 08 December 2014 11:22 AM, Paul Mackerras wrote: > On Thu, Dec 04, 2014 at 12:58:23PM +0530, Shreyas B. Prabhu wrote: >> Winkle is a deep idle state supported in power8 chips. A core enters >> winkle when all the threads of the core enter winkle. In this state >>

[PATCH v4 0/4] powernv: cpuidle: Redesign idle states management

2014-12-09 Thread Shreyas B. Prabhu
s to enter deep idle states Shreyas B. Prabhu (2): powernv: cpuidle: Redesign idle states management powernv: powerpc: Add winkle support for offline cpus arch/powerpc/include/asm/cpuidle.h | 14 ++ arch/powerpc/include/asm/opal.h| 13 + arch/powerpc/inc

[PATCH v4 1/4] powerpc: powernv: Switch off MMU before entering nap/sleep/rvwinkle mode

2014-12-09 Thread Shreyas B. Prabhu
on relocation-on ISIs at 0xc...4400. This fixes it by setting the MSR as required by the architecture before setting the flag or executing the nap/sleep/rvwinkle instruction. [ shre...@linux.vnet.ibm.com: Edited to handle LE ] Signed-off-by: Paul Mackerras Signed-off-by: Shreyas B. Prabhu Cc: Benja

[PATCH v4 2/4] powerpc/powernv: Enable Offline CPUs to enter deep idle states

2014-12-09 Thread Shreyas B. Prabhu
. Murthy Signed-off-by: Shreyas B. Prabhu Reviewed-by: Paul Mackerras Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Rafael J. Wysocki Cc: linux...@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org --- arch/powerpc/include/asm/opal.h | 8 ++ arch/powerpc

[PATCH v4 3/4] powernv: cpuidle: Redesign idle states management

2014-12-09 Thread Shreyas B. Prabhu
this info to perform tasks like fastsleep workaround and timebase resync only once per core. Signed-off-by: Shreyas B. Prabhu Originally-by: Preeti U. Murthy Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Rafael J. Wysocki Cc: linux...@vger.kernel.org Cc: linuxppc-dev

[PATCH v4 4/4] powernv: powerpc: Add winkle support for offline cpus

2014-12-09 Thread Shreyas B. Prabhu
state. To manage this, extend the infrastructure introduced for sleep. Mainly we add a paca variable subcore_sibling_mask. Using this and the core_idle_state we can distingush first thread in core and subcore. Signed-off-by: Shreyas B. Prabhu Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael

Re: [v3, 2/4] powerpc/powernv: Enable Offline CPUs to enter deep idle states

2014-12-14 Thread Shreyas B Prabhu
On Sunday 14 December 2014 03:35 PM, Michael Ellerman wrote: > On Thu, 2014-04-12 at 07:28:21 UTC, "Shreyas B. Prabhu" wrote: >> From: "Preeti U. Murthy" >> >> The secondary threads should enter deep idle states so as to gain maximum >> powersaving

Re: [v4,4/4] powernv: powerpc: Add winkle support for offline cpus

2014-12-14 Thread Shreyas B Prabhu
On Sunday 14 December 2014 03:35 PM, Michael Ellerman wrote: > On Tue, 2014-09-12 at 18:56:53 UTC, "Shreyas B. Prabhu" wrote: >> Winkle is a deep idle state supported in power8 chips. A core enters >> winkle when all the threads of the core enter winkle. In this sta

Re: [v4,4/4] powernv: powerpc: Add winkle support for offline cpus

2014-12-14 Thread Shreyas B Prabhu
On Monday 15 December 2014 05:31 AM, Michael Ellerman wrote: > On Sun, 2014-12-14 at 17:22 +0530, Shreyas B Prabhu wrote: >> On Sunday 14 December 2014 03:35 PM, Michael Ellerman wrote: >>>> diff --git a/arch/powerpc/platforms/powernv/subcore.h >>>> b/arch/po

Re: [PATCH] powerpc/powernv: pnv_init_idle_states() should only run on powernv

2015-06-14 Thread Shreyas B Prabhu
> @@ -289,5 +289,4 @@ out_free: > out: > return 0; > } > - > -subsys_initcall(pnv_init_idle_states); > +machine_subsys_initcall(powernv, pnv_init_idle_states); > needs to be included, otherwise I get a build error. With that, Reviewed-by: Shreyas B Prabhu _

[PATCH] powerpc/powernv: Fix race in updating core_idle_state

2015-06-30 Thread Shreyas B. Prabhu
while entering the idle states. Signed-off-by: Shreyas B. Prabhu --- arch/powerpc/kernel/idle_power7.S | 14 ++ 1 file changed, 14 insertions(+) diff --git a/arch/powerpc/kernel/idle_power7.S b/arch/powerpc/kernel/idle_power7.S index ccde8f0..48c7d4f 100644 --- a/arch/powerpc/k

Re: powerpc/powernv: Fix race in updating core_idle_state

2015-07-05 Thread Shreyas B Prabhu
> > What are the symptoms of this bug? > In the cases where we hit this race and the core enters fastsleep, code mistakes an idle thread as running. Because of this, the first thread waking up from fastsleep which is supposed to resync timebase skips it. So we can end up having a core with sta

[PATCH v2] powerpc/powernv: Fix race in updating core_idle_state

2015-07-06 Thread Shreyas B. Prabhu
hread as running. Because of this, the first thread waking up from fastsleep which is supposed to resync timebase skips it. So we can end up having a core with stale timebase value. This patch fixes the above race by looping on the lock bit even while entering the idle states. Signed-off-by: Shre

Re: [PATCH v2] powerpc/powernv: Fix race in updating core_idle_state

2015-07-06 Thread Shreyas B Prabhu
On 07/07/2015 05:52 AM, Michael Ellerman wrote: > On Tue, 2015-07-07 at 01:39 +0530, Shreyas B. Prabhu wrote: >> Signed-off-by: Shreyas B. Prabhu >> Fixes: 7b54e9f213f76 'powernv/powerpc: Add winkle support for offline >> cpus' > > The sha is wrong, it s

Re: [PATCH v2] powerpc/powernv: Fix race in updating core_idle_state

2015-07-08 Thread Shreyas B Prabhu
On 07/09/2015 10:11 AM, Daniel Axtens wrote: >> I recommend creating an alias or script that does: >> >> $ git log --pretty=fixes -n 1 $commit | xclip >> > > FWIW, having finally got around to doing this, I found I first needed > the following snippet in ~/.gitconfig from > https://www.kernel.or

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

2015-08-14 Thread Shreyas B Prabhu
_power8_hid0() which follows this > recipe and invoke it from the static split core path. > > Signed-off-by: Gautham R. Shenoy Reviewed-by: Shreyas B. Prabhu ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

[PATCH] powerpc/powernv: Fix build error when CONFIG_SMP=n

2014-05-20 Thread Shreyas B. Prabhu
unconditionally. Reported-by: Geert Uytterhoeven Signed-off-by: Shreyas B. Prabhu --- arch/powerpc/platforms/powernv/setup.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/platforms/powernv/setup.c b/arch/powerpc/platforms/powernv/setup.c index 8723d32..e6bde98 100644 --- a

[PATCH 1/2] powerpc/powernv: include asm/smp.h to handle UP config

2014-06-05 Thread Shreyas B. Prabhu
Reviewed-by: Srivatsa S. Bhat Signed-off-by: Shreyas B. Prabhu --- arch/powerpc/platforms/powernv/setup.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/platforms/powernv/setup.c b/arch/powerpc/platforms/powernv/setup.c index 8c16a5f..678573c 100644 --- a/arch/powerpc/platforms

[PATCH 2/2] powerpc/powernv : Disable subcore for UP configs

2014-06-05 Thread Shreyas B. Prabhu
: lvalue required as left operand of assignment 'setup_max_cpus' variable is relevant only on SMP, so there is no point working around it for UP. Furthermore, subcore.c itself is relevant only on SMP and hence the better solution is to exclude subcore.c for UP builds. Signed-off-by: Shreyas

[PATCHv2 1/2] powerpc/powernv: include asm/smp.h to fix UP build failure

2014-06-06 Thread Shreyas B. Prabhu
Reviewed-by: Srivatsa S. Bhat Signed-off-by: Shreyas B. Prabhu --- Changes is v2: Commit message improved based on suggestion. arch/powerpc/platforms/powernv/setup.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/platforms/powernv/setup.c b/arch/powerpc/platforms/powernv

[PATCH v2 2/2] powerpc/powernv : Disable subcore for UP configs

2014-06-06 Thread Shreyas B. Prabhu
ned-off-by: Shreyas B. Prabhu --- Changes in v2: Excluding subcore-asm.o which is part of the subcore feature for UP configs. arch/powerpc/platforms/powernv/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/platforms/powernv/Makefile b/arch/powerpc

[PATCH 0/9] powerpc/powernv: Support for fastsleep and winkle

2014-08-25 Thread Shreyas B. Prabhu
uidle: Add workaround to enable fastsleep Shreyas B. Prabhu (6): powerpc/kvm/book3s_hv: Enable CPUs to run guest after waking up from fast-sleep powerpc/powernv: Add OPAL call to save and restore powerpc: Adding macro for accessing Thread Switch Control Register powerpc/powernv:

[PATCH 0/9] powerpc/powernv: Support for fastsleep and winkle

2014-08-25 Thread Shreyas B. Prabhu
uidle: Add workaround to enable fastsleep Shreyas B. Prabhu (6): powerpc/kvm/book3s_hv: Enable CPUs to run guest after waking up from fast-sleep powerpc/powernv: Add OPAL call to save and restore powerpc: Adding macro for accessing Thread Switch Control Register powerpc/powernv:

[PATCH 1/9] powerpc/powernv: Enable Offline CPUs to enter deep idle states

2014-08-25 Thread Shreyas B. Prabhu
chmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Rafael J. Wysocki Cc: linux...@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Srivatsa S. Bhat Signed-off-by: Shreyas B. Prabhu [ Changelog modified by pre...@linux.vnet.ibm.com ] Signed-off-by: Preeti U. Murthy --- arch/power

[PATCH 3/9] powerpc/kvm/book3s_hv: Enable CPUs to run guest after waking up from fast-sleep

2014-08-25 Thread Shreyas B. Prabhu
check in the wakeup from any of the deep idle states path as well. Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org Suggested-by: "Srivatsa S. Bhat" Signed-off-by: Shreyas B. Prabhu [ Changelog added by ] Signed-off-by: Preet

[PATCH 4/9] powerpc/powernv/cpuidle: Add workaround to enable fastsleep

2014-08-25 Thread Shreyas B. Prabhu
rman Cc: Rafael J. Wysocki Signed-off-by: Shreyas B. Prabhu Signed-off-by: Preeti U Murthy --- arch/powerpc/include/asm/machdep.h | 3 + arch/powerpc/include/asm/opal.h| 3 + arch/powerpc/include/asm/processor.h | 4 +- arch/power

[PATCH 5/9] powerpc/powernv: Add OPAL call to save and restore

2014-08-25 Thread Shreyas B. Prabhu
Mackerras Cc: Michael Ellerman Suggested-by: Vaidyanathan Srinivasan Signed-off-by: Shreyas B. Prabhu --- arch/powerpc/include/asm/opal.h| 2 ++ arch/powerpc/platforms/powernv/opal-wrappers.S | 1 + 2 files changed, 3 insertions(+) diff --git a/arch/powerpc/include/asm/opal.h b/arch

[PATCH 6/9] powerpc: Adding macro for accessing Thread Switch Control Register

2014-08-25 Thread Shreyas B. Prabhu
Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Shreyas B. Prabhu --- arch/powerpc/include/asm/reg.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h index

[PATCH 8/9] powerpc/powernv: Discover and enable winkle

2014-08-25 Thread Shreyas B. Prabhu
Signed-off-by: Shreyas B. Prabhu --- arch/powerpc/include/asm/opal.h | 1 + arch/powerpc/platforms/powernv/powernv.h | 1 + arch/powerpc/platforms/powernv/setup.c | 75 arch/powerpc/platforms/powernv/subcore.c | 15 +++ 4 files changed, 92

Re: offlining cpus breakage

2015-01-13 Thread Shreyas B Prabhu
Hi, On Wednesday 07 January 2015 03:07 PM, Alexey Kardashevskiy wrote: > Hi! > > "ppc64_cpu --smt=off" produces multiple error on the latest upstream kernel > (sha1 bdec419): > > NMI watchdog: BUG: soft lockup - CPU#20 stuck for 23s! [swapper/20:0] > > or > > INFO: rcu_sched detected stalls

Re: offlining cpus breakage

2015-01-14 Thread Shreyas B Prabhu
On Wednesday 07 January 2015 03:07 PM, Alexey Kardashevskiy wrote: > Hi! > > "ppc64_cpu --smt=off" produces multiple error on the latest upstream kernel > (sha1 bdec419): > > NMI watchdog: BUG: soft lockup - CPU#20 stuck for 23s! [swapper/20:0] > > or > > INFO: rcu_sched detected stalls on CP

[PATCH] powerpc: powernv: winkle: Restore LPCR with LPCR_PECE1 cleared

2015-01-14 Thread Shreyas B. Prabhu
: Shreyas B. Prabhu Cc: Michael Ellerman Cc: Paul Mackerras Cc: Benjamin Herrenschmidt Cc: linuxppc-dev@lists.ozlabs.org --- This issue is separate from the issue which Alexey has reported. Fix for that is still pending. arch/powerpc/platforms/powernv/setup.c | 2 +- 1 file changed, 1 insertion

[PATCH v2 1/2] powerpc: Add helpers for LPCR PECE1 operations

2015-01-19 Thread Shreyas B. Prabhu
to be used in both these places. Signed-off-by: Shreyas B. Prabhu Cc: Michael Ellerman Cc: linuxppc-dev@lists.ozlabs.org --- arch/powerpc/include/asm/reg.h | 4 arch/powerpc/platforms/powernv/smp.c | 4 ++-- drivers/cpuidle/cpuidle-powernv.c| 3 +-- 3 files changed, 7 insertions

[PATCH v2 2/2] powerpc: powernv: winkle: Restore LPCR with LPCR_PECE1 cleared

2015-01-19 Thread Shreyas B. Prabhu
: Shreyas B. Prabhu Cc: Michael Ellerman Cc: Paul Mackerras Cc: Benjamin Herrenschmidt Cc: linuxppc-dev@lists.ozlabs.org --- Changes is v2: == Using the helper function introduced in the previous patch. arch/powerpc/platforms/powernv/setup.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH v2 1/2] powerpc: Add helpers for LPCR PECE1 operations

2015-01-22 Thread Shreyas B Prabhu
On Friday 23 January 2015 08:36 AM, Michael Ellerman wrote: > On Mon, 2015-01-19 at 13:35 +0530, Shreyas B. Prabhu wrote: >> PECE1 bit in LPCR is used to control whether decrementer can cause exit >> from powersaving states. PECE1 bit is cleared before entering fastsleep >>

[PATCH RFC] powerpc/powernv: Introduce kernel param to control fastsleep workaround behavior

2015-02-23 Thread Shreyas B. Prabhu
s can delay L2 fault detection. This patch adds a new kernel paramerter pnv_fastsleep_workaround_once, which can be used to override the default behavior and apply the workaround once at boot and not undo it. Signed-off-by: Shreyas B. Prabhu CC: Michael Ellerman CC: Paul Mackerras CC: Benjamin Herrens

[PATCH RFC v2] powerpc/powernv: Introduce kernel param to control fastsleep workaround behavior

2015-03-16 Thread Shreyas B. Prabhu
in L2 directory will result in a checkstop. This patch adds a new kernel paramerter pnv_fastsleep_workaround_once, which can be used to override the default behavior and apply the workaround once at boot and not undo it. Signed-off-by: Shreyas B. Prabhu CC: Michael Ellerman CC: Paul Mac

Re: [RFC, v2] powerpc/powernv: Introduce kernel param to control fastsleep workaround behavior

2015-03-17 Thread Shreyas B Prabhu
On Tuesday 17 March 2015 03:09 PM, Benjamin Herrenschmidt wrote: > On Tue, 2015-03-17 at 19:57 +1100, Michael Ellerman wrote: >> >> So my first preference is that you just bite the bullet and decide to either >> always apply the workaround, or just stick with the current behaviour. >> That's a >

[PATCH v3 1/3] powerpc: Fix cpu_online_cores_map to return only online threads mask

2015-03-21 Thread Shreyas B. Prabhu
d on cores where the first thread is offline. Fix this by setting first-online-cpu-of-the-core's bit in the mask. This is done by fixing this in the underlying function cpu_thread_mask_to_cores. Signed-off-by: Shreyas B. Prabhu --- This patch is new in v3 In an example scenario where all the

[PATCH v3 2/3] powerpc/powernv: Move cpuidle related code from setup.c to new file

2015-03-21 Thread Shreyas B. Prabhu
This is a cleanup patch; doesn't change any functionality. Moves all cpuidle related code from setup.c to a new file. Signed-off-by: Shreyas B. Prabhu --- This patch is new in v3 arch/powerpc/platforms/powernv/Makefile | 2 +- arch/powerpc/platforms/powernv/idle.c

[PATCH v3 3/3] powerpc/powernv: Introduce sysfs control for fastsleep workaround behavior

2015-03-21 Thread Shreyas B. Prabhu
the cores and never undone. This can be triggered by echo 1 > /sys/devices/system/cpu/fastsleep_workaround_state For simplicity this attribute can be modified only once. Implying, once fastsleep_workaround_state is changed to 1, it cannot be reverted to the default state. Signed-off-by: Shreya

  1   2   3   >