linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: "Shreyas B. Prabhu" <shreyas@linux.vnet.ibm.com>
Cc: Paul Mackerras <paulus@samba.org>,
	linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/5] powerpc/powernv: Add OPAL call to save and restore
Date: Tue, 07 Oct 2014 16:22:18 +1100	[thread overview]
Message-ID: <1412659338.30859.145.camel@pasglop> (raw)
In-Reply-To: <1412149617-3178-2-git-send-email-shreyas@linux.vnet.ibm.com>

On Wed, 2014-10-01 at 13:16 +0530, Shreyas B. Prabhu wrote:
> PORE can be programmed to restore hypervisor registers when waking up
> from deep cpu idle states like winkle.

Tell us a bit more about what "PORE" is. IE, explain a tiny engine will
reconfigure the core and its ucode can be patched to provide some
registers with sane values.

> Add call to pass SPR address and value to OPAL, which in turn will
> program PORE to restore the register state.

Otherwise, Acke-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Michael Ellerman <mpe@ellerman.id.au>
> Suggested-by: Vaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
> Signed-off-by: Shreyas B. Prabhu <shreyas@linux.vnet.ibm.com>
> ---
>  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/powerpc/include/asm/opal.h
> index 166d572..d376020 100644
> --- a/arch/powerpc/include/asm/opal.h
> +++ b/arch/powerpc/include/asm/opal.h
> @@ -150,6 +150,7 @@ struct opal_sg_list {
>  #define OPAL_PCI_EEH_FREEZE_SET			97
>  #define OPAL_HANDLE_HMI				98
>  #define OPAL_CONFIG_IDLE_STATE			99
> +#define OPAL_SLW_SET_REG			100
>  #define OPAL_REGISTER_DUMP_REGION		101
>  #define OPAL_UNREGISTER_DUMP_REGION		102
>  
> @@ -978,6 +979,7 @@ extern int opal_handle_hmi_exception(struct pt_regs *regs);
>  extern void opal_shutdown(void);
>  extern int opal_resync_timebase(void);
>  int64_t opal_config_idle_state(uint64_t state, uint64_t enter);
> +int64_t opal_slw_set_reg(uint64_t cpu_pir, uint64_t sprn, uint64_t val);
>  
>  extern void opal_lpc_init(void);
>  
> diff --git a/arch/powerpc/platforms/powernv/opal-wrappers.S b/arch/powerpc/platforms/powernv/opal-wrappers.S
> index 8d1e724..12e5d46 100644
> --- a/arch/powerpc/platforms/powernv/opal-wrappers.S
> +++ b/arch/powerpc/platforms/powernv/opal-wrappers.S
> @@ -246,5 +246,6 @@ OPAL_CALL(opal_get_param,			OPAL_GET_PARAM);
>  OPAL_CALL(opal_set_param,			OPAL_SET_PARAM);
>  OPAL_CALL(opal_handle_hmi,			OPAL_HANDLE_HMI);
>  OPAL_CALL(opal_config_idle_state,		OPAL_CONFIG_IDLE_STATE);
> +OPAL_CALL(opal_slw_set_reg,			OPAL_SLW_SET_REG);
>  OPAL_CALL(opal_register_dump_region,		OPAL_REGISTER_DUMP_REGION);
>  OPAL_CALL(opal_unregister_dump_region,		OPAL_UNREGISTER_DUMP_REGION);

  reply	other threads:[~2014-10-07  5:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-01  7:46 [PATCH v2 0/5] Winkle support for offline cpus Shreyas B. Prabhu
2014-10-01  7:46 ` [PATCH v2 1/5] powerpc/powernv: Add OPAL call to save and restore Shreyas B. Prabhu
2014-10-07  5:22   ` Benjamin Herrenschmidt [this message]
2014-10-01  7:46 ` [PATCH v2 2/5] powerpc: Adding macro for accessing Thread Switch Control Register Shreyas B. Prabhu
2014-10-07  5:22   ` Benjamin Herrenschmidt
2014-10-01  7:46 ` [PATCH v2 3/5] powerpc/powernv: Add winkle infrastructure Shreyas B. Prabhu
2014-10-07  5:33   ` Benjamin Herrenschmidt
2014-10-07  9:56     ` Shreyas B Prabhu
2014-10-01  7:46 ` [PATCH v2 4/5] powerpc/powernv: Discover and enable winkle Shreyas B. Prabhu
2014-10-01  7:46 ` [PATCH v2 5/5] powerpc/powernv: Enter deepest supported idle state in offline Shreyas B. Prabhu

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=1412659338.30859.145.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=paulus@samba.org \
    --cc=shreyas@linux.vnet.ibm.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).