Changeset View
Changeset View
Standalone View
Standalone View
sys/x86/x86/busdma_bounce.c
Show First 20 Lines • Show All 394 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
/* | /* | ||||
* Allocate a piece of memory that can be efficiently mapped into | * Allocate a piece of memory that can be efficiently mapped into | ||||
* bus device space based on the constraints lited in the dma tag. | * bus device space based on the constraints lited in the dma tag. | ||||
* A dmamap to for use with dmamap_load is also allocated. | * A dmamap to for use with dmamap_load is also allocated. | ||||
*/ | */ | ||||
static int | static int | ||||
bounce_bus_dmamem_alloc(bus_dma_tag_t dmat, void** vaddr, int flags, | bounce_bus_dmamem_alloc(bus_dma_tag_t dmat, void **vaddr, int flags, | ||||
bus_dmamap_t *mapp) | bus_dmamap_t *mapp) | ||||
{ | { | ||||
vm_memattr_t attr; | vm_memattr_t attr; | ||||
int mflags; | int mflags; | ||||
if (flags & BUS_DMA_NOWAIT) | if (flags & BUS_DMA_NOWAIT) | ||||
mflags = M_NOWAIT; | mflags = M_NOWAIT; | ||||
else | else | ||||
▲ Show 20 Lines • Show All 936 Lines • Show Last 20 Lines |