public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Dan Malek <dan@embeddededge•com>
To: paulus@samba•org
Cc: Armin Kuster <akuster@mvista•com>,
	ppcdevel <linuxppc-dev@lists•linuxppc.org>
Subject: Re: New API for non cache coherent ppc cpu's
Date: Thu, 22 Nov 2001 18:07:12 -0500	[thread overview]
Message-ID: <3BFD8520.5060105@embeddededge.com> (raw)
In-Reply-To: 15357.26322.107051.143144@cargo.ozlabs.ibm.com


Paul Mackerras wrote:


> If we have to have a consistent_sync_page, it should be purely a local
> function in our implementation of the official DMA mapping API - see
> Documentation/DMA-mapping.txt.

That's exactly what it is.  We are not creating a new API, and it shouldn't
have been described as such.

> ....  Drivers should be using functions such
> as pci_alloc_consistent, pci_map_single, pci_dma_sync_single,
> pci_unmap_single, etc.  The implementation of those routines should do
> the correct cache flushing - if it doesn't then we need to fix it.

They do.  Recently a pci_sync_page was added for some reason (because
Linux doesn't have a real VM implementation I guess :-).  We just needed
to add the underlying function to support it.  I think it popped up in
one of the SCSI drivers.

> If you're talking about non-PCI devices, use the pci DMA API but just
> pass NULL for the dev (we need to make sure that will work ok on the
> non-cache-coherent cpus).

Ummm....I don't normally do this because using these functions requires
the CONFIG_PCI option, which isn't supported or has bad effects when
requested on processors that don't have PCI.  For non-PCI devices,
I call the consistent_* functions, which other architectures support
and do as well.  So, we kind of have a common interface here for non-PCI
devices as well.

I stole all of this cache coherency stuff from ARM and Sparc (or MIPS,
I don't remember) when I did it the first time.

Thanks.


	-- Dan


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

  reply	other threads:[~2001-11-22 23:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-20 20:13 New API for non cache coherent ppc cpu's Armin Kuster
2001-11-21 11:15 ` Roman Zippel
2001-11-21 18:29   ` Armin Kuster
2001-11-21 20:20     ` Roman Zippel
2001-11-22 20:57 ` Paul Mackerras
2001-11-22 23:07   ` Dan Malek [this message]
2001-11-22 23:54     ` Roman Zippel
2001-11-23  1:32     ` Paul Mackerras
2001-11-23 16:08       ` Dan Malek
2001-11-22 23:50   ` Roman Zippel
2001-11-23  1:09     ` Paul Mackerras

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=3BFD8520.5060105@embeddededge.com \
    --to=dan@embeddededge$(echo .)com \
    --cc=akuster@mvista$(echo .)com \
    --cc=linuxppc-dev@lists$(echo .)linuxppc.org \
    --cc=paulus@samba$(echo .)org \
    /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