Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Fuad Tabba and committed by
Will Deacon
393239be 8c28d52c

+30 -17
+30 -17
arch/arm64/include/asm/cacheflush.h
··· 30 30 * the implementation assumes non-aliasing VIPT D-cache and (aliasing) 31 31 * VIPT I-cache. 32 32 * 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) 34 36 * 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) 39 38 * 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. 45 41 * 46 42 * __flush_cache_user_range(start, end) 47 43 * 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. 52 51 * 53 52 * __flush_dcache_area(start, end) 54 53 * 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. 58 71 */ 59 72 extern void __flush_icache_range(unsigned long start, unsigned long end); 60 73 extern void invalidate_icache_range(unsigned long start, unsigned long end);