@@ -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()
@@ -113,9 +111,7 @@ SYM_FUNC_END(fa_flush_user_cache_range)
* - start - virtual start address
* - end - virtual end address
*/
-SYM_TYPED_FUNC_START(fa_coherent_kern_range)
- b fa_coherent_user_range
-SYM_FUNC_END(fa_coherent_kern_range)
+SYM_FUNC_ALIAS(fa_coherent_kern_range, fa_coherent_user_range)
/*
* coherent_user_range(start, end)
@@ -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)
@@ -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()
@@ -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()
@@ -151,9 +149,7 @@ SYM_FUNC_END(v4wb_flush_kern_dcache_area)
* - start - virtual start address
* - end - virtual end address
*/
-SYM_TYPED_FUNC_START(v4wb_coherent_kern_range)
- b v4wb_coherent_user_range
-SYM_FUNC_END(v4wb_coherent_kern_range)
+SYM_FUNC_ALIAS(v4wb_coherent_kern_range, v4wb_coherent_user_range)
/*
* coherent_user_range(start, end)
@@ -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()
@@ -109,9 +107,7 @@ SYM_FUNC_END(v4wt_flush_user_cache_range)
* - start - virtual start address
* - end - virtual end address
*/
-SYM_TYPED_FUNC_START(v4wt_coherent_kern_range)
- b v4wt_coherent_user_range
-SYM_FUNC_END(v4wt_coherent_kern_range)
+SYM_FUNC_ALIAS(v4wt_coherent_kern_range, v4wt_coherent_user_range)
/*
* coherent_user_range(start, end)
@@ -116,9 +116,7 @@ SYM_FUNC_END(v6_flush_user_cache_range)
* It is assumed that:
* - the Icache does not read data from the write buffer
*/
-SYM_TYPED_FUNC_START(v6_coherent_kern_range)
- b v6_coherent_user_range
-SYM_FUNC_END(v6_coherent_kern_range)
+SYM_FUNC_ALIAS(v6_coherent_kern_range, v6_coherent_user_range)
/*
* v6_coherent_user_range(start,end)
@@ -260,9 +260,7 @@ SYM_FUNC_END(v7_flush_user_cache_range)
* It is assumed that:
* - the Icache does not read data from the write buffer
*/
-SYM_TYPED_FUNC_START(v7_coherent_kern_range)
- b v7_coherent_user_range
-SYM_FUNC_END(v7_coherent_kern_range)
+SYM_FUNC_ALIAS(v7_coherent_kern_range, v7_coherent_user_range)
/*
* v7_coherent_user_range(start,end)
@@ -127,9 +127,7 @@ SYM_FUNC_END(arm1020_flush_icache_all)
* Invalidate all cache entries in a particular address
* space.
*/
-SYM_TYPED_FUNC_START(arm1020_flush_user_cache_all)
- b arm1020_flush_kern_cache_all
-SYM_FUNC_END(arm1020_flush_user_cache_all)
+SYM_FUNC_ALIAS(arm1020_flush_user_cache_all, arm1020_flush_kern_cache_all)
/*
* flush_kern_cache_all()
@@ -201,9 +199,7 @@ SYM_FUNC_END(arm1020_flush_user_cache_range)
* - start - virtual start address
* - end - virtual end address
*/
-SYM_TYPED_FUNC_START(arm1020_coherent_kern_range)
- b arm1020_coherent_user_range
-SYM_FUNC_END(arm1020_coherent_kern_range)
+SYM_FUNC_ALIAS(arm1020_coherent_kern_range, arm1020_coherent_user_range)
/*
* coherent_user_range(start, end)
@@ -127,9 +127,7 @@ SYM_FUNC_END(arm1020e_flush_icache_all)
* Invalidate all cache entries in a particular address
* space.
*/
-SYM_TYPED_FUNC_START(arm1020e_flush_user_cache_all)
- b arm1020e_flush_kern_cache_all
-SYM_FUNC_END(arm1020e_flush_user_cache_all)
+SYM_FUNC_ALIAS(arm1020e_flush_user_cache_all, arm1020e_flush_kern_cache_all)
/*
* flush_kern_cache_all()
@@ -198,9 +196,7 @@ SYM_FUNC_END(arm1020e_flush_user_cache_range)
* - start - virtual start address
* - end - virtual end address
*/
-SYM_TYPED_FUNC_START(arm1020e_coherent_kern_range)
- b arm1020e_coherent_user_range
-SYM_FUNC_END(arm1020e_coherent_kern_range)
+SYM_FUNC_ALIAS(arm1020e_coherent_kern_range, arm1020e_coherent_user_range)
/*
* coherent_user_range(start, end)
@@ -127,9 +127,7 @@ SYM_FUNC_END(arm1022_flush_icache_all)
* Invalidate all cache entries in a particular address
* space.
*/
-SYM_TYPED_FUNC_START(arm1022_flush_user_cache_all)
- b arm1022_flush_kern_cache_all
-SYM_FUNC_END(arm1022_flush_user_cache_all)
+SYM_FUNC_ALIAS(arm1022_flush_user_cache_all, arm1022_flush_kern_cache_all)
/*
* flush_kern_cache_all()
@@ -197,9 +195,7 @@ SYM_FUNC_END(arm1022_flush_user_cache_range)
* - start - virtual start address
* - end - virtual end address
*/
-SYM_TYPED_FUNC_START(arm1022_coherent_kern_range)
- b arm1022_coherent_user_range
-SYM_FUNC_END(arm1022_coherent_kern_range)
+SYM_FUNC_ALIAS(arm1022_coherent_kern_range, arm1022_coherent_user_range)
/*
* coherent_user_range(start, end)
@@ -127,9 +127,7 @@ SYM_FUNC_END(arm1026_flush_icache_all)
* Invalidate all cache entries in a particular address
* space.
*/
-SYM_TYPED_FUNC_START(arm1026_flush_user_cache_all)
- b arm1026_flush_kern_cache_all
-SYM_FUNC_END(arm1026_flush_user_cache_all)
+SYM_FUNC_ALIAS(arm1026_flush_user_cache_all, arm1026_flush_kern_cache_all)
/*
* flush_kern_cache_all()
@@ -192,9 +190,7 @@ SYM_FUNC_END(arm1026_flush_user_cache_range)
* - start - virtual start address
* - end - virtual end address
*/
-SYM_TYPED_FUNC_START(arm1026_coherent_kern_range)
- b arm1026_coherent_user_range
-SYM_FUNC_END(arm1026_coherent_kern_range)
+SYM_FUNC_ALIAS(arm1026_coherent_kern_range, arm1026_coherent_user_range)
/*
* coherent_user_range(start, end)
@@ -116,9 +116,7 @@ SYM_FUNC_END(arm920_flush_icache_all)
* Invalidate all cache entries in a particular address
* space.
*/
-SYM_TYPED_FUNC_START(arm920_flush_user_cache_all)
- b arm920_flush_kern_cache_all
-SYM_FUNC_END(arm920_flush_user_cache_all)
+SYM_FUNC_ALIAS(arm920_flush_user_cache_all, arm920_flush_kern_cache_all)
/*
* flush_kern_cache_all()
@@ -179,9 +177,7 @@ SYM_FUNC_END(arm920_flush_user_cache_range)
* - start - virtual start address
* - end - virtual end address
*/
-SYM_TYPED_FUNC_START(arm920_coherent_kern_range)
- b arm920_coherent_user_range
-SYM_FUNC_END(arm920_coherent_kern_range)
+SYM_FUNC_ALIAS(arm920_coherent_kern_range, arm920_coherent_user_range)
/*
* coherent_user_range(start, end)
@@ -118,9 +118,7 @@ SYM_FUNC_END(arm922_flush_icache_all)
* Clean and invalidate all cache entries in a particular
* address space.
*/
-SYM_TYPED_FUNC_START(arm922_flush_user_cache_all)
- b arm922_flush_kern_cache_all
-SYM_FUNC_END(arm922_flush_user_cache_all)
+SYM_FUNC_ALIAS(arm922_flush_user_cache_all, arm922_flush_kern_cache_all)
/*
* flush_kern_cache_all()
@@ -181,9 +179,7 @@ SYM_FUNC_END(arm922_flush_user_cache_range)
* - start - virtual start address
* - end - virtual end address
*/
-SYM_TYPED_FUNC_START(arm922_coherent_kern_range)
- b arm922_coherent_user_range
-SYM_FUNC_END(arm922_coherent_kern_range)
+SYM_FUNC_ALIAS(arm922_coherent_kern_range, arm922_coherent_user_range)
/*
* coherent_user_range(start, end)
@@ -151,9 +151,7 @@ SYM_FUNC_END(arm925_flush_icache_all)
* Clean and invalidate all cache entries in a particular
* address space.
*/
-SYM_TYPED_FUNC_START(arm925_flush_user_cache_all)
- b arm925_flush_kern_cache_all
-SYM_FUNC_END(arm925_flush_user_cache_all)
+SYM_FUNC_ALIAS(arm925_flush_user_cache_all, arm925_flush_kern_cache_all)
/*
* flush_kern_cache_all()
@@ -227,9 +225,7 @@ SYM_FUNC_END(arm925_flush_user_cache_range)
* - start - virtual start address
* - end - virtual end address
*/
-SYM_TYPED_FUNC_START(arm925_coherent_kern_range)
- b arm925_coherent_user_range
-SYM_FUNC_END(arm925_coherent_kern_range)
+SYM_FUNC_ALIAS(arm925_coherent_kern_range, arm925_coherent_user_range)
/*
* coherent_user_range(start, end)
@@ -117,9 +117,7 @@ SYM_FUNC_END(arm926_flush_icache_all)
* Clean and invalidate all cache entries in a particular
* address space.
*/
-SYM_TYPED_FUNC_START(arm926_flush_user_cache_all)
- b arm926_flush_kern_cache_all
-SYM_FUNC_END(arm926_flush_user_cache_all)
+SYM_FUNC_ALIAS(arm926_flush_user_cache_all, arm926_flush_kern_cache_all)
/*
* flush_kern_cache_all()
@@ -190,9 +188,7 @@ SYM_FUNC_END(arm926_flush_user_cache_range)
* - start - virtual start address
* - end - virtual end address
*/
-SYM_TYPED_FUNC_START(arm926_coherent_kern_range)
- b arm926_coherent_user_range
-SYM_FUNC_END(arm926_coherent_kern_range)
+SYM_FUNC_ALIAS(arm926_coherent_kern_range, arm926_coherent_user_range)
/*
* coherent_user_range(start, end)
@@ -81,9 +81,7 @@ SYM_FUNC_END(arm940_flush_icache_all)
/*
* flush_user_cache_all()
*/
-SYM_TYPED_FUNC_START(arm940_flush_user_cache_all)
- b arm940_flush_kern_cache_all
-SYM_FUNC_END(arm940_flush_user_cache_all)
+SYM_FUNC_ALIAS(arm940_flush_user_cache_all, arm940_flush_kern_cache_all)
/*
* flush_kern_cache_all()
@@ -134,9 +132,7 @@ SYM_FUNC_END(arm940_flush_user_cache_range)
* - start - virtual start address
* - end - virtual end address
*/
-SYM_TYPED_FUNC_START(arm940_coherent_kern_range)
- b arm940_flush_kern_dcache_area
-SYM_FUNC_END(arm940_coherent_kern_range)
+SYM_FUNC_ALIAS(arm940_coherent_kern_range, arm940_flush_kern_dcache_area)
/*
* coherent_user_range(start, end)
@@ -88,9 +88,7 @@ SYM_FUNC_END(arm946_flush_icache_all)
/*
* flush_user_cache_all()
*/
-SYM_TYPED_FUNC_START(arm946_flush_user_cache_all)
- b arm946_flush_kern_cache_all
-SYM_FUNC_END(arm946_flush_user_cache_all)
+SYM_FUNC_ALIAS(arm946_flush_user_cache_all, arm946_flush_kern_cache_all)
/*
* flush_kern_cache_all()
@@ -168,9 +166,7 @@ SYM_FUNC_END(arm946_flush_user_cache_range)
* - start - virtual start address
* - end - virtual end address
*/
-SYM_TYPED_FUNC_START(arm946_coherent_kern_range)
- b arm946_coherent_user_range
-SYM_FUNC_END(arm946_coherent_kern_range)
+SYM_FUNC_ALIAS(arm946_coherent_kern_range, arm946_coherent_user_range)
/*
* coherent_user_range(start, end)
@@ -136,9 +136,7 @@ SYM_FUNC_END(feroceon_flush_icache_all)
* address space.
*/
.align 5
-SYM_TYPED_FUNC_START(feroceon_flush_user_cache_all)
- b feroceon_flush_kern_cache_all
-SYM_FUNC_END(feroceon_flush_user_cache_all)
+SYM_FUNC_ALIAS(feroceon_flush_user_cache_all, feroceon_flush_kern_cache_all)
/*
* flush_kern_cache_all()
@@ -206,9 +204,7 @@ SYM_FUNC_END(feroceon_flush_user_cache_range)
* - end - virtual end address
*/
.align 5
-SYM_TYPED_FUNC_START(feroceon_coherent_kern_range)
- b feroceon_coherent_user_range
-SYM_FUNC_END(feroceon_coherent_kern_range)
+SYM_FUNC_ALIAS(feroceon_coherent_kern_range, feroceon_coherent_user_range)
/*
* coherent_user_range(start, end)
@@ -100,9 +100,7 @@ SYM_FUNC_END(mohawk_flush_icache_all)
* Clean and invalidate all cache entries in a particular
* address space.
*/
-SYM_TYPED_FUNC_START(mohawk_flush_user_cache_all)
- b mohawk_flush_kern_cache_all
-SYM_FUNC_END(mohawk_flush_user_cache_all)
+SYM_FUNC_ALIAS(mohawk_flush_user_cache_all, mohawk_flush_kern_cache_all)
/*
* flush_kern_cache_all()
@@ -161,9 +159,7 @@ SYM_FUNC_END(mohawk_flush_user_cache_range)
* - start - virtual start address
* - end - virtual end address
*/
-SYM_TYPED_FUNC_START(mohawk_coherent_kern_range)
- b mohawk_coherent_user_range
-SYM_FUNC_END(mohawk_coherent_kern_range)
+SYM_FUNC_ALIAS(mohawk_coherent_kern_range, mohawk_coherent_user_range)
/*
* coherent_user_range(start, end)
@@ -157,9 +157,7 @@ SYM_FUNC_END(xsc3_flush_icache_all)
* Invalidate all cache entries in a particular address
* space.
*/
-SYM_TYPED_FUNC_START(xsc3_flush_user_cache_all)
- b xsc3_flush_kern_cache_all
-SYM_FUNC_END(xsc3_flush_user_cache_all)
+SYM_FUNC_ALIAS(xsc3_flush_user_cache_all, xsc3_flush_kern_cache_all)
/*
* flush_kern_cache_all()
@@ -221,9 +219,7 @@ SYM_FUNC_END(xsc3_flush_user_cache_range)
* Note: single I-cache line invalidation isn't used here since
* it also trashes the mini I-cache used by JTAG debuggers.
*/
-SYM_TYPED_FUNC_START(xsc3_coherent_kern_range)
- b xsc3_coherent_user_range
-SYM_FUNC_END(xsc3_coherent_kern_range)
+SYM_FUNC_ALIAS(xsc3_coherent_kern_range, xsc3_coherent_user_range)
SYM_TYPED_FUNC_START(xsc3_coherent_user_range)
bic r0, r0, #CACHELINESIZE - 1
@@ -199,9 +199,7 @@ SYM_FUNC_END(xscale_flush_icache_all)
* Invalidate all cache entries in a particular address
* space.
*/
-SYM_TYPED_FUNC_START(xscale_flush_user_cache_all)
- b xscale_flush_kern_cache_all
-SYM_FUNC_END(xscale_flush_user_cache_all)
+SYM_FUNC_ALIAS(xscale_flush_user_cache_all, xscale_flush_kern_cache_all)
/*
* flush_kern_cache_all()
The cache functions to flush user cache (*_flush_user_cache_all) and coherent kernel range (*_coherent_kern_range) are in many cases just a branch to the corresponfing userspace or kernelspace function. These functions also have the same arguments. Simplify these two 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. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> --- arch/arm/mm/cache-fa.S | 8 ++------ arch/arm/mm/cache-nop.S | 4 ++++ arch/arm/mm/cache-v4.S | 4 +--- arch/arm/mm/cache-v4wb.S | 8 ++------ arch/arm/mm/cache-v4wt.S | 8 ++------ arch/arm/mm/cache-v6.S | 4 +--- arch/arm/mm/cache-v7.S | 4 +--- arch/arm/mm/proc-arm1020.S | 8 ++------ arch/arm/mm/proc-arm1020e.S | 8 ++------ arch/arm/mm/proc-arm1022.S | 8 ++------ arch/arm/mm/proc-arm1026.S | 8 ++------ arch/arm/mm/proc-arm920.S | 8 ++------ arch/arm/mm/proc-arm922.S | 8 ++------ arch/arm/mm/proc-arm925.S | 8 ++------ arch/arm/mm/proc-arm926.S | 8 ++------ arch/arm/mm/proc-arm940.S | 8 ++------ arch/arm/mm/proc-arm946.S | 8 ++------ arch/arm/mm/proc-feroceon.S | 8 ++------ arch/arm/mm/proc-mohawk.S | 8 ++------ arch/arm/mm/proc-xsc3.S | 8 ++------ arch/arm/mm/proc-xscale.S | 4 +--- 21 files changed, 40 insertions(+), 108 deletions(-)