[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20081122212439C.fujita.tomonori@lab.ntt.co.jp>
Date: Sat, 22 Nov 2008 21:28:00 +0900
From: FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
To: joerg.roedel@....com
Cc: joro@...tes.org, netdev@...r.kernel.org, tglx@...utronix.de,
mingo@...hat.com, linux-kernel@...r.kernel.org,
iommu@...ts.linux-foundation.org
Subject: Re: [PATCH 03/10] x86: add initialization code for DMA-API
debugging
On Sat, 22 Nov 2008 19:16:05 +0900
FUJITA Tomonori <fujita.tomonori@....ntt.co.jp> wrote:
> On Sat, 22 Nov 2008 10:40:32 +0100
> Joerg Roedel <joro@...tes.org> wrote:
>
> > > > +static int hash_fn(struct dma_debug_entry *entry)
> > > > +{
> > > > + /*
> > > > + * Hash function is based on the dma address.
> > > > + * We use bits 20-27 here as the index into the hash
> > > > + */
> > > > + BUG_ON(entry->dev_addr == bad_dma_address);
> > >
> > > 'bad_dma_address' is x86 specific. You already found it though.
> >
> > Interesting. Is there another value for dma_addr_t which drivers can
> > check for to find out if a dma-api operation failed?
>
> They are architecture dependent. But only X86 uses a variable because
> of GART and swiotlb, I think.
BTW, this code doesn't work even on x86 (swiotlb). dma_map_error
should be used, which is an architecture-independent way to test a dma
address.
--
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