Skip to content

Commit 393239b

Browse files
Fuad Tabbawilldeacon
authored andcommitted
arm64: Fix cache maintenance function comments
Fix and expand comments for the cache maintenance functions in cacheflush.h. Adds comments to functions that weren't described before. Explains what the functions do using Arm Architecture Reference Manual terminology. No functional change intended. 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-18-tabba@google.com Signed-off-by: Will Deacon <will@kernel.org>
1 parent 8c28d52 commit 393239b

1 file changed

Lines changed: 30 additions & 17 deletions

File tree

arch/arm64/include/asm/cacheflush.h

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,31 +30,44 @@
3030
* the implementation assumes non-aliasing VIPT D-cache and (aliasing)
3131
* VIPT I-cache.
3232
*
33-
* flush_icache_range(start, end)
33+
* All functions below apply to the interval [start, end)
34+
* - start - virtual start address (inclusive)
35+
* - end - virtual end address (exclusive)
3436
*
35-
* Ensure coherency between the I-cache and the D-cache in the
36-
* region described by start, end.
37-
* - start - virtual start address
38-
* - end - virtual end address
37+
* __flush_icache_range(start, end)
3938
*
40-
* invalidate_icache_range(start, end)
41-
*
42-
* Invalidate the I-cache in the region described by start, end.
43-
* - start - virtual start address
44-
* - end - virtual end address
39+
* Ensure coherency between the I-cache and the D-cache region to
40+
* the Point of Unification.
4541
*
4642
* __flush_cache_user_range(start, end)
4743
*
48-
* Ensure coherency between the I-cache and the D-cache in the
49-
* region described by start, end.
50-
* - start - virtual start address
51-
* - end - virtual end address
44+
* Ensure coherency between the I-cache and the D-cache region to
45+
* the Point of Unification.
46+
* Use only if the region might access user memory.
47+
*
48+
* invalidate_icache_range(start, end)
49+
*
50+
* Invalidate I-cache region to the Point of Unification.
5251
*
5352
* __flush_dcache_area(start, end)
5453
*
55-
* Ensure that the data held in page is written back.
56-
* - start - virtual start address
57-
* - end - virtual end address
54+
* Clean and invalidate D-cache region to the Point of Coherency.
55+
*
56+
* __inval_dcache_area(start, end)
57+
*
58+
* Invalidate D-cache region to the Point of Coherency.
59+
*
60+
* __clean_dcache_area_poc(start, end)
61+
*
62+
* Clean D-cache region to the Point of Coherency.
63+
*
64+
* __clean_dcache_area_pop(start, end)
65+
*
66+
* Clean D-cache region to the Point of Persistence.
67+
*
68+
* __clean_dcache_area_pou(start, end)
69+
*
70+
* Clean D-cache region to the Point of Unification.
5871
*/
5972
extern void __flush_icache_range(unsigned long start, unsigned long end);
6073
extern void invalidate_icache_range(unsigned long start, unsigned long end);

0 commit comments

Comments
 (0)