public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk@arm.linux.org.uk>
To: Deepak Saxena <dsaxena@mvista.com>
Cc: Jeff Garzik <jgarzik@pobox.com>,
	"Dmitry A. Fedorov" <D.A.Fedorov@inp.nsk.su>,
	linux-kernel@vger.kernel.org
Subject: Re: Proposal: Eliminate GFP_DMA
Date: Fri, 28 Feb 2003 19:52:10 +0000	[thread overview]
Message-ID: <20030228195210.C10968@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20030228181729.GA8366@xanadu.az.mvista.com>; from dsaxena@mvista.com on Fri, Feb 28, 2003 at 11:17:29AM -0700

On Fri, Feb 28, 2003 at 11:17:29AM -0700, Deepak Saxena wrote:
> This discussion raises an issue that I've been meaning to bring up for
> a bit.  Currently, the DMA-API is defined as returning a cpu physical
> address [1]

The DMA-API should reflect the same as the PCI-DMA API, namely:

|  pci_alloc_consistent returns two values: the virtual address which you
|  can use to access it from the CPU and dma_handle which you pass to the
|  card.

Translated: not a physical address.  "Physical" address to me means
the address that appears on the outside of the CPU after it has passed
through the MMU and is heading for the local CPUs system RAM.

So yes, I think this is a bug that exists in the DMA-API document.

It must be an offsetable cookie that the card on its own bus knows how
to deal with to access the memory associated with the mapping.  In plain
speak, the bus address for that device.

> One easy answer is to provide bus-specific bus_map/unmap/etc functions
> such as is done with PCI, but this seems rather ugly to me as now every
> custom bus needs a new set of functions which IMNHO defeats the purpose
> of a Generic DMA API.

You can do this today with the API - test dev->bus_type to determine
the type of the bus, convert to the correct device type and grab the
bus information.

The API hasn't really changed - its just that bugs exist in the
documentation that need fixing before 2.6 comes out.  Submit a
patch. 8)

-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html


  parent reply	other threads:[~2003-02-28 19:41 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20030228064631.G23865@parcelfarce.linux.theplanet.co.uk.suse.lists.linux.kernel>
2003-02-28  8:56 ` Proposal: Eliminate GFP_DMA Andi Kleen
2003-02-28 14:12   ` Matthew Wilcox
2003-02-28 15:24     ` Alan Cox
2003-02-28 14:34       ` Matthew Wilcox
2003-02-28 15:55         ` Alan Cox
2003-02-28 14:56           ` Andi Kleen
2003-02-28 15:25             ` Jeff Garzik
2003-02-28 15:30               ` Andi Kleen
2003-02-28 15:34               ` Martin J. Bligh
2003-02-28 15:49                 ` Eli Carter
2003-02-28 16:03                   ` Russell King
2003-02-28 16:45                 ` Alan Cox
2003-02-28 15:31             ` Arjan van de Ven
2003-03-04 17:56           ` Rogier Wolff
2003-03-04 23:09             ` Alan Cox
2003-03-05  7:43               ` Rogier Wolff
2003-03-05 13:53                 ` Alan Cox
2003-02-28 15:44       ` Dmitry A. Fedorov
2003-02-28 15:58         ` Jeff Garzik
2003-02-28 18:17           ` Deepak Saxena
2003-02-28 18:27             ` Deepak Saxena
2003-02-28 19:52             ` Russell King [this message]
     [not found]           ` <mailman.1046456425.7772.linux-kernel2news@redhat.com>
2003-02-28 20:51             ` Pete Zaitcev
2003-02-28 22:11               ` Russell King
2003-02-28 16:05         ` Russell King
2003-02-28 17:27           ` Ivan Kokshaysky
2003-02-28 17:45         ` Alan Cox
2003-02-28  6:46 Matthew Wilcox

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=20030228195210.C10968@flint.arm.linux.org.uk \
    --to=rmk@arm.linux.org.uk \
    --cc=D.A.Fedorov@inp.nsk.su \
    --cc=dsaxena@mvista.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.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