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

Function bus_dmamap_sync

freebsd/mips/mips/busdma_machdep.c:1258–1285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1256}
1257
1258void
1259bus_dmamap_sync(bus_dma_tag_t dmat, bus_dmamap_t map, bus_dmasync_op_t op)
1260{
1261 struct sync_list *sl, *end;
1262 int aligned;
1263
1264 if (op == BUS_DMASYNC_POSTWRITE)
1265 return;
1266 if (STAILQ_FIRST(&map->bpages))
1267 _bus_dmamap_sync_bp(dmat, map, op);
1268
1269 if ((dmat->flags & BUS_DMA_COHERENT) ||
1270 (map->flags & DMAMAP_UNCACHEABLE)) {
1271 if (op & BUS_DMASYNC_PREWRITE)
1272 mips_sync();
1273 return;
1274 }
1275
1276 aligned = (map->flags & DMAMAP_CACHE_ALIGNED) ? 1 : 0;
1277
1278 CTR3(KTR_BUSDMA, "%s: op %x flags %x", __func__, op, map->flags);
1279 if (map->sync_count) {
1280 end = &map->slist[map->sync_count];
1281 for (sl = &map->slist[0]; sl != end; sl++)
1282 bus_dmamap_sync_buf(sl->vaddr, sl->datacount, op,
1283 aligned);
1284 }
1285}
1286
1287static void
1288init_bounce_pages(void *dummy __unused)

Callers 15

jz4780_mmc_prepare_dmaFunction · 0.50
jz4780_mmc_req_doneFunction · 0.50
jzlcd_set_videomodeFunction · 0.50
arge_encapFunction · 0.50
arge_tx_ring_initFunction · 0.50
arge_tx_ring_freeFunction · 0.50
arge_rx_ring_initFunction · 0.50
arge_newbufFunction · 0.50
arge_tx_lockedFunction · 0.50
arge_rx_lockedFunction · 0.50
are_encapFunction · 0.50
are_tx_ring_initFunction · 0.50

Calls 3

_bus_dmamap_sync_bpFunction · 0.85
mips_syncFunction · 0.85
bus_dmamap_sync_bufFunction · 0.85

Tested by

no test coverage detected