@@ -61,7 +61,6 @@
* - kaddr - page address
* - size - region size
*/
-extern void __asm_flush_icache_range(unsigned long start, unsigned long end);
extern long __asm_flush_cache_user_range(unsigned long start,
unsigned long end);
extern int __asm_invalidate_icache_range(unsigned long start,
@@ -83,9 +82,7 @@ static inline void __flush_cache_user_range(unsigned long start,
static inline void __flush_icache_range(unsigned long start, unsigned long end)
{
- uaccess_ttbr0_enable();
- __asm_flush_icache_range(start, end);
- uaccess_ttbr0_disable();
+ __flush_cache_user_range(start, end);
}
static inline int invalidate_icache_range(unsigned long start,
@@ -14,19 +14,6 @@
#include <asm/alternative.h>
#include <asm/asm-uaccess.h>
-/*
- * __asm_flush_icache_range(start,end)
- *
- * Ensure that the I and D caches are coherent within specified region.
- * This is typically used when code has been written to a memory region,
- * and will be executed.
- *
- * - start - virtual start address of region
- * - end - virtual end address of region
- */
-ENTRY(__asm_flush_icache_range)
- /* FALLTHROUGH */
-
/*
* __asm_flush_cache_user_range(start,end)
*
@@ -62,7 +49,6 @@ alternative_else_nop_endif
1: ret
9: mov x0, #-EFAULT
b 1b
-ENDPROC(__asm_flush_icache_range)
ENDPROC(__asm_flush_cache_user_range)
/*
@@ -75,7 +75,7 @@ EXPORT_SYMBOL(flush_dcache_page);
/*
* Additional functions defined in assembly.
*/
-EXPORT_SYMBOL(__asm_flush_icache_range);
+EXPORT_SYMBOL(__asm_flush_cache_user_range);
#ifdef CONFIG_ARCH_HAS_PMEM_API
void arch_wb_cache_pmem(void *addr, size_t size)
__asm_flush_icache_range is an alias to __asm_flush_cache_user_range, but now that these functions are called from C wrappers the fall through can instead be done at a higher level. Remove the __asm_flush_icache_range alias in assembly, and instead call __flush_cache_user_range() from __flush_icache_range(). Signed-off-by: Pavel Tatashin <pasha.tatashin@soleen.com> --- arch/arm64/include/asm/cacheflush.h | 5 +---- arch/arm64/mm/cache.S | 14 -------------- arch/arm64/mm/flush.c | 2 +- 3 files changed, 2 insertions(+), 19 deletions(-)