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 3 bits of PIR represents the thread id of a cpu + *

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

2014-11-27 Thread Paul Mackerras
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 3 bits of PIR represents the thread id of a cpu + * in power8. This will need adjusting for power7. +

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

2014-11-26 Thread Benjamin Herrenschmidt
@@ -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 @@ -123,12 +123,62 @@ power7_enter_nap_mode: li r4,KVM_HWTHREAD_IN_NAP stb

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 @@ -123,12 +123,62 @@

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

2014-11-25 Thread Shreyas B. Prabhu
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 particular idle state or a deeper one. There are tasks like fastsleep hardware bug workaround and hypervisor core state save which have to be done only by the last