linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Thayumanavar Sachithanantham <thayumker@gmail.com>
To: "Garcia Jérémie" <GARCIAJ@3il.fr>
Cc: kernelnewbies@nl.linux.org, linuxppc-dev@ozlabs.org
Subject: Re: Allocating a cache-safe buffer for DMA devices and drivers
Date: Mon, 29 Aug 2005 15:00:06 +0530	[thread overview]
Message-ID: <3865cb8505082902305bdf368d@mail.gmail.com> (raw)
In-Reply-To: <D4FDDD1349B5AC46B68FC26AD8AF42D6226B4D@exnet.3il.fr>

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
>

      reply	other threads:[~2005-08-29  9:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3865cb8505082902305bdf368d@mail.gmail.com \
    --to=thayumker@gmail.com \
    --cc=GARCIAJ@3il.fr \
    --cc=kernelnewbies@nl.linux.org \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).