[Fwd: Re: Allocating a cache-safe buffer for DMA devices and drivers]
Sorry, forgot to cc...
Hi,
Something like that maybe :
virtual_ad = (unsigned long *) kmalloc(sizeof(long)*taille_dma,
GFP_KERNEL|GFP_DMA|GFP_ATOMIC);
O+ xavier
Quoted 27 lines · Garcia Jérémie
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 :NAME
cacheDmaMalloc( )- allocate a cache-safe buffer for DMA devices and driversSYNOPSIS
void * cacheDmaMalloc( size_t bytes /* number of bytes to allocate */ )DESCRIPTION
This routine returns a pointer to a section of memory that will not experience any cache coherency problems. Function pointers in theCACHE_FUNCSstructure provide access to DMA support routines.RETURNS
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!
_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-dev