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

Re: [PATCH] cpupower tools: Fix error when running cpupower monitor

2015-09-02 Thread Shreyas B Prabhu
On 08/25/2015 05:29 PM, Shreyas B Prabhu wrote: > > > On 08/17/2015 01:22 PM, Shreyas B Prabhu wrote: >> >> >> On 08/10/2015 05:58 PM, Thomas Renninger wrote: >>> On Monday, August 03, 2015 11:46:00 AM Shreyas B. Prabhu wrote: >>>> get_cpu_topolo

Re: [PATCH] cpupower tools: Fix error when running cpupower monitor

2015-09-04 Thread Shreyas B Prabhu
>> >> Hi Rafael, >> >> If this patch looks good can you please pick this up? > > I picked it up last week, sorry for being silent about that. > > It should be in the Linus' tree already. > Thanks! Sorry I missed the fact that you had picked it last week. Thanks, Shreyas -- To unsubscribe fro

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 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

[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-...@lists.ozlabs.org --- arch/powerpc/include/asm/opal.h | 8 ++ arch/powerpc

[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: [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 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] 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-...@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 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-...@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

[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-...@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 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

[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

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

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 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 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 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

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

2015-03-30 Thread Shreyas B Prabhu
On Monday 30 March 2015 03:06 PM, Michael Ellerman wrote: > On Sun, 2015-22-03 at 04:42:57 UTC, "Shreyas B. Prabhu" wrote: >> Currently, cpu_online_cores_map returns a mask, which for every core >> that has atleast one online thread, has the first-cpu-of-that-core's

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

2015-03-30 Thread Shreyas B Prabhu
On Monday 30 March 2015 03:51 PM, Michael Ellerman wrote: > On Sun, 2015-22-03 at 04:42:59 UTC, "Shreyas B. Prabhu" wrote: >> Fastsleep is one of the idle state which cpuidle subsystem currently >> uses on power8 machines. In this state L2 cache is brought down

[PATCH 1/3] tracing/mm: Don't trace kmem_cache_free on offline cpus

2015-04-28 Thread Shreyas B. Prabhu
: Shreyas B. Prabhu Reported-by: Aneesh Kumar K.V --- include/trace/events/kmem.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/trace/events/kmem.h b/include/trace/events/kmem.h index 81ea598..dd9e612 100644 --- a/include/trace/events/kmem.h +++ b/include/trace

[PATCH 3/3] tracing/mm: Don't trace mm_page_pcpu_drain on offline cpus

2015-04-28 Thread Shreyas B. Prabhu
03cb6c] .start_secondary+0x36c/0x3a0 [c01fed2e7f90] [c0008b6c] start_secondary_prolog+0x10/0x14 Fix this by converting mm_page_pcpu_drain trace point into TRACE_EVENT_CONDITION where condition is cpu_online(smp_processor_id()) Signed-off-by: Shreyas B. Prabhu --- include/trace/even

[PATCH 2/3] tracing/mm: Don't trace mm_page_free on offline cpus

2015-04-28 Thread Shreyas B. Prabhu
+0x10/0x14 Fix this by converting mm_page_free trace point into TRACE_EVENT_CONDITION where condition is cpu_online(smp_processor_id()) Signed-off-by: Shreyas B. Prabhu --- include/trace/events/kmem.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/trace/events/kmem.h

Re: [PATCH 3/3] tracing/mm: Don't trace mm_page_pcpu_drain on offline cpus

2015-04-29 Thread Shreyas B Prabhu
>> -DEFINE_EVENT_PRINT(mm_page, mm_page_pcpu_drain, >> +TRACE_EVENT_CONDITION(mm_page_pcpu_drain, >> >> TP_PROTO(struct page *page, unsigned int order, int migratetype), >> >> TP_ARGS(page, order, migratetype), >> >> + TP_CONDITION(cpu_online(smp_processor_id())), >> + >> +

Re: [PATCH 3/3] tracing/mm: Don't trace mm_page_pcpu_drain on offline cpus

2015-04-29 Thread Shreyas B Prabhu
On Wednesday 29 April 2015 08:48 PM, Steven Rostedt wrote: > On Wed, 29 Apr 2015 20:19:28 +0530 > Shreyas B Prabhu wrote: > >> IIUC there is no existing macro which can both add a condition and >> override printk format, hence the fall back to TRACE_EVENT_CONDITION. >

Re: [PATCH 3/3] tracing/mm: Don't trace mm_page_pcpu_drain on offline cpus

2015-04-29 Thread Shreyas B Prabhu
On Wednesday 29 April 2015 10:38 PM, Steven Rostedt wrote: >> I am not sure if its worth the effort now. It doesn't look like any >> other trace point apart from the above use case will benefit from it. >> Only smbus_write and smbus_reply seem to come close. But even they need >> separate TP_fast

Re: [PATCH 3/3] tracing/mm: Don't trace mm_page_pcpu_drain on offline cpus

2015-04-29 Thread Shreyas B Prabhu
On Thursday 30 April 2015 10:06 AM, Preeti Murthy wrote: > On Wed, Apr 29, 2015 at 10:49 PM, Shreyas B Prabhu > wrote: >> >> >> On Wednesday 29 April 2015 10:38 PM, Steven Rostedt wrote: >>>> I am not sure if its worth the effort now. It doesn't look l

[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 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 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

[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 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 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

[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

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

2015-06-03 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

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-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-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] 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 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 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-...@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-...@lists.ozlabs.org Suggested-by: "Srivatsa S. Bhat" Signed-off-by: Shreyas B. Prabhu [ Changelog added by ] Signed-off-by: Preet

[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

[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-...@lists.ozlabs.org Signed-off-by: Shreyas B. Prabhu --- arch/powerpc/platforms/powernv/smp.c | 6 -- 1 file changed, 4 insertions(+), 2

[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-...@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 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 7/9] powerpc/powernv: Add winkle infrastructure

2014-08-25 Thread Shreyas B. Prabhu
renschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: linuxppc-...@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 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 2/9] cpuidle/powernv: Populate cpuidle state details by querying the device-tree

2014-08-25 Thread Shreyas B. Prabhu
Cc: Grant Likely Cc: devicet...@vger.kernel.org Signed-off-by: Preeti U. Murthy Signed-off-by: Shreyas B. Prabhu --- drivers/cpuidle/cpuidle-powernv.c | 27 ++- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/drivers/cpuidle/cpuidle-powernv.c b/drivers

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 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] 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-...@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 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-...@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/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 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-...@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 0/5] Winkle support for offline cpus

2014-10-01 Thread Shreyas B. Prabhu
.@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 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-...@lists.ozlabs.org Suggested-by: "Srivatsa S. Bhat" Signed-off-by: Shreyas B. Prabhu [ Changelog added by ] Signed-off-by: Preet

[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-...@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 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-...@lists.ozlabs.org Signed-off-by: Shreyas B. Prabhu --- arch/powerpc/platforms/powernv/smp.c | 6 -- 1 file changed, 4 insertions(+), 2

[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 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

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 >&

[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 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

[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 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-...@lists.ozlabs.org --- arch/powerpc/include/asm/opal.h | 8 ++ ar

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] cpupower tools: Fix error when running cpupower monitor

2015-08-25 Thread Shreyas B Prabhu
On 08/17/2015 01:22 PM, Shreyas B Prabhu wrote: > > > On 08/10/2015 05:58 PM, Thomas Renninger wrote: >> On Monday, August 03, 2015 11:46:00 AM Shreyas B. Prabhu wrote: >>> get_cpu_topology() tries to get topology info from all cpus by reading >>> files in th

Re: [PATCH] cpupower tools: Fix error when running cpupower monitor

2015-08-17 Thread Shreyas B Prabhu
On 08/10/2015 05:58 PM, Thomas Renninger wrote: > On Monday, August 03, 2015 11:46:00 AM Shreyas B. Prabhu wrote: >> get_cpu_topology() tries to get topology info from all cpus by reading >> files in the topology sysfs dir. If a cpu is offlined, since it doesn't >&g

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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.

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

2016-05-02 Thread Shreyas B Prabhu
On 05/03/2016 10:55 AM, Michael Neuling wrote: > >> diff --git a/arch/powerpc/include/asm/cputable.h >> b/arch/powerpc/include/asm/cputable.h >> index df4fb5f..a4739a1 100644 >> --- a/arch/powerpc/include/asm/cputable.h >> +++ b/arch/powerpc/include/asm/cputable.h >> @@ -205,6 +205,7 @@ enum {

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

2016-05-03 Thread Shreyas B. Prabhu
: Daniel Lezcano Cc: linux...@vger.kernel.org Cc: Michael Ellerman Cc: Paul Mackerras Cc: linuxppc-...@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 v2 1/9] powerpc/powernv: Move CHECK_HMI_INTERRUPT to exception-64s header

2016-05-03 Thread Shreyas B. Prabhu
CHECK_HMI_INTERRUPT is used to check for HMI's in reset vector. Move the macro to a common location (exception-64s.h) This patch does not change any functionality. Signed-off-by: Shreyas B. Prabhu --- arch/powerpc/include/asm/exception-64s.h | 18 ++ arch/powerpc/k

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

2016-05-03 Thread Shreyas B. Prabhu
. Wysocki Cc: Daniel Lezcano Cc: linux...@vger.kernel.org Cc: Michael Ellerman Cc: Paul Mackerras Cc: Michael Neuling Cc: linuxppc-...@lists.ozlabs.org Shreyas B. Prabhu (9): powerpc/powernv: Move CHECK_HMI_INTERRUPT to exception-64s header powerpc/kvm: make hypervisor state restore a

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

2016-05-03 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 Signed-off-by: Shreyas B. Prabhy --- arch/powerpc/platforms/powernv/idle.c | 3 +++ arch/powerpc/platforms/power

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

2016-05-03 Thread Shreyas B. Prabhu
for stop instruction and PSSCR handling. Signed-off-by: Shreyas B. Prabhu --- arch/powerpc/include/asm/cpuidle.h| 2 + arch/powerpc/include/asm/kvm_book3s_asm.h | 2 +- arch/powerpc/include/asm/machdep.h| 1 + arch/powerpc/include/asm/opal-api.h | 11 +- arch/powerpc

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

2016-05-03 Thread Shreyas B. Prabhu
If hardware supports stop state, use the deepest stop state when the cpu is offlined. Signed-off-by: Shreyas B. Prabhu --- arch/powerpc/platforms/powernv/idle.c| 15 +-- arch/powerpc/platforms/powernv/powernv.h | 1 + arch/powerpc/platforms/powernv/smp.c | 4 +++- 3 files

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

2016-05-03 Thread Shreyas B. Prabhu
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 --- arch/powerpc/include/asm/cpuidle.h | 27 +++ arch/powerpc/kernel/idle_power7.S | 26 -- 2 files

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

2016-05-03 Thread Shreyas B. Prabhu
kvm) goto kvm_start_guest goto power7_wakeup_loss Signed-off-by: Shreyas B. Prabhu --- arch/powerpc/kernel/exceptions-64s.S | 29 +++- arch/powerpc/kernel/idle_power7.S| 67 2 files changed, 41 insertions(+), 55

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

2016-05-03 Thread Shreyas B. Prabhu
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 function parameter. Also make function name more generic. Signed-off-by: Shreyas B

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

2016-05-03 Thread Shreyas B. Prabhu
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. Signed-off-by: Shreyas B. Prabhu --- arch/powerpc/kernel/Makefile| 1 + arch/powerpc/kernel/idle_power7.S

[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 0/9] powerpc/powernv/cpuidle: Add support for POWER ISA v3 idle states

2016-05-23 Thread Shreyas B. Prabhu
: linux...@vger.kernel.org Cc: Michael Ellerman Cc: Paul Mackerras Cc: Michael Neuling Cc: linuxppc-...@lists.ozlabs.org Shreyas B. Prabhu (9): powerpc/powernv: Move CHECK_HMI_INTERRUPT to exception-64s header powerpc/kvm: make hypervisor state restore a function powerpc/powernv: Rename

[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

  1   2   3   >