From: Peter De Schrijver <pdeschrijver@nvidia.com>
To: Stephen Warren <swarren@nvidia.com>
Cc: Colin Cross <ccross@android.com>, Olof Johansson <olof@lixom.net>,
Russell King <linux@arm.linux.org.uk>,
Gary King <gking@nvidia.com>, Arnd Bergmann <arnd@arndb.de>,
"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 00/10] Add tegra30 support for secondary cores
Date: Wed, 29 Feb 2012 17:42:29 +0200 [thread overview]
Message-ID: <20120229154229.GL12917@tbergstrom-lnx.Nvidia.com> (raw)
In-Reply-To: <74CDBE0F657A3D45AFBB94109FB122FF178FACB954@HQMAIL01.nvidia.com>
[-- Attachment #1: Type: text/plain, Size: 1354 bytes --]
On Wed, Feb 15, 2012 at 10:27:43PM +0100, Stephen Warren wrote:
> Peter De Schrijver wrote at Thursday, February 09, 2012 4:48 PM:
> > This patchset introduces support for secondary cores on tegra30. It also
> > introduces some functions for the flowcontroller and adds basic support for
> > tegra30 powerdomains.
>
> The code looks fine to me. I do notice the following when running
> "shutdown -h now":
>
> [ 27.762124] SMP: failed to stop secondary CPUs
>
> So, this patch series makes the secondary cores boot OK, but not shut
> down it appears. Is that expected? It's probably something we can fix
> with a following on patch rather than re-spinning this series though?
>
I spent some more time looking at this. It appears that nr_online_cpus isn't
always updated properly. I added an extra pr_warn() when the failure happens
and I got:
[ 22.369815] Restarting system.
[ 23.506792] SMP: failed to stop secondary CPUs
[ 23.511535] running on CPU: 3, still online: 2, mask: 8
I also did some function tracing and all CPUs besides the one initiating the
halt reach platform_cpu_kill() about 50us after sending the IPIs to stop them.
The set_cpu_online() call in ipi_cpu_stop() should update nr_online_cpus, but
somehow this doesn't always happen. Any insight on what might be going on?
Instrumentation patch attached.
Cheers,
Peter.
[-- Attachment #2: 0001-ARM-debugging-smp_send_stop.patch --]
[-- Type: text/x-diff, Size: 1189 bytes --]
>From d871feda574bd9f626f175be403cabd308ca18c0 Mon Sep 17 00:00:00 2001
From: Peter De Schrijver <pdeschrijver@nvidia.com>
Date: Wed, 29 Feb 2012 17:37:27 +0200
Subject: [PATCH] ARM: debugging smp_send_stop
X-NVConfidentiality: public
Change-Id: Ia4f33b054f2eccf173a3d977686e1577e2146b92
---
arch/arm/kernel/smp.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index 3e43c5f..e0e5eea 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -570,6 +570,7 @@ void smp_send_reschedule(int cpu)
void smp_send_stop(void)
{
unsigned long timeout;
+ int cpu = smp_processor_id();
if (num_online_cpus() > 1) {
cpumask_t mask = cpu_online_map;
@@ -583,8 +584,12 @@ void smp_send_stop(void)
while (num_online_cpus() > 1 && timeout--)
udelay(1);
- if (num_online_cpus() > 1)
+ if (num_online_cpus() > 1) {
+ char cpu_mask[10];
pr_warning("SMP: failed to stop secondary CPUs\n");
+ cpumask_scnprintf(cpu_mask, sizeof(cpu_mask), cpu_online_mask);
+ pr_warn("running on CPU: %d, still online: %d, mask: %s\n", cpu, num_online_cpus(), cpu_mask);
+ }
}
/*
--
1.7.7.rc0.72.g4b5ea.dirty
next prev parent reply other threads:[~2012-02-29 15:43 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-09 23:47 [PATCH v3 00/10] Add tegra30 support for secondary cores Peter De Schrijver
2012-02-09 23:47 ` [PATCH v3 01/10] ARM: tegra: cleanup use of chipid register Peter De Schrijver
2012-02-09 23:47 ` [PATCH v3 02/10] ARM: tegra: export Tegra chipid Peter De Schrijver
2012-02-20 23:13 ` Colin Cross
2012-02-20 23:30 ` Olof Johansson
2012-02-22 19:19 ` Colin Cross
2012-02-09 23:47 ` [PATCH v3 03/10] ARM: tegra: initialize Tegra chipid early Peter De Schrijver
2012-02-09 23:47 ` [PATCH v3 04/10] ARM: tegra: functions to access the flowcontroller Peter De Schrijver
2012-02-09 23:47 ` [PATCH v3 05/10] ARM: tegra: rework Tegra secondary CPU core bringup Peter De Schrijver
2012-02-20 23:04 ` Colin Cross
2012-02-26 21:57 ` Olof Johansson
2012-02-09 23:47 ` [PATCH v3 06/10] ARM: tegra: prepare powergate.c for multiple variants Peter De Schrijver
2012-02-09 23:47 ` [PATCH v3 07/10] ARM: tegra: export tegra_powergate_is_powered() Peter De Schrijver
2012-02-09 23:47 ` [PATCH v3 08/10] ARM: tegra: add support for Tegra30 powerdomains Peter De Schrijver
2012-02-09 23:47 ` [PATCH v3 09/10] ARM: tegra: support for Tegra30 CPU powerdomains Peter De Schrijver
2012-02-09 23:47 ` [PATCH v3 10/10] ARM: tegra: support for secondary cores on Tegra30 Peter De Schrijver
2012-02-15 21:27 ` [PATCH v3 00/10] Add tegra30 support for secondary cores Stephen Warren
2012-02-15 22:25 ` Peter De Schrijver
2012-02-29 15:42 ` Peter De Schrijver [this message]
2012-02-29 22:38 ` Stephen Warren
2012-03-01 11:42 ` Peter De Schrijver
2012-03-01 14:35 ` Peter De Schrijver
2012-02-26 21:59 ` Olof Johansson
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=20120229154229.GL12917@tbergstrom-lnx.Nvidia.com \
--to=pdeschrijver@nvidia.com \
--cc=arnd@arndb.de \
--cc=ccross@android.com \
--cc=gking@nvidia.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=olof@lixom.net \
--cc=swarren@nvidia.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