imx6q restart is broken
Russell King - ARM Linux
linux at arm.linux.org.uk
Thu Aug 9 05:20:21 EDT 2012
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.
More information about the linux-arm-kernel
mailing list