public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: santosh.shilimkar@ti•com (Santosh Shilimkar)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH v3 01/15] ARM: multi-cluster PM: secondary kernel entry code
Date: Thu, 31 Jan 2013 21:15:50 +0530	[thread overview]
Message-ID: <510A91AE.6050807@ti.com> (raw)
In-Reply-To: <1359445870-18925-2-git-send-email-nicolas.pitre@linaro.org>

On Tuesday 29 January 2013 01:20 PM, Nicolas Pitre wrote:
> CPUs in cluster based systems, such as big.LITTLE, have special needs
> when entering the kernel due to a hotplug event, or when resuming from
> a deep sleep mode.
>
> This is vectorized so multiple CPUs can enter the kernel in parallel
> without serialization.
>
> The mcpm prefix stands for "multi cluster power management", however
> this is usable on single cluster systems as well.  Only the basic
> structure is introduced here.  This will be extended with later patches.
>
> In order not to complexify things more than they currently have to,
> the planned work to make runtime adjusted MPIDR based indexing and
> dynamic memory allocation for cluster states is postponed to a later
> cycle. The MAX_NR_CLUSTERS and MAX_CPUS_PER_CLUSTER static definitions
> should be sufficient for those systems expected to be available in the
> near future.
>
'mcpm' sounds definitely better than 'bL' ;)

> Signed-off-by: Nicolas Pitre <nico@linaro•org>
> ---
>   arch/arm/Kconfig                  |  8 ++++
>   arch/arm/common/Makefile          |  1 +
>   arch/arm/common/mcpm_entry.c      | 29 +++++++++++++
>   arch/arm/common/mcpm_head.S       | 86 +++++++++++++++++++++++++++++++++++++++
>   arch/arm/include/asm/mcpm_entry.h | 35 ++++++++++++++++
>   5 files changed, 159 insertions(+)
>   create mode 100644 arch/arm/common/mcpm_entry.c
>   create mode 100644 arch/arm/common/mcpm_head.S
>   create mode 100644 arch/arm/include/asm/mcpm_entry.h
>
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 67874b82a4..200f559c1c 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -1584,6 +1584,14 @@ config HAVE_ARM_TWD
>   	help
>   	  This options enables support for the ARM timer and watchdog unit
>
> +config CLUSTER_PM
> +	bool "Cluster Power Management Infrastructure"
> +	depends on CPU_V7 && SMP
> +	help
> +	  This option provides the common power management infrastructure
> +	  for (multi-)cluster based systems, such as big.LITTLE based
> +	  systems.
> +
>   choice
>   	prompt "Memory split"
>   	default VMSPLIT_3G
> diff --git a/arch/arm/common/Makefile b/arch/arm/common/Makefile
> index e8a4e58f1b..23e85b1fae 100644
> --- a/arch/arm/common/Makefile
> +++ b/arch/arm/common/Makefile
> @@ -13,3 +13,4 @@ obj-$(CONFIG_SHARP_PARAM)	+= sharpsl_param.o
>   obj-$(CONFIG_SHARP_SCOOP)	+= scoop.o
>   obj-$(CONFIG_PCI_HOST_ITE8152)  += it8152.o
>   obj-$(CONFIG_ARM_TIMER_SP804)	+= timer-sp.o
> +obj-$(CONFIG_CLUSTER_PM)	+= mcpm_head.o mcpm_entry.o
> diff --git a/arch/arm/common/mcpm_entry.c b/arch/arm/common/mcpm_entry.c
> new file mode 100644
> index 0000000000..3a6d7e70fd
> --- /dev/null
> +++ b/arch/arm/common/mcpm_entry.c
> @@ -0,0 +1,29 @@
> +/*
> + * arch/arm/common/mcpm_entry.c -- entry point for multi-cluster PM
> + *
> + * Created by:  Nicolas Pitre, March 2012
> + * Copyright:   (C) 2012-2013  Linaro Limited
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + */
> +
> +#include <linux/kernel.h>
> +#include <linux/init.h>
> +
> +#include <asm/mcpm_entry.h>
> +#include <asm/barrier.h>
> +#include <asm/proc-fns.h>
> +#include <asm/cacheflush.h>
> +
> +extern volatile unsigned long mcpm_entry_vectors[MAX_NR_CLUSTERS][MAX_CPUS_PER_CLUSTER];
> +
> +void mcpm_set_entry_vector(unsigned cpu, unsigned cluster, void *ptr)
> +{
> +	unsigned long val = ptr ? virt_to_phys(ptr) : 0;
May be extra line would be good here.
Patch looks fine to my eyes otherwise.

Reviewed-by: Santosh Shilimkar <santosh.shilimkar@ti•com>

  reply	other threads:[~2013-01-31 15:45 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-29  7:50 [PATCH v3 00/15] multi-cluster power management Nicolas Pitre
2013-01-29  7:50 ` [PATCH v3 01/15] ARM: multi-cluster PM: secondary kernel entry code Nicolas Pitre
2013-01-31 15:45   ` Santosh Shilimkar [this message]
2013-01-29  7:50 ` [PATCH v3 02/15] ARM: mcpm: introduce the CPU/cluster power API Nicolas Pitre
2013-01-31 15:55   ` Santosh Shilimkar
2013-01-29  7:50 ` [PATCH v3 03/15] ARM: mcpm: introduce helpers for platform coherency exit/setup Nicolas Pitre
2013-01-31 16:08   ` Santosh Shilimkar
2013-01-31 17:16     ` Nicolas Pitre
2013-02-01  5:10       ` Santosh Shilimkar
2013-02-01 17:26         ` Nicolas Pitre
2013-01-29  7:50 ` [PATCH v3 04/15] ARM: mcpm: Add baremetal voting mutexes Nicolas Pitre
2013-02-01  5:29   ` Santosh Shilimkar
2013-01-29  7:51 ` [PATCH v3 05/15] ARM: mcpm_head.S: vlock-based first man election Nicolas Pitre
2013-02-01  5:34   ` Santosh Shilimkar
2013-01-29  7:51 ` [PATCH v3 06/15] ARM: mcpm: generic SMP secondary bringup and hotplug support Nicolas Pitre
2013-01-29 20:38   ` Rob Herring
2013-02-01  5:38   ` Santosh Shilimkar
2013-01-29  7:51 ` [PATCH v3 07/15] ARM: vexpress: Select the correct SMP operations at run-time Nicolas Pitre
2013-01-29 15:43   ` Jon Medhurst (Tixy)
2013-01-29 19:26     ` Nicolas Pitre
2013-02-01  5:41   ` Santosh Shilimkar
2013-02-01 17:28     ` Nicolas Pitre
2013-01-29  7:51 ` [PATCH v3 08/15] ARM: introduce common set_auxcr/get_auxcr functions Nicolas Pitre
2013-02-01  5:44   ` Santosh Shilimkar
2013-01-29  7:51 ` [PATCH v3 09/15] ARM: vexpress: introduce DCSCB support Nicolas Pitre
2013-02-01  5:50   ` Santosh Shilimkar
2013-01-29  7:51 ` [PATCH v3 10/15] ARM: vexpress/dcscb: add CPU use counts to the power up/down API implementation Nicolas Pitre
2013-02-01  5:53   ` Santosh Shilimkar
2013-01-29  7:51 ` [PATCH v3 11/15] ARM: vexpress/dcscb: do not hardcode number of CPUs per cluster Nicolas Pitre
2013-02-01  5:57   ` Santosh Shilimkar
2013-02-01 17:24     ` Nicolas Pitre
2013-02-02  6:54       ` Santosh Shilimkar
2013-01-29  7:51 ` [PATCH v3 12/15] drivers/bus: add ARM CCI support Nicolas Pitre
2013-02-01  6:01   ` Santosh Shilimkar
2013-01-29  7:51 ` [PATCH v3 13/15] ARM: CCI: ensure powerdown-time data is flushed from cache Nicolas Pitre
2013-02-01  6:13   ` Santosh Shilimkar
2013-02-02 22:23     ` Nicolas Pitre
2013-02-03 10:07       ` Santosh Shilimkar
2013-02-03 18:29         ` Nicolas Pitre
2013-02-04  5:25           ` Santosh Shilimkar
2013-01-29  7:51 ` [PATCH v3 14/15] ARM: vexpress/dcscb: handle platform coherency exit/setup and CCI Nicolas Pitre
2013-01-29 10:46   ` Lorenzo Pieralisi
2013-01-29 18:42     ` Nicolas Pitre
2013-01-30 17:27       ` Lorenzo Pieralisi
2013-02-01  6:15   ` Santosh Shilimkar
2013-01-29  7:51 ` [PATCH v3 15/15] ARM: vexpress/dcscb: probe via device tree Nicolas Pitre
2013-01-29 21:01   ` Rob Herring
2013-01-29 21:41     ` Nicolas Pitre
2013-01-30 12:22       ` Achin Gupta
2013-01-30 17:43         ` Nicolas Pitre
2013-01-31 10:54           ` Dave Martin
2013-02-04  4:39             ` Nicolas Pitre
2013-02-04 14:24 ` [PATCH v3 00/15] multi-cluster power management Will Deacon
2013-02-04 20:59   ` Nicolas Pitre

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=510A91AE.6050807@ti.com \
    --to=santosh.shilimkar@ti$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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