summaryrefslogtreecommitdiff
path: root/arch/arm64/include/asm/assembler.h
diff options
context:
space:
mode:
authorFuad Tabba <tabba@google.com>2021-05-24 11:29:54 +0300
committerWill Deacon <will@kernel.org>2021-05-25 21:27:49 +0300
commit163d3f80695e31068c7d32244c9e6d406d5c5c00 (patch)
treeaf87febe01598b2a5f53bdb42aa8b51766098a58 /arch/arm64/include/asm/assembler.h
parente3974adb4ef591e898956083a3dfa6336bb88638 (diff)
downloadlinux-163d3f80695e31068c7d32244c9e6d406d5c5c00.tar.xz
arm64: dcache_by_line_op to take end parameter instead of size
To be consistent with other functions with similar names and functionality in cacheflush.h, cache.S, and cachetlb.rst, change to specify the range in terms of start and end, as opposed to start and size. No functional change intended. Reported-by: Will Deacon <will@kernel.org> Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Fuad Tabba <tabba@google.com> Reviewed-by: Ard Biesheuvel <ardb@kernel.org> Link: https://lore.kernel.org/r/20210524083001.2586635-12-tabba@google.com Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'arch/arm64/include/asm/assembler.h')
-rw-r--r--arch/arm64/include/asm/assembler.h27
1 files changed, 13 insertions, 14 deletions
diff --git a/arch/arm64/include/asm/assembler.h b/arch/arm64/include/asm/assembler.h
index ced791124b28..c4cecf85dccf 100644
--- a/arch/arm64/include/asm/assembler.h
+++ b/arch/arm64/include/asm/assembler.h
@@ -397,40 +397,39 @@ alternative_endif
/*
* Macro to perform a data cache maintenance for the interval
- * [addr, addr + size)
+ * [start, end)
*
* op: operation passed to dc instruction
* domain: domain used in dsb instruciton
- * addr: starting virtual address of the region
- * size: size of the region
+ * start: starting virtual address of the region
+ * end: end virtual address of the region
* fixup: optional label to branch to on user fault
- * Corrupts: addr, size, tmp1, tmp2
+ * Corrupts: start, end, tmp1, tmp2
*/
- .macro dcache_by_line_op op, domain, addr, size, tmp1, tmp2, fixup
+ .macro dcache_by_line_op op, domain, start, end, tmp1, tmp2, fixup
dcache_line_size \tmp1, \tmp2
- add \size, \addr, \size
sub \tmp2, \tmp1, #1
- bic \addr, \addr, \tmp2
+ bic \start, \start, \tmp2
.Ldcache_op\@:
.ifc \op, cvau
- __dcache_op_workaround_clean_cache \op, \addr
+ __dcache_op_workaround_clean_cache \op, \start
.else
.ifc \op, cvac
- __dcache_op_workaround_clean_cache \op, \addr
+ __dcache_op_workaround_clean_cache \op, \start
.else
.ifc \op, cvap
- sys 3, c7, c12, 1, \addr // dc cvap
+ sys 3, c7, c12, 1, \start // dc cvap
.else
.ifc \op, cvadp
- sys 3, c7, c13, 1, \addr // dc cvadp
+ sys 3, c7, c13, 1, \start // dc cvadp
.else
- dc \op, \addr
+ dc \op, \start
.endif
.endif
.endif
.endif
- add \addr, \addr, \tmp1
- cmp \addr, \size
+ add \start, \start, \tmp1
+ cmp \start, \end
b.lo .Ldcache_op\@
dsb \domain