Commit b8fce9f1 authored by Jens Korinth's avatar Jens Korinth
Browse files

WIP: Zynq DMA management: changed alloc flags

* changed allocation flags from GFP_DMA (obsolete, discouraged) to
  GFP_KERNEL | __GFP_MEMALLOC
* with >256MB CMA areas this should mean that we do not run into
  ENOMEMs soon, which could be confirmed
* however, DMA allocations tend to destabilize the system, sooner
  or later a memory oops will occur (see platform_stress_alloc)
* not sure how/if to fix that; thought leaving an FPGA-exclusive
  space on top of the DDR via mem= bootarg, but kernel does not
  boot below 500M
* will keep this for now
parent a013578b
......@@ -77,7 +77,7 @@ dma_addr_t zynq_dmamgmt_alloc(size_t const len, handle_t *hid)
}
_dmabuf.elems[id].kvirt_addr = dma_alloc_coherent(
NULL, len, &_dmabuf.elems[id].dma_addr,
GFP_DMA | __GFP_RECLAIMABLE);
GFP_KERNEL | __GFP_MEMALLOC);
if (! _dmabuf.elems[id].kvirt_addr) {
WRN("could not allocate DMA buffer of size %zu byte!", len);
dmabuf_fsp_put(&_dmabuf, id);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment