From: Joerg Roedel <joro@8bytes.org>
To: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: mingo@elte.hu, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/8] add map_page and unmap_page to struct dma_mapping_ops
Date: Mon, 5 Jan 2009 18:28:59 +0100 [thread overview]
Message-ID: <20090105172859.GC14298@8bytes.org> (raw)
In-Reply-To: <20090105172608.GB14298@8bytes.org>
On Mon, Jan 05, 2009 at 06:26:08PM +0100, Joerg Roedel wrote:
> On Mon, Jan 05, 2009 at 11:47:21PM +0900, FUJITA Tomonori wrote:
> > This patch adds map_page and unmap_page to struct dma_mapping_ops.
> >
> > This is a preparation of struct dma_mapping_ops unification. We use
> > map_page and unmap_page instead of map_single and unmap_single.
> >
> > We will remove map_single and unmap_single hooks in the last patch in
> > this patchset.
> >
> > Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
> > ---
> > arch/x86/include/asm/dma-mapping.h | 8 ++++++++
> > 1 files changed, 8 insertions(+), 0 deletions(-)
> >
> > diff --git a/arch/x86/include/asm/dma-mapping.h b/arch/x86/include/asm/dma-mapping.h
> > index e93265c..2f89d2e 100644
> > --- a/arch/x86/include/asm/dma-mapping.h
> > +++ b/arch/x86/include/asm/dma-mapping.h
> > @@ -8,6 +8,7 @@
> >
> > #include <linux/kmemcheck.h>
> > #include <linux/scatterlist.h>
> > +#include <linux/dma-attrs.h>
> > #include <asm/io.h>
> > #include <asm/swiotlb.h>
> > #include <asm-generic/dma-coherent.h>
> > @@ -51,6 +52,13 @@ struct dma_mapping_ops {
> > void (*unmap_sg)(struct device *hwdev,
> > struct scatterlist *sg, int nents,
> > int direction);
> > + dma_addr_t (*map_page)(struct device *dev, struct page *page,
> > + unsigned long offset, size_t size,
> > + enum dma_data_direction dir,
> > + struct dma_attrs *attrs);
> > + void (*unmap_page)(struct device *dev, dma_addr_t dma_handle,
> > + size_t size, enum dma_data_direction dir,
> > + struct dma_attrs *attrs);
>
> Why do we need an offset into the page? The name suggests that this
> function maps a whole page so the offset should be irrelevant.
Ah, just saw it. Forget this stupid question :)
next prev parent reply other threads:[~2009-01-05 17:29 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-05 14:47 [PATCH 0/13] x86: unifying ways to handle multiple sets of dma mapping ops FUJITA Tomonori
2009-01-05 14:47 ` [PATCH 1/8] add map_page and unmap_page to struct dma_mapping_ops FUJITA Tomonori
2009-01-05 14:47 ` [PATCH 2/8] swiotlb: add map_page and unmap_page FUJITA Tomonori
2009-01-05 14:47 ` [PATCH 3/8] gart: " FUJITA Tomonori
2009-01-05 14:47 ` [PATCH 4/8] calgary: " FUJITA Tomonori
2009-01-05 14:47 ` [PATCH 5/8] AMD IOMMU: " FUJITA Tomonori
2009-01-05 14:47 ` [PATCH 6/8] intel-iommu: " FUJITA Tomonori
2009-01-05 14:47 ` [PATCH 7/8] pci-nommu: add map_page FUJITA Tomonori
2009-01-05 14:47 ` [PATCH 8/8] remove map_single and unmap_single in struct dma_mapping_ops FUJITA Tomonori
2009-01-05 18:00 ` Joerg Roedel
2009-01-06 10:22 ` FUJITA Tomonori
2009-01-06 8:32 ` [PATCH 4/8] calgary: add map_page and unmap_page Muli Ben-Yehuda
2009-01-06 13:07 ` Ingo Molnar
2009-01-05 17:26 ` [PATCH 1/8] add map_page and unmap_page to struct dma_mapping_ops Joerg Roedel
2009-01-05 17:28 ` Joerg Roedel [this message]
2009-01-05 15:00 ` [PATCH 0/13] x86: unifying ways to handle multiple sets of dma mapping ops 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=20090105172859.GC14298@8bytes.org \
--to=joro@8bytes.org \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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;
as well as URLs for NNTP newsgroup(s).