linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Xavier Grave <grave@ipno.in2p3.fr>
To: ppc dev <linuxppc-dev@ozlabs.org>
Subject: [Fwd: Re: Allocating a cache-safe buffer for DMA devices and drivers]
Date: Mon, 29 Aug 2005 11:32:48 +0200	[thread overview]
Message-ID: <1125307968.5440.15.camel@ipnnarval> (raw)

[-- Attachment #1: Type: text/plain, Size: 23 bytes --]

Sorry, forgot to cc...

[-- Attachment #2: Message transféré - Re: Allocating a cache-safe buffer for DMA devices and drivers --]
[-- Type: message/rfc822, Size: 1847 bytes --]

From: Xavier Grave <grave@ipno.in2p3.fr>
To: "Garcia Jérémie" <GARCIAJ@3il.fr>
Subject: Re: Allocating a cache-safe buffer for DMA devices and drivers
Date: Mon, 29 Aug 2005 11:31:48 +0200
Message-ID: <1125307903.5440.13.camel@ipnnarval>

Hi,

Something like that maybe :

 virtual_ad = (unsigned long *) kmalloc(sizeof(long)*taille_dma,
                                         GFP_KERNEL|GFP_DMA|GFP_ATOMIC);

O+ xavier

Le lundi 29 août 2005 à 11:16 +0200, Garcia Jérémie a écrit :
> 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. 
> 
> 
> 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
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev

                 reply	other threads:[~2005-08-29 10:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1125307968.5440.15.camel@ipnnarval \
    --to=grave@ipno.in2p3.fr \
    --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).