Re: [PATCH 5/6] swiotlb: Make swiotlb bookkeeping functions visiblein the header file.

From: Konrad Rzeszutek Wilk
Date: Tue May 11 2010 - 15:41:27 EST


On Tue, May 11, 2010 at 09:01:29PM +0200, Albert Herranz wrote:
> Konrad Rzeszutek Wilk wrote:
> >>> +extern void *swiotlb_tbl_map_single(struct device *hwdev, phys_addr_t phys,
> >>> + u64 tbl_dma_addr, size_t size,
> >>> + enum dma_data_direction dir);
> >>> +
> >> The phys and tbl_dma_addr arguments in the function prototype are swapped compared to the function definition in patch 1/6.
> >
> > Duh! Thanks for spotting that. Here is a repost of this patch (I've
> > updated the git tree with the one below):
> >
>
> Thanks. That was fast :)
>
> One more thing. Shouldn't be more appropriate to make tbl_dma_addr a dma_addr_t instead of a u64?
> For example, in my case I'm currently using the swiotlb code to overcome some DMA limitations in a 32-bit PowerPC platform.
> In this scenario the dma_addr_t type is defined either as a u64 for 64-bit PowerPC or as a u32 for 32-bit PowerPC.

Good point.

So these two patches (one to replace the PATCH 1/6 and the other to
replace this one), would work then:

I've put the whole tree at:
git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb-2.6.git swiotlb-0.8.1