Thread (16 messages) 16 messages, 4 authors, 2014-08-20
STALE4334d
Revisions (13)
  1. v4 [diff vs current]
  2. v5 [diff vs current]
  3. v6 [diff vs current]
  4. v9 [diff vs current]
  5. v10 [diff vs current]
  6. v16 [diff vs current]
  7. v16 [diff vs current]
  8. v16 [diff vs current]
  9. v16 [diff vs current]
  10. v17 [diff vs current]
  11. v17 [diff vs current]
  12. v17 [diff vs current]
  13. v17 current

[PATCH v17 2/9] ARM: hisi: enable MCPM implementation

From: Nicolas Pitre <hidden>
Date: 2014-08-08 15:59:57

On Fri, 8 Aug 2014, Haojian Zhuang wrote:
On 7 August 2014 23:29, Nicolas Pitre [off-list ref] wrote:
quoted
On Thu, 7 Aug 2014, Haojian Zhuang wrote:
quoted
+     spin_unlock(&boot_lock);
+
+     if (hip04_cluster_is_down(cluster))
+             v7_exit_coherency_flush(all);
+     else
+             v7_exit_coherency_flush(louis);
This is not sufficient.  To be safe, the MCPM cluster state must be
controlled as well.  And once the cache is flushed, the snoops must be
disabled as well.  And this should be controlled with the boot_lock
still held.  In other words here's what it should look like:

        if (hip04_cluster_is_down(cluster) &&
            __mcpm_outbound_enter_critical(cpu, cluster)) {
                spin_unlock(&boot_lock);
                v7_exit_coherency_flush(all);
                hip04_set_snoop_filter(cluster, 0);
        } else {
                spin_unlock(&boot_lock);
                v7_exit_coherency_flush(louis);
        }
I can make cpu online/offline successfully in these two cases.
1. Add msleep() in the end of power_up and move disabling snoop filter at here.
2. Disable snoop filter in wait_for_power_down after target core in WFI status.

Since case #1 isn't good, I choose the #2.

I also got some hisilicon documents. They said that setting target
core to WFI status is required before disabling snoop filter.
OK good.  In that case please add a comment explaining what the 
documentation says.  Still the lock has to be handled as shown above.


Nicolas
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help