linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: shinya.kuribayashi.px@renesas.com (Shinya Kuribayashi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/4] ARM: shmobile: smp-r8a7790: power up a CPU core at .smp_boot_secondary stage
Date: Thu, 11 Jul 2013 18:52:57 +0900	[thread overview]
Message-ID: <51DE8079.6000001@renesas.com> (raw)
In-Reply-To: <51DE7FF4.5050800@renesas.com>

With the CPU hotplug support in mind, we should not let oneline CPU cores
get powered on at .smp_prepare_cpus stage _just_ _once_, but should power
up a requested CPU core one by one, when .smp_boot_secondary is processed.

Otherwise, the power supply to CPU cores can never be on again after
resume or cpu_up request via CPU hotplug.

Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com>
---
 arch/arm/mach-shmobile/smp-r8a7790.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-shmobile/smp-r8a7790.c b/arch/arm/mach-shmobile/smp-r8a7790.c
index 1448e387..6d23c52 100644
--- a/arch/arm/mach-shmobile/smp-r8a7790.c
+++ b/arch/arm/mach-shmobile/smp-r8a7790.c
@@ -120,11 +120,9 @@ static void __init r8a7790_smp_prepare_cpus(unsigned int max_cpus)
 	memcpy_toio(p, shmobile_boot_vector, 16);
 	iounmap(p);
 
-	/* keep secondary CPU cores in reset, but powered on */
-	for (k = 1; k < 8; k++) {
+	/* keep secondary CPU cores in reset */
+	for (k = 1; k < 8; k++)
 		r8a7790_assert_reset(k);
-		r8a7790_power_on(k);
-	}
 }
 
 static int __cpuinit r8a7790_boot_secondary(unsigned int cpu,
@@ -134,6 +132,7 @@ static int __cpuinit r8a7790_boot_secondary(unsigned int cpu,
 	if (r8a7790_clst_id(cpu) != r8a7790_clst_id(0))
 		return -ENOTSUPP;
 
+	r8a7790_power_on(cpu);
 	r8a7790_deassert_reset(cpu);
 	return 0;
 }
-- 
1.8.3.2

      parent reply	other threads:[~2013-07-11  9:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-10 10:41 [PATCH] ARM: shmobile: r8a7790 SMP prototype v4 Magnus Damm
2013-07-11  9:50 ` Shinya Kuribayashi
2013-07-11  9:51   ` [PATCH 1/4] ARM: shmobile: smp-r8a7790: remove the obsolete RESCNT register Shinya Kuribayashi
2013-07-11  9:52   ` [PATCH 2/4] ARM: shmobile: smp-r8a7790: rename s/carescnt/rescnt/g Shinya Kuribayashi
2013-07-11  9:52   ` [PATCH 3/4] ARM: shmobile: smp-r8a7790: rename s/cabar/bar/g as well Shinya Kuribayashi
2013-07-11  9:52   ` Shinya Kuribayashi [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=51DE8079.6000001@renesas.com \
    --to=shinya.kuribayashi.px@renesas.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).