Commit 2074beeb authored by Linus Walleij's avatar Linus Walleij Committed by Russell King (Oracle)
Browse files

ARM: 9386/2: mm: Use symbol alias for cache functions



The cache functions to flush user cache (*_flush_user_cache_all)
are in many cases just a branch to the corresponfing userspace or
kernelspace function. These functions also have the same arguments.

Simplify these by using SYM_FUNC_ALIAS() in all affected sites.

The NOP cache has very many similar calls which are just returns,
but it would be confusing to use aliases here, so leave all the
explicit returns and drop a comment on why we are not using aliases.

Reviewed-by: default avatarSami Tolvanen <samitolvanen@google.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
parent 1036b895
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -52,9 +52,7 @@ SYM_FUNC_END(fa_flush_icache_all)
 *	Clean and invalidate all cache entries in a particular address
 *	space.
 */
SYM_TYPED_FUNC_START(fa_flush_user_cache_all)
	b	fa_flush_kern_cache_all
SYM_FUNC_END(fa_flush_user_cache_all)
SYM_FUNC_ALIAS(fa_flush_user_cache_all, fa_flush_kern_cache_all)

/*
 *	flush_kern_cache_all()
+4 −0
Original line number Diff line number Diff line
@@ -6,6 +6,10 @@

#include "proc-macros.S"

/*
 * These are all open-coded instead of aliased, to make clear
 * what is going on here: all functions are stubbed out.
 */
SYM_TYPED_FUNC_START(nop_flush_icache_all)
	ret	lr
SYM_FUNC_END(nop_flush_icache_all)
+1 −3
Original line number Diff line number Diff line
@@ -28,9 +28,7 @@ SYM_FUNC_END(v4_flush_icache_all)
 *
 *	- mm	- mm_struct describing address space
 */
SYM_TYPED_FUNC_START(v4_flush_user_cache_all)
	b	v4_flush_kern_cache_all
SYM_FUNC_END(v4_flush_user_cache_all)
SYM_FUNC_ALIAS(v4_flush_user_cache_all, v4_flush_kern_cache_all)

/*
 *	flush_kern_cache_all()
+1 −3
Original line number Diff line number Diff line
@@ -66,9 +66,7 @@ SYM_FUNC_END(v4wb_flush_icache_all)
 *	Clean and invalidate all cache entries in a particular address
 *	space.
 */
SYM_TYPED_FUNC_START(v4wb_flush_user_cache_all)
	b	v4wb_flush_kern_cache_all
SYM_FUNC_END(v4wb_flush_user_cache_all)
SYM_FUNC_ALIAS(v4wb_flush_user_cache_all, v4wb_flush_kern_cache_all)

/*
 *	flush_kern_cache_all()
+1 −3
Original line number Diff line number Diff line
@@ -56,9 +56,7 @@ SYM_FUNC_END(v4wt_flush_icache_all)
 *	Invalidate all cache entries in a particular address
 *	space.
 */
SYM_TYPED_FUNC_START(v4wt_flush_user_cache_all)
	b	v4wt_flush_kern_cache_all
SYM_FUNC_END(v4wt_flush_user_cache_all)
SYM_FUNC_ALIAS(v4wt_flush_user_cache_all, v4wt_flush_kern_cache_all)

/*
 *	flush_kern_cache_all()
Loading