From: robherring2@gmail.com (Rob Herring)
To: linux-arm-kernel@lists.infradead.org
Subject: imx6q restart is broken
Date: Wed, 15 Aug 2012 10:07:47 -0500 [thread overview]
Message-ID: <502BBB43.5010403@gmail.com> (raw)
In-Reply-To: <20120809092021.GQ18957@n2100.arm.linux.org.uk>
On 08/09/2012 04:20 AM, Russell King - ARM Linux wrote:
> On Thu, Aug 09, 2012 at 11:18:47AM +0800, Hui Wang wrote:
>> - at the last stage of reset, all non-boot cpus will call
>> ipi_cpu_stop()->cpu_relax(), the cpu_relax() is defined to smp_mb() for
>> V6, and smp_mb() is defined to dmb ("mcr p15, 0, %0, c7, c10, 5")
>
> I suspect having this dmb inside cpu_relax() is flooding the
> interconnects with traffic, which then prevents other CPUs getting
> a look-in (maybe there's no fairness when it comes to dmb's.
>
> If I'm right, you'll find is that even converting this to the ARMv7
> DMB instruction won't fix the problem. It does, however, point
> towards a more serious problem - it means that any tight loop using
> dmb is detremental. I have heard some people mention that even on
> various ARM SMP platforms, they have see quite an amount of
> interaction between the individual CPU cores, and I'm beginning
> to wonder whether this is why.
>
> I think a useful test would be to only execute the DMB maybe once
> in 50 or 100 loops - the DMB is there to work around a different
> problem with the temporal locality of stores on the local CPU. So,
> the only requirement is that we issue a DMB at some point while
> spinning waiting for another CPU to respond to our previous writes.
I think I am seeing a similar problem on highbank with a v7 only build.
>From what I've debugged, restart hangs for me on the L2x0 spinlock
during a writel. Changing the writel to writel_relaxed in the restart
hook fixes the problem. This skips barriers in the writel and for the
spinlock. However, I'm still puzzled as cpu_relax on the secondary cores
should not be doing a dmb in my case on a v7 only build.
Rob
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
next prev parent reply other threads:[~2012-08-15 15:07 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-08 10:18 imx6q restart is broken Shawn Guo
2012-08-08 10:53 ` Dirk Behme
2012-08-09 3:18 ` Hui Wang
2012-08-09 4:41 ` Shawn Guo
2012-08-09 6:32 ` Sascha Hauer
2012-08-09 8:06 ` Catalin Marinas
2012-08-09 8:18 ` Shawn Guo
2012-08-09 9:20 ` Russell King - ARM Linux
2012-08-09 12:01 ` Shawn Guo
2012-08-09 12:22 ` Shawn Guo
2012-08-09 13:57 ` Russell King - ARM Linux
2012-08-09 14:01 ` Russell King - ARM Linux
2012-08-09 14:24 ` Shawn Guo
2012-08-09 19:03 ` Matt Sealey
2012-08-09 21:07 ` Russell King - ARM Linux
2012-08-10 13:33 ` Matt Sealey
2012-08-10 13:53 ` Russell King - ARM Linux
2012-08-15 15:07 ` Rob Herring [this message]
2012-08-15 21:44 ` Russell King - ARM Linux
2012-08-16 2:31 ` Shawn Guo
2012-08-16 17:21 ` Matt Sealey
2012-08-16 22:34 ` Russell King - ARM Linux
2012-08-17 3:48 ` Shawn Guo
2012-08-17 8:11 ` Hui Wang
2012-08-19 15:26 ` Shawn Guo
2012-08-16 8:41 ` Catalin Marinas
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=502BBB43.5010403@gmail.com \
--to=robherring2@gmail.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).