linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v8 1/2] arm: introduce psci_smp_ops
Date: Thu, 25 Apr 2013 09:47:11 +0100	[thread overview]
Message-ID: <20130425084711.GA12848@mudshark.cambridge.arm.com> (raw)
In-Reply-To: <1366828819-10745-1-git-send-email-stefano.stabellini@eu.citrix.com>

Hi Stefano,

On Wed, Apr 24, 2013 at 07:40:18PM +0100, Stefano Stabellini wrote:
> Rename virt_smp_ops to psci_smp_ops and move them to arch/arm/kernel/psci_smp.c.
> Remove mach-virt/platsmp.c, now unused.
> Compile psci_smp if CONFIG_ARM_PSCI and CONFIG_SMP.
> 
> Add a cpu_die smp_op based on psci_ops.cpu_off.
> 
> Initialize PSCI before setting smp_ops in setup_arch.
> Use psci_smp_ops if the platform doesn't provide its own smp_ops.
> 
> If PSCI is available on the platform, prefer psci_smp_ops over the
> platform smp_ops.
> 
> Changes in v8:
> - merge "prefer psci_smp_ops over mdesc->smp" into this patch.
> 
> Changes in v6:
> - fixed return values for psci_smp_available and psci_init ifndef
> CONFIG_ARM_PSCI.
> 
> Changes in v5:
> - document psci_operations;
> - psci_init returns NULL.
> 
> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> ---
>  arch/arm/include/asm/psci.h  |   29 ++++++++++++++++++
>  arch/arm/kernel/Makefile     |    5 ++-
>  arch/arm/kernel/psci.c       |    7 ++--
>  arch/arm/kernel/psci_smp.c   |   67 ++++++++++++++++++++++++++++++++++++++++++
>  arch/arm/kernel/setup.c      |    7 ++++-
>  arch/arm/mach-virt/Makefile  |    1 -
>  arch/arm/mach-virt/platsmp.c |   58 ------------------------------------
>  arch/arm/mach-virt/virt.c    |    3 --
>  8 files changed, 109 insertions(+), 68 deletions(-)
>  create mode 100644 arch/arm/kernel/psci_smp.c
>  delete mode 100644 arch/arm/mach-virt/platsmp.c
> 
> diff --git a/arch/arm/include/asm/psci.h b/arch/arm/include/asm/psci.h
> index ce0dbe7..fa44417 100644
> --- a/arch/arm/include/asm/psci.h
> +++ b/arch/arm/include/asm/psci.h
> @@ -23,6 +23,26 @@ struct psci_power_state {
>  	u8	affinity_level;
>  };
>  
> +/*
> + * cpu_suspend   Suspend the execution on a CPU
> + * @state        we don't currently describe affinity levels, so just pass 0.
> + * @entry_point  the first instruction to be executed on return
> + * returns 0  success, < 0 on failure
> + *
> + * cpu_off       Power down a CPU
> + * @state        we don't currently describe affinity levels, so just pass 0.
> + * no return on successful call
> + *
> + * cpu_on        Power up a CPU
> + * @cpuid        cpuid of target CPU, as from MPIDR
> + * @entry_point  the first instruction to be executed on return
> + * returns 0  success, < 0 on failure
> + *
> + * migrate       Migrate the context to a different CPU
> + * @cpuid        cpuid of target CPU, as from MPIDR
> + * returns 0  success, < 0 on failure
> + *
> + */

Can you move these comments into psci-smp.c please? They're really specific
to the implementation there, and if we put them in a header we're lying to
ourselves about the parameters actually described by the PSCI specification.

With that change:

  Acked-by: Will Deacon <will.deacon@arm.com>

Will

  reply	other threads:[~2013-04-25  8:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-24 18:38 [PATCH 0/2 v8] arm: introduce psci_smp_ops Stefano Stabellini
2013-04-24 18:40 ` [PATCH v8 1/2] " Stefano Stabellini
2013-04-25  8:47   ` Will Deacon [this message]
2013-04-25 10:12     ` Stefano Stabellini
2013-04-25 10:45       ` Will Deacon
2013-04-25 11:08         ` Stefano Stabellini
2013-04-25 11:11           ` Will Deacon
2013-04-25 11:13             ` Stefano Stabellini
2013-04-25 14:58         ` Nicolas Pitre
2013-04-26 15:36           ` Stefano Stabellini
2013-04-26 16:10             ` Will Deacon
2013-04-24 18:40 ` [PATCH v8 2/2] ARM: Enable selection of SMP operations at boot time Stefano Stabellini
2013-04-25  8:49   ` Will Deacon
2013-04-25 10:25     ` Stefano Stabellini
2013-04-25 14:42     ` Nicolas Pitre
2013-04-26 15:36       ` Stefano Stabellini

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=20130425084711.GA12848@mudshark.cambridge.arm.com \
    --to=will.deacon@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).