[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080822001238F.fujita.tomonori@lab.ntt.co.jp>
Date: Fri, 22 Aug 2008 00:12:09 +0900
From: FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
To: mingo@...e.hu
Cc: joerg.roedel@....com, jbarnes@...tuousgeek.org, mingo@...hat.com,
tglx@...utronix.de, hpa@...or.com, linux-kernel@...r.kernel.org,
iommu@...ts.linux-foundation.org, muli@...ibm.com
Subject: Re: [PATCH 0/8] x86 dma_*_coherent rework patchset v2
On Thu, 21 Aug 2008 23:16:50 +0900
FUJITA Tomonori <fujita.tomonori@....ntt.co.jp> wrote:
> On Wed, 20 Aug 2008 11:46:12 +0200
> Ingo Molnar <mingo@...e.hu> wrote:
>
> >
> > * Joerg Roedel <joerg.roedel@....com> wrote:
> >
> > > Hi,
> > >
> > > this patchset reworks the dma_*_coherent functions in the DMA layer
> > > for the x86 architecture. The patch series extends the existing DMA
> > > backends with missing *coherent callbacks and simplifies the generic
> > > function to basically only call the registered backend. This allows
> > > future optimizations in hardware specific IOMMU implementations. The
> > > code ist tested on AMD64 with AMD IOMMU, GART, SWIOTLB and NOMMU as
> > > well as on my old 486 box. Muli tested the Calgary specific patch.
> > >
> > > Joerg
> > >
> > > Changes since v1:
> > >
> > > - fixed wrong logic in the pci-nommu alloc_coherent code
> > > - moved dma_*_coherent to include/asm-x86/dma-mapping.h
> > >
> > > git diff --stat tip/master.. :
> > >
> > > arch/x86/kernel/amd_iommu.c | 2 -
> > > arch/x86/kernel/pci-calgary_64.c | 14 ++++
> > > arch/x86/kernel/pci-dma.c | 146 +-------------------------------------
> > > arch/x86/kernel/pci-gart_64.c | 35 +++++++++-
> > > arch/x86/kernel/pci-nommu.c | 62 ++++++++++++++++
> > > include/asm-x86/dma-mapping.h | 47 ++++++++++---
> > > 6 files changed, 149 insertions(+), 157 deletions(-)
> >
> > applied to tip/x86/iommu - thanks Joerg!
> >
> > Jesse, Fujita-san, do these changes look fine to you?
>
> As I wrote in another mail, GART should return zeroed memory (keeping
> the current behavior is better). Except for it, the patchset looks
> fine.
I think that you can apply the following patch after Joerg's patchset.
=
From: FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
Subject: [PATCH] x86: remove map_simple hook in struct dma_mapping_ops
pci-dma.c doesn't use map_simple hook any more so we can remove it
from struct dma_mapping_ops now.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
---
arch/x86/kernel/pci-gart_64.c | 1 -
include/asm-x86/dma-mapping.h | 3 ---
2 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kernel/pci-gart_64.c b/arch/x86/kernel/pci-gart_64.c
index 10afe97..b3bbe2b 100644
--- a/arch/x86/kernel/pci-gart_64.c
+++ b/arch/x86/kernel/pci-gart_64.c
@@ -720,7 +720,6 @@ extern int agp_amd64_init(void);
static struct dma_mapping_ops gart_dma_ops = {
.map_single = gart_map_single,
- .map_simple = gart_map_simple,
.unmap_single = gart_unmap_single,
.sync_single_for_cpu = NULL,
.sync_single_for_device = NULL,
diff --git a/include/asm-x86/dma-mapping.h b/include/asm-x86/dma-mapping.h
index 8e16095..3a9a6f5 100644
--- a/include/asm-x86/dma-mapping.h
+++ b/include/asm-x86/dma-mapping.h
@@ -26,9 +26,6 @@ struct dma_mapping_ops {
void *vaddr, dma_addr_t dma_handle);
dma_addr_t (*map_single)(struct device *hwdev, phys_addr_t ptr,
size_t size, int direction);
- /* like map_single, but doesn't check the device mask */
- dma_addr_t (*map_simple)(struct device *hwdev, phys_addr_t ptr,
- size_t size, int direction);
void (*unmap_single)(struct device *dev, dma_addr_t addr,
size_t size, int direction);
void (*sync_single_for_cpu)(struct device *hwdev,
--
1.5.5.GIT
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists