Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: 7918/1: clean up cache handling in core code

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>

authored by

Nicolas Pitre and committed by
Russell King
efcfc46e 1b0f6681

+2 -4
+1 -2
arch/arm/common/mcpm_entry.c
··· 35 35 unsigned long *poke = &mcpm_entry_early_pokes[cluster][cpu][0]; 36 36 poke[0] = poke_phys_addr; 37 37 poke[1] = poke_val; 38 - __cpuc_flush_dcache_area((void *)poke, 8); 39 - outer_clean_range(__pa(poke), __pa(poke + 2)); 38 + __sync_cache_range_w(poke, 2 * sizeof(*poke)); 40 39 } 41 40 42 41 static const struct mcpm_platform_ops *platform_ops;
+1 -2
arch/arm/kernel/smp.c
··· 105 105 secondary_data.pgdir = get_arch_pgd(idmap_pgd); 106 106 secondary_data.swapper_pg_dir = get_arch_pgd(swapper_pg_dir); 107 107 #endif 108 - __cpuc_flush_dcache_area(&secondary_data, sizeof(secondary_data)); 109 - outer_clean_range(__pa(&secondary_data), __pa(&secondary_data + 1)); 108 + sync_cache_w(&secondary_data); 110 109 111 110 /* 112 111 * Now bring the CPU into our world.