linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Jörn Engel" <joern@wohnheim.fh-wedel.de>
To: Sachin P <sachinpc@gmail.com>
Cc: Linuxppc-embedded@ozlabs.org
Subject: Re: consistent_alloc() on PPC
Date: Wed, 19 Jan 2005 16:14:56 +0100	[thread overview]
Message-ID: <20050119151456.GA26711@wohnheim.fh-wedel.de> (raw)
In-Reply-To: <66164fbc0501190353265167b0@mail.gmail.com>

On Wed, 19 January 2005 17:23:42 +0530, Sachin P wrote:
> 
> I am facing some problems porting my drivers to the PPC platform . Am
> currently using consistent_alloc() and consistent_free() to
> allocate/free (non-cached) DMA ble memory.
> Is there any function/patch/macro, equivalent to
> phy_to_virt()/virt_to_phy() for memory returned by consistent_alloc()?

Imo not.  I ended up writing a private version of it, along these
lines:

static inline unsigned long private_io_to_bus(void *addr)
{
        return iopa((unsigned long)addr) + offset;
}

Wouldn't hurt if you could generalize it somehow.

Jörn

-- 
Everything should be made as simple as possible, but not simpler.
-- Albert Einstein

  reply	other threads:[~2005-01-19 15:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-19 11:53 consistent_alloc() on PPC Sachin P
2005-01-19 15:14 ` Jörn Engel [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-01-19 11:53 Sachin P
2005-01-19 14:04 ` Matt Porter
2005-01-19 14:10 ` Christoph Hellwig
2005-01-19 14:56   ` Matt Porter
2005-01-20 16:30     ` Sachin P
2005-01-20 18:16       ` Matt Porter

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=20050119151456.GA26711@wohnheim.fh-wedel.de \
    --to=joern@wohnheim.fh-wedel.de \
    --cc=Linuxppc-embedded@ozlabs.org \
    --cc=sachinpc@gmail.com \
    /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).