From: "David S. Miller" <davem@redhat.com>
To: ink@jurassic.park.msu.ru
Cc: jgarzik@mandrakesoft.com, andrew.grover@intel.com,
mochel@osdl.org, Greg@kroah.com, linux-kernel@vger.kernel.org
Subject: Re: pci segments/domains
Date: Fri, 17 May 2002 04:41:57 -0700 (PDT) [thread overview]
Message-ID: <20020517.044157.34125224.davem@redhat.com> (raw)
In-Reply-To: <20020517153903.A24121@jurassic.park.msu.ru>
From: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Date: Fri, 17 May 2002 15:39:03 +0400
What about
dma_addr_t pci_to_pci_map_single(struct pci_dev *master,
struct pci_dev *target,
dma_addr_t tgt_addr, size_t size, int dir)
Could be implemented without much pain if there is enough interest. :-)
tgt_addr does not make any sense, we are trying to DMA to a device
resource, so pass a "struct resource *" and "unsigned long res_offset"
instead of tgt_addr.
So, as a (real life) example, suppose you wanted to portably point
your BTTV card at the framebuffer of a video card, you'd do
something like:
res = fb_pdev->resource[1];
res_off = OFFSET_INTO_FRAMEBUFFER;
bttv_dma_addr = pci_to_pci_map_single(struct pci_dev *bttv_pdev,
struct pci_dev *fb_pdev,
res, res_off, size,
PCI_DMA_FROMDEVICE);
Note the direction is in terms of the master. The DMA is coming
"from" the master in this "BTTV capture to framebuffer" case.
next prev parent reply other threads:[~2002-05-17 11:55 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-14 2:07 pci segments/domains Grover, Andrew
2002-05-14 2:08 ` David S. Miller
2002-05-16 19:33 ` Jeff Garzik
2002-05-17 1:31 ` David S. Miller
2002-05-16 23:10 ` Pavel Machek
2002-05-17 10:47 ` Ivan Kokshaysky
2002-05-17 10:40 ` David S. Miller
2002-05-17 11:11 ` Ivan Kokshaysky
2002-05-17 11:04 ` David S. Miller
2002-05-17 11:39 ` Ivan Kokshaysky
2002-05-17 11:41 ` David S. Miller [this message]
2002-05-17 12:26 ` Ivan Kokshaysky
2002-05-17 12:15 ` David S. Miller
2002-05-17 14:24 ` Jeff Garzik
2002-05-17 14:16 ` David S. Miller
2002-05-17 14:33 ` Jeff Garzik
2002-05-17 14:26 ` David S. Miller
2002-05-17 14:42 ` Jeff Garzik
2002-05-17 16:24 ` Ivan Kokshaysky
2002-05-17 16:53 ` David S. Miller
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=20020517.044157.34125224.davem@redhat.com \
--to=davem@redhat.com \
--cc=Greg@kroah.com \
--cc=andrew.grover@intel.com \
--cc=ink@jurassic.park.msu.ru \
--cc=jgarzik@mandrakesoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mochel@osdl.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.