Skip to content

Commit efcfc46

Browse files
Nicolas PitreRussell King
authored andcommitted
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>
1 parent 1b0f668 commit efcfc46

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

‎arch/arm/common/mcpm_entry.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ void mcpm_set_early_poke(unsigned cpu, unsigned cluster,
3535
unsigned long *poke = &mcpm_entry_early_pokes[cluster][cpu][0];
3636
poke[0] = poke_phys_addr;
3737
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));
4039
}
4140

4241
static const struct mcpm_platform_ops *platform_ops;

‎arch/arm/kernel/smp.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,7 @@ int __cpu_up(unsigned int cpu, struct task_struct *idle)
105105
secondary_data.pgdir = get_arch_pgd(idmap_pgd);
106106
secondary_data.swapper_pg_dir = get_arch_pgd(swapper_pg_dir);
107107
#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);
110109

111110
/*
112111
* Now bring the CPU into our world.

0 commit comments

Comments
 (0)