Sorry to disturb you.<div><br></div><div>I have two questions for streaming DMA flushing @ arch/arm/mm/cache-v7.S.<br> <br>1.<br>332 ENTRY(v7_dma_map_area)<br>333 add r1, r1, r0<br>334 teq r2, #DMA_FROM_DEVICE<br>
335 beq v7_dma_inv_range<br>
336 b v7_dma_clean_range<br>337 ENDPROC(v7_dma_map_area)<br><br>The function of v7_dma_map_area will invalidate corresponding cache line firstly and then clean the cache for “DMA_FROM_DEVICE”. I am confused the sequence of the operations. IMO, the invalidate should be followed by the clean action. Is it right?<br>
<br>2.<br><div>345 ENTRY(v7_dma_unmap_area)</div><div>346 add r1, r1, r0</div><div>347 teq r2, #DMA_TO_DEVICE</div><div>348 bne v7_dma_inv_range</div><div>349 mov pc, lr</div>
<div>350 ENDPROC(v7_dma_unmap_area)</div><div><br></div>v7_dma_unmap_area, will invalidate corresponding cache line for “DMA_FROM_DEVICE”. But, at v7_dma_map_area, the invalidate has been done. Why do this again?<br> <br>
<br>Regards,<br>Haifeng Li
</div>