[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080506003104.4717D19B8050@mail213-sin.bigfish.com>
Date: Mon, 5 May 2008 17:31:07 -0700
From: "Stephen Neuendorffer" <stephen.neuendorffer@...inx.com>
To: "John Williams" <john.williams@...alogix.com>
Cc: <arnd@...db.de>, <linux-arch@...r.kernel.org>,
"John Linn" <linnj@...inx.com>, <matthew@....cx>,
<will.newton@...il.com>, <drepper@...hat.com>,
<microblaze-uclinux@...e.uq.edu.au>, <grant.likely@...retlab.ca>,
"Michal Simek" <monstr@...str.eu>, <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH] Microblaze: implement dma-coherent API andrefactorcache flush code.
> -----Original Message-----
> From: John Williams [mailto:john.williams@...alogix.com]
> Sent: Monday, May 05, 2008 5:15 PM
> To: Stephen Neuendorffer
> Cc: arnd@...db.de; linux-arch@...r.kernel.org; John Linn;
matthew@....cx; will.newton@...il.com;
> drepper@...hat.com; microblaze-uclinux@...e.uq.edu.au;
grant.likely@...retlab.ca; Michal Simek;
> linux-kernel@...r.kernel.org
> Subject: RE: [PATCH] Microblaze: implement dma-coherent API
andrefactorcache flush code.
>
>
> > > Does the DMA API insist upon the dma_cache_sync call to guarantee
> > > sensible results? If so, your implementation looks fine. If not,
> > then
> > > the results will clearly be bogus as there's nothing magical about
the
> > > memory being allocated in dma_alloc.
> >
> > Yes, in fact this is one of the keys to getting the lltemac driver
to
> > work right. see Documentation/DMA-API.txt
> >
> > > To that end, can it just call kmalloc(), and similarly kfree() for
> > > dma_free?
> >
> > My understanding is that on other architectures (x86, for instance)
> > 'dma' memory ensures other things, like it's accessible in PCI
memory
> > space. On microblaze, there's nothing really special about dma
memory,
> > but you get the API as a chunk.
>
> Sure - what I meant is can dma_alloc just call kmalloc to do it's
work?
I scanned through Linux Device Drivers, and it appears that calling
get_free_pages is:
1) more efficient than kmalloc for large allocations
2) allocates physically contiguous memory, which kmalloc doesn't
necessarily do if there's an mmu.
Steve
--
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