lkml.org 
[lkml]   [2008]   [May]   [15]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateFri, 16 May 2008 12:44:52 +0900
SubjectRe: [PATCH 2/2] x86: per-device dma_mapping_ops support
FromFUJITA Tomonori <>
On Thu, 15 May 2008 13:45:58 -0700
"Yinghai Lu" <yhlu.kernel@gmail.com> wrote:

> On Mon, May 12, 2008 at 11:04 PM, FUJITA Tomonori
> <fujita.tomonori@lab.ntt.co.jp> wrote:
> > This adds per-device dma_mapping_ops support for CONFIG_X86_64.
> >
> > A pointer to dma_mapping_ops to struct dev_archdata is added. If the
> > pointer is non NULL, DMA operations in asm/dma-mapping.h use it. If
> > it's NULL, the system-wide dma_ops pointer is used as before.
> >
> > Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
> > ---
> >  arch/x86/kernel/pci-calgary_64.c |    2 +-
> >  arch/x86/kernel/pci-dma.c        |    2 +-
> >  arch/x86/kernel/pci-gart_64.c    |    2 +-
> >  arch/x86/kernel/pci-nommu.c      |   14 +-----
> >  arch/x86/kernel/pci-swiotlb_64.c |    2 +-
> >  include/asm-x86/device.h         |    3 +
> >  include/asm-x86/dma-mapping.h    |   95 ++++++++++++++++++++++++++------------
> >  7 files changed, 74 insertions(+), 46 deletions(-)

(snip)

> do you have other patch to assign value to dma_ops for every device?
> it is always NULL at this time.

Not yet.

As I said, I plan to implement a mechanism to register a hook called
when a new pci (or dma capable) device is created. It enables IOMMUs
to set up an appropriate dma_mapping_ops per device:

http://lkml.org/lkml/2008/5/14/519

But I wanted to make sure whether per-device dma_ops is useful for
everyone.


\
 
 \ /
  Last update: 2008-05-16 05:49    [from the cache]
©2003-2008