From: Shreyas B Prabhu <shreyas@linux.vnet.ibm.com>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] powerpc: Add helpers for LPCR PECE1 operations
Date: Fri, 23 Jan 2015 09:16:25 +0530 [thread overview]
Message-ID: <54C1C411.2080703@linux.vnet.ibm.com> (raw)
In-Reply-To: <1421982392.24984.9.camel@ellerman.id.au>
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
>> or deeper powersaving state and it is set on waking up. Since both
>> cpuidle and cpu offline operations use these powersaving states, add
>> helper functions to be used in both these places.
>
> Thanks.
>
> That isn't really much clearer than the original, so in the end I just merged
> your original fix.
>
> I'll think if there's a bigger consolidation we can do that makes it clearer.
>
> cheers
>
>
Helper could have been this :
#define LPCR_CLEAR_PECE1 (mfspr(SPRN_LPCR) & ~(u64)LPCR_PECE1)
This perhaps would make it more clearer, but it will end up using additional mfspr here-
static int fastsleep_loop(struct cpuidle_device *dev,
struct cpuidle_driver *drv,
int index)
{
...
new_lpcr = old_lpcr;
/* Do not exit powersave upon decrementer as we've setup the timer
* offload.
*/
new_lpcr &= ~LPCR_PECE1;
mtspr(SPRN_LPCR, new_lpcr);
WARNING: multiple messages have this Message-ID (diff)
From: Shreyas B Prabhu <shreyas@linux.vnet.ibm.com>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v2 1/2] powerpc: Add helpers for LPCR PECE1 operations
Date: Fri, 23 Jan 2015 09:16:25 +0530 [thread overview]
Message-ID: <54C1C411.2080703@linux.vnet.ibm.com> (raw)
In-Reply-To: <1421982392.24984.9.camel@ellerman.id.au>
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
>> or deeper powersaving state and it is set on waking up. Since both
>> cpuidle and cpu offline operations use these powersaving states, add
>> helper functions to be used in both these places.
>
> Thanks.
>
> That isn't really much clearer than the original, so in the end I just merged
> your original fix.
>
> I'll think if there's a bigger consolidation we can do that makes it clearer.
>
> cheers
>
>
Helper could have been this :
#define LPCR_CLEAR_PECE1 (mfspr(SPRN_LPCR) & ~(u64)LPCR_PECE1)
This perhaps would make it more clearer, but it will end up using additional mfspr here-
static int fastsleep_loop(struct cpuidle_device *dev,
struct cpuidle_driver *drv,
int index)
{
...
new_lpcr = old_lpcr;
/* Do not exit powersave upon decrementer as we've setup the timer
* offload.
*/
new_lpcr &= ~LPCR_PECE1;
mtspr(SPRN_LPCR, new_lpcr);
next prev parent reply other threads:[~2015-01-23 3:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-19 8:05 [PATCH v2 1/2] powerpc: Add helpers for LPCR PECE1 operations Shreyas B. Prabhu
2015-01-19 8:05 ` Shreyas B. Prabhu
2015-01-19 8:05 ` [PATCH v2 2/2] powerpc: powernv: winkle: Restore LPCR with LPCR_PECE1 cleared Shreyas B. Prabhu
2015-01-19 8:05 ` Shreyas B. Prabhu
2015-01-23 3:06 ` [PATCH v2 1/2] powerpc: Add helpers for LPCR PECE1 operations Michael Ellerman
2015-01-23 3:06 ` Michael Ellerman
2015-01-23 3:46 ` Shreyas B Prabhu [this message]
2015-01-23 3:46 ` Shreyas B Prabhu
2015-01-23 4:20 ` Michael Ellerman
2015-01-23 4:20 ` Michael Ellerman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54C1C411.2080703@linux.vnet.ibm.com \
--to=shreyas@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.