LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Russell McGuire" <rmcguire@videopresence.com>
To: <linuxppc-embedded@ozlabs.org>
Subject: 1MB alignment dma_alloc question
Date: Fri, 5 Sep 2008 14:11:31 -0700	[thread overview]
Message-ID: <CBF4EB06A92A4901B32659109487513E@absolutdaddy> (raw)
In-Reply-To: <mailman.1.1220580004.22796.linuxppc-embedded@ozlabs.org>

Anyone,

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.

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?

Thanks,

-Russ

       reply	other threads:[~2008-09-05 21:11 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 ` Russell McGuire [this message]
2008-09-05 21:30   ` 1MB alignment dma_alloc question Scott Wood
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=CBF4EB06A92A4901B32659109487513E@absolutdaddy \
    --to=rmcguire@videopresence.com \
    --cc=linuxppc-embedded@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