Hi Simon,<br><br>Thanks for the quick reply. One more thing I want to ask is what if I create a dma pool (using pci_pool_create()), allocate dma 
buffers from that pool and then try to memory map them? will the buffers 
in that case will be continuous and is it possible to memory map them in
 a single user space page?<br><br>Thanks in advance<br>Ravi Gupta<br><br><div class="gmail_quote">On Wed, Jul 28, 2010 at 7:51 PM, Simon Richter <span dir="ltr"><<a href="mailto:Simon.Richter@hogyros.de">Simon.Richter@hogyros.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi,<br>
<div><div></div><div class="h5"><br>
On Wed, Jul 28, 2010 at 06:44:10PM +0530, Ravi Gupta wrote:<br>
<br>
> I am new to linux device drivers development. I have created 16 buffers of<br>
> size 256 bytes each(using kmalloc()) in my device driver code. I want to<br>
> memory map these buffers to user space. Now is it possible to memory map<br>
> these buffer(16*256 = 4096 = 1 page on 32 bit linux) into a single page in<br>
> user space OR i have to map them in individual pages in user space? Note,<br>
> all the buffers may not be stored in continuous memory location.<br>
<br>
</div></div>Pages are the smallest unit for mappings, so each buffer would end up in<br>
its own mapping. If you want the buffers to be accessible without an<br>
offset, then you cannot have them in continuous locations, as you cannot<br>
map memory from the middle of a page to the beginning either.<br>
<br>
So your options are: one page per buffer (wasteful, but gives you<br>
granular access control), or allocating all the buffers as a single<br>
block.<br>
<font color="#888888"><br>
   Simon<br>
</font></blockquote></div><br>