Allocating a cache-safe buffer for DMA devices and drivers
thayumker at gmail.com
Mon Aug 29 19:30:06 EST 2005
A an equivalent function that does this is pci_alloc_consistent or
dma_alloc_coherent which ensures cache coherency.
Please refer Documentation/DMA-API.txt of the linux source repository.
On 8/29/05, Garcia Jérémie <GARCIAJ at 3il.fr> wrote:
> Hi everybody, I have to port a vxWorks appz to Linux Montavista running on a powerPC 405EP based architecture.
> In this one, we use the following vxWorks system call: cacheDmaMalloc( ) whose man page is :
> cacheDmaMalloc( ) - allocate a cache-safe buffer for DMA devices and drivers
> void * cacheDmaMalloc
> size_t bytes /* number of bytes to allocate */
> This routine returns a pointer to a section of memory that will not experience any cache coherency problems. Function pointers in the CACHE_FUNCS structure provide access to DMA support routines.
> A pointer to the cache-safe buffer, or NULL.
> I need to handle the given amount of memory from the user space.
> So could anyone told how to achieve the same goal on Linux with these constraints?
> Tks a lot for your precious help!
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive: http://mail.nl.linux.org/kernelnewbies/
> FAQ: http://kernelnewbies.org/faq/
More information about the Linuxppc-dev