From 6184858b859f6fcea4b23f76cfb7988882a3c8a7 Mon Sep 17 00:00:00 2001 From: Ovidiu Panait Date: Sun, 29 Mar 2020 20:57:40 +0300 Subject: arm: asm/cache.c: Introduce arm_reserve_mmu As a preparation for turning reserve_mmu into an arch-specific variant, introduce arm_reserve_mmu on ARM. It implements the default routine for reserving memory for MMU TLB and needs to be weakly defined in order to allow for machines to override it. Without this decoupling, after introducing arch_reserve_mmu, there would be two weak definitions for it, one in common/board_f.c and one in arch/arm/lib/cache.c. Signed-off-by: Ovidiu Panait Reviewed-by: Simon Glass --- arch/arm/lib/cache.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'arch/arm/lib/cache.c') diff --git a/arch/arm/lib/cache.c b/arch/arm/lib/cache.c index b8e1e340a16..3cbed602eb1 100644 --- a/arch/arm/lib/cache.c +++ b/arch/arm/lib/cache.c @@ -122,6 +122,11 @@ void invalidate_l2_cache(void) #endif __weak int reserve_mmu(void) +{ + return arm_reserve_mmu(); +} + +__weak int arm_reserve_mmu(void) { #if !(CONFIG_IS_ENABLED(SYS_ICACHE_OFF) && CONFIG_IS_ENABLED(SYS_DCACHE_OFF)) /* reserve TLB table */ -- cgit v1.2.3