MCPcopy Create free account
hub / github.com/F-Stack/f-stack / dma_preread_safe

Function dma_preread_safe

freebsd/arm/arm/busdma_machdep.c:1290–1306  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1288}
1289
1290static void
1291dma_preread_safe(vm_offset_t va, vm_paddr_t pa, vm_size_t size)
1292{
1293 /*
1294 * Write back any partial cachelines immediately before and
1295 * after the DMA region. We don't need to round the address
1296 * down to the nearest cacheline or specify the exact size,
1297 * as dcache_wb_poc() will do the rounding for us and works
1298 * at cacheline granularity.
1299 */
1300 if (va & BUSDMA_DCACHE_MASK)
1301 dcache_wb_poc(va, pa, 1);
1302 if ((va + size) & BUSDMA_DCACHE_MASK)
1303 dcache_wb_poc(va + size, pa + size, 1);
1304
1305 dcache_inv_poc_dma(va, pa, size);
1306}
1307
1308static void
1309dma_dcache_sync(struct sync_list *sl, bus_dmasync_op_t op)

Callers 1

dma_dcache_syncFunction · 0.70

Calls 2

dcache_wb_pocFunction · 0.85
dcache_inv_poc_dmaFunction · 0.85

Tested by

no test coverage detected