Re: Query regarding dma_alloc()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Hi all,
> What is the difference between the following memory allocations.
>
> 1) Memory allocation by doing,
>       char *buf;
>       buf = kmalloc(BUF_LEN, GFP_DMA | GFP_KERNEL);
>
> 2) And by
>       char *buf;
>       buf = dma_alloc(...);
>
> in the link http://www.arm.linux.org.uk/developer/memory.txt
> it says that dma_alloc() returns virtual address in "ffc00000-----fffeffff"
> this region,
>
> while in the first case it is returning Virtual address in "low-memory"
> region.
>
> For DMA mappable memory which one we should use..?
>

Hi Sandeep

Please have a look at these two API;s below.
http://lxr.linux.no/#linux+v3.0/Documentation/DMA-API-HOWTO.txt

http://lxr.linux.no/#linux+v3.0/Documentation/DMA-API.txt



-- 
Warm Regards,
Ravi Kulkarni

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux