* Allocating a cache-safe buffer for DMA devices and drivers
@ 2005-08-29 9:16 Garcia Jérémie
2005-08-29 9:30 ` Thayumanavar Sachithanantham
0 siblings, 1 reply; 2+ messages in thread
From: Garcia Jérémie @ 2005-08-29 9:16 UTC (permalink / raw)
To: linuxppc-dev; +Cc: kernelnewbies
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 =
drivers
SYNOPSIS
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 the =
CACHE_FUNCS structure provide access to DMA support routines.
RETURNS
A pointer to the cache-safe buffer, or NULL.=20
I need to handle the given amount of memory from the user space.=20
So could anyone told how to achieve the same goal on Linux with these =
constraints?
Tks a lot for your precious help!
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Allocating a cache-safe buffer for DMA devices and drivers
2005-08-29 9:16 Allocating a cache-safe buffer for DMA devices and drivers Garcia Jérémie
@ 2005-08-29 9:30 ` Thayumanavar Sachithanantham
0 siblings, 0 replies; 2+ messages in thread
From: Thayumanavar Sachithanantham @ 2005-08-29 9:30 UTC (permalink / raw)
To: Garcia Jérémie; +Cc: kernelnewbies, linuxppc-dev
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.
Thayumanavar S.
On 8/29/05, Garcia J=E9r=E9mie <GARCIAJ@3il.fr> wrote:
> Hi everybody, I have to port a vxWorks appz to Linux Montavista running o=
n a powerPC 405EP based architecture.
> In this one, we use the following vxWorks system call: cacheDmaMalloc( ) =
whose man page is :
>=20
> NAME
> cacheDmaMalloc( ) - allocate a cache-safe buffer for DMA devices and d=
rivers
>=20
> SYNOPSIS
> void * cacheDmaMalloc
> (
> size_t bytes /* number of bytes to allocate */
> )
>=20
> DESCRIPTION
> This routine returns a pointer to a section of memory that will not ex=
perience any cache coherency problems. Function pointers in the CACHE_FUNCS=
structure provide access to DMA support routines.
>=20
> RETURNS
> A pointer to the cache-safe buffer, or NULL.
>=20
>=20
> 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 con=
straints?
>=20
> Tks a lot for your precious help!
>=20
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive: http://mail.nl.linux.org/kernelnewbies/
> FAQ: http://kernelnewbies.org/faq/
>=20
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-08-29 9:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-29 9:16 Allocating a cache-safe buffer for DMA devices and drivers Garcia Jérémie
2005-08-29 9:30 ` Thayumanavar Sachithanantham
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).