linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/4] ARM: Alpine: smp support
Date: Mon, 26 Jan 2015 11:44:58 +0000	[thread overview]
Message-ID: <20150126114458.GC23313@leverpostej> (raw)
In-Reply-To: <54c53660.F+mWFCmG+/oPpFS5%tsahee@annapurnalabs.com>

On Sun, Jan 25, 2015 at 06:30:56PM +0000, Tsahee Zidenberg wrote:
> This patch introduces support for waking up secondary CPU cores on
> Alpine platform.
> 
> Signed-off-by: Barak Wasserstrom <barak@annapurnalabs.com>
> Signed-off-by: Tsahee Zidenberg <tsahee@annapurnalabs.com>
> ---
>  arch/arm/mach-alpine/Kconfig             |  1 +
>  arch/arm/mach-alpine/Makefile            |  1 +
>  arch/arm/mach-alpine/alpine_cpu_pm.c     | 68 ++++++++++++++++++++++++++++++++
>  arch/arm/mach-alpine/alpine_cpu_pm.h     | 26 ++++++++++++
>  arch/arm/mach-alpine/alpine_cpu_resume.h | 38 ++++++++++++++++++
>  arch/arm/mach-alpine/platsmp.c           | 48 ++++++++++++++++++++++
>  6 files changed, 182 insertions(+)
>  create mode 100644 arch/arm/mach-alpine/alpine_cpu_pm.c
>  create mode 100644 arch/arm/mach-alpine/alpine_cpu_pm.h
>  create mode 100644 arch/arm/mach-alpine/alpine_cpu_resume.h
>  create mode 100644 arch/arm/mach-alpine/platsmp.c

[...]

> +/* NB registers */
> +#define AL_SYSFAB_POWER_CONTROL_OFFSET(cpu)	(0x2000 + (cpu)*0x100 + 0x20)
> +
> +static void __iomem *al_sysfabric_service_base;
> +static struct al_cpu_resume_regs __iomem *al_cpu_resume_regs;
> +static int wakeup_supported;
> +
> +int alpine_cpu_wakeup(unsigned int cpu, uint32_t phys_resume_addr)
> +{
> +	if (!wakeup_supported)
> +		return -ENOSYS;
> +
> +	/* Set CPU resume address */
> +	writel(phys_resume_addr, &al_cpu_resume_regs->per_cpu[cpu].resume_addr);
> +
> +	/* Power-up the CPU */
> +	writel(0, (al_sysfabric_service_base + AL_SYSFAB_POWER_CONTROL_OFFSET(cpu)));

Surely you want to map from the logical ID to the physical ID first?
That caller didn't.

Mark.

      parent reply	other threads:[~2015-01-26 11:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-25 18:30 [PATCH 3/4] ARM: Alpine: smp support Tsahee Zidenberg
2015-01-26 11:08 ` Arnd Bergmann
2015-01-26 11:44 ` Mark Rutland [this message]

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=20150126114458.GC23313@leverpostej \
    --to=mark.rutland@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).