From: Russell King <rmk@arm.linux.org.uk>
To: James Bottomley <James.Bottomley@steeleye.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [RFT][PATCH] generic device DMA implementation
Date: Sat, 28 Dec 2002 18:14:38 +0000 [thread overview]
Message-ID: <20021228181438.B5217@flint.arm.linux.org.uk> (raw)
In-Reply-To: <200212180301.gBI31wE06794@localhost.localdomain>; from James.Bottomley@steeleye.com on Tue, Dec 17, 2002 at 09:01:57PM -0600
I've just been working through the ARM dma stuff, converting it to the
new API, and I foudn this:
> +static inline int
> +pci_dma_supported(struct pci_dev *hwdev, u64 mask)
> +{
> + return dma_supported(&hwdev->dev, mask);
> +}
> (etc)
I'll now pull out a bit from DMA-mapping.txt:
| Using Consistent DMA mappings.
|
| To allocate and map large (PAGE_SIZE or so) consistent DMA regions,
| you should do:
|
| dma_addr_t dma_handle;
|
| cpu_addr = pci_alloc_consistent(dev, size, &dma_handle);
|
| where dev is a struct pci_dev *. You should pass NULL for PCI like buses
| where devices don't have struct pci_dev (like ISA, EISA). This may be
| called in interrupt context.
What happens to &hwdev->dev when you do as detailed there and pass NULL
into these "compatibility" functions? Probably an oops.
I think these "compatibility" functions need to do:
static inline xxx
pci_xxx(struct pci_dev *hwdev, ...)
{
dma_xxxx(hwdev ? &hwdev->dev : NULL, ...)
}
so they remain correct to existing API users expectations.
--
Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html
next prev parent reply other threads:[~2002-12-28 18:06 UTC|newest]
Thread overview: 120+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-18 3:01 [RFT][PATCH] generic device DMA implementation James Bottomley
2002-12-18 3:13 ` David Mosberger
2002-12-28 18:14 ` Russell King [this message]
2002-12-28 18:19 ` James Bottomley
-- strict thread matches above, loose matches on Subject: below --
2002-12-28 22:19 Adam J. Richter
2002-12-30 23:23 ` David Brownell
2002-12-28 20:11 Adam J. Richter
2002-12-28 15:41 Adam J. Richter
2002-12-28 16:59 ` David Brownell
2002-12-28 3:39 Adam J. Richter
2002-12-30 0:45 ` Alan Cox
2002-12-28 2:48 Adam J. Richter
2002-12-28 15:05 ` David Brownell
2002-12-27 22:57 Manfred Spraul
2002-12-27 23:55 ` James Bottomley
2002-12-28 0:20 ` Manfred Spraul
2002-12-28 16:26 ` James Bottomley
2002-12-28 17:54 ` Manfred Spraul
2002-12-28 18:13 ` James Bottomley
2002-12-28 18:25 ` Manfred Spraul
2002-12-28 18:40 ` James Bottomley
2002-12-28 20:05 ` Manfred Spraul
2002-12-27 20:21 David Brownell
2002-12-27 21:40 ` James Bottomley
2002-12-28 1:29 ` David Brownell
2002-12-28 16:18 ` James Bottomley
2002-12-28 18:16 ` David Brownell
2002-12-28 1:56 ` David Brownell
2002-12-28 16:13 ` James Bottomley
2002-12-28 17:41 ` David Brownell
2002-12-27 21:47 ` James Bottomley
2002-12-28 2:28 ` David Brownell
2002-12-04 17:47 [RFC] " James Bottomley
2002-12-04 18:27 ` Jeff Garzik
2002-12-04 19:36 ` James Bottomley
2002-12-04 21:19 ` Miles Bader
2002-12-04 21:21 ` Miles Bader
2002-12-04 21:42 ` James Bottomley
2002-12-05 5:44 ` Miles Bader
2002-12-04 21:46 ` James Bottomley
2002-12-05 2:31 ` Miles Bader
2002-12-05 3:06 ` James Bottomley
2002-12-05 5:02 ` David Gibson
2002-12-05 11:15 ` Benjamin Herrenschmidt
2002-12-05 11:16 ` William Lee Irwin III
2002-12-05 15:12 ` James Bottomley
2002-12-05 0:47 ` David Gibson
2002-12-05 0:54 ` Jeff Garzik
2002-12-05 1:44 ` James Bottomley
2002-12-05 2:38 ` David Gibson
2002-12-05 3:13 ` James Bottomley
2002-12-05 5:05 ` David Gibson
2002-12-05 15:03 ` James Bottomley
2002-12-05 23:54 ` David Gibson
2002-12-05 3:17 ` Miles Bader
2002-12-05 6:06 ` David Gibson
2002-12-05 6:43 ` Miles Bader
2002-12-05 23:44 ` David Gibson
2002-12-06 2:23 ` Miles Bader
2002-12-05 3:41 ` Jeff Garzik
2002-12-05 6:04 ` David Gibson
2002-12-05 16:29 ` Jeff Garzik
2002-12-05 23:59 ` David Gibson
2002-12-05 11:08 ` Benjamin Herrenschmidt
2002-12-05 11:35 ` Russell King
2002-12-05 15:24 ` James Bottomley
2002-12-06 0:01 ` David Gibson
2002-11-09 4:51 [parisc-linux] Untested port of parisc_device to generic device interface Adam J. Richter
2002-11-09 5:21 ` Matthew Wilcox
2002-11-09 6:03 ` Greg KH
2002-11-09 15:33 ` J.E.J. Bottomley
2002-11-09 15:33 ` J.E.J. Bottomley
2002-11-09 15:33 ` J.E.J. Bottomley
2002-11-13 6:13 ` Greg KH
2002-11-13 7:46 ` Miles Bader
2002-11-13 7:52 ` Greg KH
2002-11-13 8:02 ` Miles Bader
2002-11-13 8:02 ` Miles Bader
2002-11-13 8:10 ` Greg KH
2002-11-13 8:10 ` Greg KH
2002-11-13 8:26 ` Miles Bader
2002-11-13 8:26 ` Miles Bader
2002-11-13 8:25 ` Greg KH
2002-11-13 8:25 ` Greg KH
2002-11-13 9:05 ` Miles Bader
2002-11-13 9:05 ` Miles Bader
2002-11-13 20:13 ` Grant Grundler
2002-11-13 20:13 ` Grant Grundler
2002-11-13 20:21 ` J.E.J. Bottomley
2002-11-13 20:21 ` J.E.J. Bottomley
2002-11-13 20:21 ` J.E.J. Bottomley
2002-11-13 20:37 ` Grant Grundler
2002-11-13 20:37 ` Grant Grundler
2002-11-13 11:59 ` Ivan Kokshaysky
2002-11-13 12:36 ` Marc Zyngier
2002-11-13 12:36 ` Marc Zyngier
2002-11-13 11:59 ` Ivan Kokshaysky
2002-11-13 16:32 ` Bjorn Helgaas
2002-11-13 16:32 ` Bjorn Helgaas
2002-11-13 17:23 ` J.E.J. Bottomley
2002-11-13 17:23 ` J.E.J. Bottomley
2002-11-13 20:33 ` Grant Grundler
2002-11-13 20:33 ` Grant Grundler
2002-11-13 20:44 ` J.E.J. Bottomley
2002-11-13 20:44 ` J.E.J. Bottomley
2002-11-13 21:42 ` Grant Grundler
2002-11-13 21:42 ` Grant Grundler
2002-11-13 20:44 ` J.E.J. Bottomley
2002-11-13 17:23 ` J.E.J. Bottomley
2002-11-13 20:12 ` Grant Grundler
2002-11-13 20:12 ` Grant Grundler
2002-11-13 7:52 ` Greg KH
2002-11-13 7:46 ` Miles Bader
2002-11-13 6:13 ` Greg KH
2002-11-09 6:03 ` Greg KH
2002-11-09 7:58 ` Marc Zyngier
2002-11-09 7:58 ` Marc Zyngier
2002-11-09 5:21 ` Matthew Wilcox
2002-11-09 18:04 ` Grant Grundler
2002-11-09 18:04 ` Grant Grundler
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=20021228181438.B5217@flint.arm.linux.org.uk \
--to=rmk@arm.linux.org.uk \
--cc=James.Bottomley@steeleye.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 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.