ARM: 7918/1: clean up cache handling in core code
authorNicolas Pitre <nicolas.pitre@linaro.org>
Mon, 9 Dec 2013 15:10:18 +0000 (16:10 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 29 Dec 2013 12:32:38 +0000 (12:32 +0000)
We have a handy macro to replace open coded __cpuc_flush_dcache_area(()
and outer_clean_range() sequences. Let's use it. No functional change.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/common/mcpm_entry.c
arch/arm/kernel/smp.c

index 26020a03f659f2d78fe37f2dca7f3e0a0eb573ca..87c5f1b595bb83fee159b247be762d19c27a3055 100644 (file)
@@ -35,8 +35,7 @@ void mcpm_set_early_poke(unsigned cpu, unsigned cluster,
        unsigned long *poke = &mcpm_entry_early_pokes[cluster][cpu][0];
        poke[0] = poke_phys_addr;
        poke[1] = poke_val;
-       __cpuc_flush_dcache_area((void *)poke, 8);
-       outer_clean_range(__pa(poke), __pa(poke + 2));
+       __sync_cache_range_w(poke, 2 * sizeof(*poke));
 }
 
 static const struct mcpm_platform_ops *platform_ops;
index dc894ab3622b1effac1b885bd919bf629f66dc5d..8c61325b8bfce744fc8b7702317ecb1d365cb915 100644 (file)
@@ -105,8 +105,7 @@ int __cpu_up(unsigned int cpu, struct task_struct *idle)
        secondary_data.pgdir = get_arch_pgd(idmap_pgd);
        secondary_data.swapper_pg_dir = get_arch_pgd(swapper_pg_dir);
 #endif
-       __cpuc_flush_dcache_area(&secondary_data, sizeof(secondary_data));
-       outer_clean_range(__pa(&secondary_data), __pa(&secondary_data + 1));
+       sync_cache_w(&secondary_data);
 
        /*
         * Now bring the CPU into our world.