Thread (2 messages) flat view 2 messages, 2 authors, 2014-05-17

Re: [PATCHv4 2/3] ARM: mm: add support for HW coherent systems in PL310

From: Thomas Petazzoni <hidden>
Date: 2014-05-17 08:25:07

Dear Rob Herring,

On Thu, 15 May 2014 14:08:39 -0500, Rob Herring wrote:
quoted
        of_init = true;
        memcpy(&outer_cache, &data->outer_cache, sizeof(outer_cache));
+
+       /*
+        * outer sync operations are not needed when the system is I/O
+        * coherent, and potentially harmful in certain situations
+        * (PCIe/PL310 deadlock on Armada 375/38x due to hardware I/O
+        * coherency). The other operations are kept because they are
+        * infrequent (therefore do not cause the deadlock) and needed
+        * for secondary CPU boot and other power management
+        * activities.
+        */
+       if (of_device_is_compatible(np, "arm,pl310-cache") &&
Don't we have a pl310 specific init function this can be placed in
removing this check? We could probably remove this check here anyway
because we're never going to see this on an L210 or L220.
We have a pl310 specific init function called pl310_of_init(). However
it gets called *before* the global outer_cache structure gets memcpy()
from the specific L2 cache type chosen by the compatible string.
Therefore, it cannot null-ify the .sync operation. It is also unable to
do it directly in the pl310_data structure, because 1/ this structure
is const and 2/ I believe it would be ugly.

Therefore, we don't have much other choice than to do that where I'm
doing at the moment. I'll respin the patch series to remove the
"arm,pl310-cache" check, as you suggested.

Thanks for the review,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help