|
@@ -25,8 +25,10 @@
|
|
|
#include <linux/dma-mapping.h>
|
|
|
#include <linux/platform_device.h>
|
|
|
#include <asm/smp_plat.h>
|
|
|
+#include <asm/cacheflush.h>
|
|
|
#include "armada-370-xp.h"
|
|
|
|
|
|
+unsigned long __cpuinitdata coherency_phys_base;
|
|
|
static void __iomem *coherency_base;
|
|
|
static void __iomem *coherency_cpu_base;
|
|
|
|
|
@@ -124,7 +126,17 @@ int __init coherency_init(void)
|
|
|
|
|
|
np = of_find_matching_node(NULL, of_coherency_table);
|
|
|
if (np) {
|
|
|
+ struct resource res;
|
|
|
pr_info("Initializing Coherency fabric\n");
|
|
|
+ of_address_to_resource(np, 0, &res);
|
|
|
+ coherency_phys_base = res.start;
|
|
|
+ /*
|
|
|
+ * Ensure secondary CPUs will see the updated value,
|
|
|
+ * which they read before they join the coherency
|
|
|
+ * fabric, and therefore before they are coherent with
|
|
|
+ * the boot CPU cache.
|
|
|
+ */
|
|
|
+ sync_cache_w(&coherency_phys_base);
|
|
|
coherency_base = of_iomap(np, 0);
|
|
|
coherency_cpu_base = of_iomap(np, 1);
|
|
|
set_cpu_coherent(cpu_logical_map(smp_processor_id()), 0);
|