public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale•com>
To: rmcguire@videopresence•com
Cc: linuxppc-embedded@ozlabs•org
Subject: Re: 1MB alignment dma_alloc question
Date: Fri, 05 Sep 2008 16:30:33 -0500	[thread overview]
Message-ID: <48C1A4F9.50909@freescale.com> (raw)
In-Reply-To: <CBF4EB06A92A4901B32659109487513E@absolutdaddy>

Russell McGuire wrote:
> Putting together a driver, IMA for ATM in a MPC83xx. Anyway the manual
> states that one of the data structures for the QE needs to be allocated on a
> 1MB boundary in external memory.
> 
> Normally these come in 128/64/32byte boundaries and are easy to self align,
> with some bit logic. However, after reading up on dma_alloc_coherent I see
> that a limitation is that dma cannot span 64K page boundaries.

That sounds like something related to legacy PC DMA.  I doubt there's 
any such limitation in the API itself.

> So this begs a question is their a better way to get a 1MB aligned table?
> Other than allocating almost 2MB of memory and then trying to mask off the
> LSBs? Seems like an awful waste of memory. I guess the real question is
> there a better kernel call that returns already aligned DMA memory?

It looks like allocations will be naturally aligned on powerpc (due to 
coming straight from alloc_pages), though it's probably not guaranteed 
by the API.

-Scott

  reply	other threads:[~2008-09-05 21:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1.1220580004.22796.linuxppc-embedded@ozlabs.org>
2008-09-05 21:11 ` 1MB alignment dma_alloc question Russell McGuire
2008-09-05 21:30   ` Scott Wood [this message]
2008-09-05 21:31   ` Arnd Bergmann

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=48C1A4F9.50909@freescale.com \
    --to=scottwood@freescale$(echo .)com \
    --cc=linuxppc-embedded@ozlabs$(echo .)org \
    --cc=rmcguire@videopresence$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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