title: Allocating a large DMA buffer
body: <p>I want to allocate a large DMA buffer, about 40 MB in size. When I use <code>dma_alloc_coherent()</code>, it fails and what I see is:</p>
  
  <pre><code>------------[ cut here ]------------
  WARNING: at mm/page_alloc.c:2106 __alloc_pages_nodemask+0x1dc/0x788()
  Modules linked in:
  [&lt;8004799c&gt;] (unwind_backtrace+0x0/0xf8) from [&lt;80078ae4&gt;] (warn_slowpath_common+0x4c/0x64)
  [&lt;80078ae4&gt;] (warn_slowpath_common+0x4c/0x64) from [&lt;80078b18&gt;] (warn_slowpath_null+0x1c/0x24)
  [&lt;80078b18&gt;] (warn_slowpath_null+0x1c/0x24) from [&lt;800dfbd0&gt;] (__alloc_pages_nodemask+0x1dc/0x788)
  [&lt;800dfbd0&gt;] (__alloc_pages_nodemask+0x1dc/0x788) from [&lt;8004a880&gt;] (__dma_alloc+0xa4/0x2fc)
  [&lt;8004a880&gt;] (__dma_alloc+0xa4/0x2fc) from [&lt;8004b0b4&gt;] (dma_alloc_coherent+0x54/0x60)
  [&lt;8004b0b4&gt;] (dma_alloc_coherent+0x54/0x60) from [&lt;803ced70&gt;] (mxc_ipu_ioctl+0x270/0x3ec)
  [&lt;803ced70&gt;] (mxc_ipu_ioctl+0x270/0x3ec) from [&lt;80123b78&gt;] (do_vfs_ioctl+0x80/0x54c)
  [&lt;80123b78&gt;] (do_vfs_ioctl+0x80/0x54c) from [&lt;8012407c&gt;] (sys_ioctl+0x38/0x5c)
  [&lt;8012407c&gt;] (sys_ioctl+0x38/0x5c) from [&lt;80041f80&gt;] (ret_fast_syscall+0x0/0x30)
  ---[ end trace 4e0c10ffc7ffc0d8 ]---
  </code></pre>
  
  <p>I've tried different values and it looks like <code>dma_alloc_coherent()</code> can't allocate more than 2^25 bytes (32 MB).</p>
  
  <p>How can such a large DMA buffer can be allocated?</p>