linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Matt Porter <mporter@kernel.crashing.org>
To: Conor McLoughlin <cml3227@eircom.net>
Cc: linuxppc-embedded <linuxppc-embedded@ozlabs.org>
Subject: Re: Does kmalloc on MPC82xx work correctly with GFP_DMA?
Date: Tue, 19 Oct 2004 07:27:54 -0700	[thread overview]
Message-ID: <20041019072754.A29957@home.com> (raw)
In-Reply-To: <41738D27.4060007@eircom.net>; from cml3227@eircom.net on Mon, Oct 18, 2004 at 10:30:15AM +0100

On Mon, Oct 18, 2004 at 10:30:15AM +0100, Conor McLoughlin wrote:
> I have been looking at the ethernet device driver (fcc_enet) for the
> mpc82xx platform. This allocates buffer descriptors using kmalloc with
> the GFP_DMA flag. As far as I can see on my platform, this allocates

GFP_DMA has no meaning on PPC. All memory is DMAable.  GFP_DMA is for
PeeCees with a limited ISA DMA space.  Drivers should be using GFP_KERNEL
so they don't confuse people.

> from the regular kernel memory (0xCxxxxxxx). As the attributes of this
> block of memory are controlled by the block address translation
> registers, this cannot be DMA safe, can it?

Sure it can. It works with hardware snooping.

> Is there something I am missing here?

Yes, it's a 603e core and hardware snooping support manages cache
coherency between system memory and devices.

-Matt

      parent reply	other threads:[~2004-10-19 14:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-18  4:01 SCC UART hang Jeff Angielski
2004-10-18  9:30 ` Does kmalloc on MPC82xx work correctly with GFP_DMA? Conor McLoughlin
2004-10-18 15:31   ` Dan Malek
2004-10-19  8:36     ` Conor McLoughlin
2004-10-19 14:15       ` Dan Malek
2004-10-19 15:26         ` Conor McLoughlin
2004-10-19 14:31     ` Matt Porter
2004-10-19 14:27   ` Matt Porter [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=20041019072754.A29957@home.com \
    --to=mporter@kernel.crashing.org \
    --cc=cml3227@eircom.net \
    --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;
as well as URLs for NNTP newsgroup(s).