All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	fujita.tomonori@lab.ntt.co.jp
Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
	James Bottomley <James.Bottomley@HansenPartnership.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Julia Lawall <julia@diku.dk>
Subject: Re: should struct device.dma_mask still be a pointer?
Date: Wed, 30 Jun 2010 14:07:04 -0400	[thread overview]
Message-ID: <20100630180704.GD16488@phenom.dumpdata.com> (raw)
In-Reply-To: <20100622105233.GA4755@pengutronix.de>

On Tue, Jun 22, 2010 at 12:52:33PM +0200, Uwe Kleine-König wrote:
> Hello,
> 
> IMHO it's strange that struct device.dma_mask is a pointer instead of a
> plain u64.  The reason this was done back then is described in
> 8ab1bc19e974fdebe76c065fe444979c84ba2f74[1]:
> 
> 	Attached is a patch which moves dma_mask into struct device and cleans up the
> 	scsi mid-layer to use it (instead of using struct pci_dev).  The advantage to
> 	doing this is probably most apparent on non-pci bus architectures where
> 	currently you have to construct a fake pci_dev just so you can get the bounce
> 	buffers to work correctly.
> 
> 	The patch tries to perturb the minimum amount of code, so dma_mask in struct
> 	device is simply a pointer to the one in pci_dev.  However, it will make it
> 	easy for me now to add generic device to MCA without having to go the fake pci
> 	route.
> 
> As I work on such a non-pci bus architecture it's still ugly that this
> is a pointer because I have to allocate extra memory for that.
> 
> Is there a reason not to get rid of struct pci_dev.dma_mask and use
> struct pci_dev.dev.dma_mask instead?  (Well apart from the needed
> effort of course.)

Lets CC Fujita. He has been redoing some of the DMA API, and making the
PCI DMA API be used in favour of the old DMA API.

But from the sounds of it for your architecture you need a DMA API, not
a PCI DMA and you want to merge the dma_mask in one? Preferably in the
struct device one?

  reply	other threads:[~2010-06-30 18:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-22 10:52 should struct device.dma_mask still be a pointer? Uwe Kleine-König
2010-06-30 18:07 ` Konrad Rzeszutek Wilk [this message]
2010-07-01  1:35 ` FUJITA Tomonori
2010-11-02 10:41   ` Uwe Kleine-König
2010-11-02 13:03     ` FUJITA Tomonori
2010-11-02 13:45       ` Uwe Kleine-König
2010-11-02 14:43         ` FUJITA Tomonori

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=20100630180704.GD16488@phenom.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=akpm@linux-foundation.org \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=julia@diku.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=u.kleine-koenig@pengutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.