[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080904165852I.fujita.tomonori@lab.ntt.co.jp>
Date: Thu, 4 Sep 2008 16:58:37 +0900
From: FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
To: andi@...stfloor.org
Cc: fujita.tomonori@....ntt.co.jp, joerg.roedel@....com,
mingo@...hat.com, tglx@...utronix.de, hpa@...or.com,
linux-kernel@...r.kernel.org, iommu@...ts.linux-foundation.org,
kamezawa.hiroyu@...fujitsu.com, tony.luck@...el.com
Subject: Re: [PATCH] swiotlb: fix dma_alloc_coherent allocation failures
with swiotlb
On Thu, 4 Sep 2008 09:44:41 +0200
Andi Kleen <andi@...stfloor.org> wrote:
> On Thu, Sep 04, 2008 at 01:11:47PM +0900, FUJITA Tomonori wrote:
> > On Thu, 04 Sep 2008 00:09:51 +0200
> > Andi Kleen <andi@...stfloor.org> wrote:
> >
> > > Joerg Roedel <joerg.roedel@....com> writes:
> > >
> > > > The SWIOTLB version of dma_alloc_coherent allocates all memory with
> > > > GFP_DMA unconditionally. This leads sometimes unnecessary to allocation
> > > > failures. This patch makes the allocation strategy to use the DMA32 zone
> > > > first if this is possible. The changes are boot tested on AMD64 and
> > > > compile tested for i386 and IA64.
> > >
> > > The high level dma_alloc_coherent() does that anyways.
> >
> > The high level dma_alloc_coherent means the tricks in
> > arch/x86/pci-dma.c? If so, all the tricks has gone in tip/master.
>
> Seems wrong -- that is something that is needed by multiple
> IOMMUs. Pretty much all which work with real memory instead
> of virtual mappings.
Not all the IOMMUs need the old tricks used in arch/x86/pci-dma.c.
The latest IOMMUs always need virtual mappings. They should handle
dev->dma_mask properly like POWER IOMMU does (IIRC VT-d code does the
right thing).
--
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