Skip to content

Commit c2c529b

Browse files
mrutland-armctmarinas
authored andcommitted
arm64: remove __dma_*_area() aliases
The __dma_inv_area() and __dma_clean_area() aliases make cache.S harder to navigate, but don't gain us anything in practice. For clarity, let's remove them along with their redundant comments. The only users are __dma_map_area() and __dma_unmap_area(), which need to be position independent, and can call __pi_dcache_inval_poc() and __pi_dcache_clean_poc() directly. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland <[email protected]> Cc: Ard Biesheuvel <[email protected]> Cc: Fuad Tabba <[email protected]> Cc: Marc Zyngier <[email protected]> Cc: Will Deacon <[email protected]> Acked-by: Catalin Marinas <[email protected]> Acked-by: Mark Brown <[email protected]> Acked-by: Ard Biesheuvel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
1 parent f2cefc0 commit c2c529b

File tree

1 file changed

+3
-21
lines changed

1 file changed

+3
-21
lines changed

arch/arm64/mm/cache.S

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -140,15 +140,7 @@ SYM_FUNC_END(dcache_clean_pou)
140140
* - start - kernel start address of region
141141
* - end - kernel end address of region
142142
*/
143-
SYM_FUNC_START_LOCAL(__dma_inv_area)
144143
SYM_FUNC_START_PI(dcache_inval_poc)
145-
/* FALLTHROUGH */
146-
147-
/*
148-
* __dma_inv_area(start, end)
149-
* - start - virtual start address of region
150-
* - end - virtual end address of region
151-
*/
152144
dcache_line_size x2, x3
153145
sub x3, x2, #1
154146
tst x1, x3 // end cache line aligned?
@@ -167,7 +159,6 @@ SYM_FUNC_START_PI(dcache_inval_poc)
167159
dsb sy
168160
ret
169161
SYM_FUNC_END_PI(dcache_inval_poc)
170-
SYM_FUNC_END(__dma_inv_area)
171162

172163
/*
173164
* dcache_clean_poc(start, end)
@@ -178,19 +169,10 @@ SYM_FUNC_END(__dma_inv_area)
178169
* - start - virtual start address of region
179170
* - end - virtual end address of region
180171
*/
181-
SYM_FUNC_START_LOCAL(__dma_clean_area)
182172
SYM_FUNC_START_PI(dcache_clean_poc)
183-
/* FALLTHROUGH */
184-
185-
/*
186-
* __dma_clean_area(start, end)
187-
* - start - virtual start address of region
188-
* - end - virtual end address of region
189-
*/
190173
dcache_by_line_op cvac, sy, x0, x1, x2, x3
191174
ret
192175
SYM_FUNC_END_PI(dcache_clean_poc)
193-
SYM_FUNC_END(__dma_clean_area)
194176

195177
/*
196178
* dcache_clean_pop(start, end)
@@ -232,8 +214,8 @@ SYM_FUNC_END_PI(__dma_flush_area)
232214
SYM_FUNC_START_PI(__dma_map_area)
233215
add x1, x0, x1
234216
cmp w2, #DMA_FROM_DEVICE
235-
b.eq __dma_inv_area
236-
b __dma_clean_area
217+
b.eq __pi_dcache_inval_poc
218+
b __pi_dcache_clean_poc
237219
SYM_FUNC_END_PI(__dma_map_area)
238220

239221
/*
@@ -245,6 +227,6 @@ SYM_FUNC_END_PI(__dma_map_area)
245227
SYM_FUNC_START_PI(__dma_unmap_area)
246228
add x1, x0, x1
247229
cmp w2, #DMA_TO_DEVICE
248-
b.ne __dma_inv_area
230+
b.ne __pi_dcache_inval_poc
249231
ret
250232
SYM_FUNC_END_PI(__dma_unmap_area)

0 commit comments

Comments
 (0)