Re: [openib-general] [PATCH 08/22] Generic ehca headers

From: Christoph Hellwig
Date: Sat Feb 18 2006 - 10:07:25 EST


On Fri, Feb 17, 2006 at 04:57:23PM -0800, Roland Dreier wrote:
> From: Roland Dreier <rolandd@xxxxxxxxx>
>
> The defines of TRUE and FALSE look rather useless. Why are they needed?
>
> What is struct ehca_cache for? It doesn't seem to be used anywhere.
>
> ehca_kv_to_g() looks completely horrible. The whole idea of using
> vmalloc()ed kernel memory to do DMA seems unacceptable to me.

When you want to do scatter-gather dma on kernel-virtual contingous
areas allocate the pages individually and map them into kva using
vmap(). Then dma can be performed using dma_map_page, or in case
you have lots of pages dma_map_sg after creating an S/G list.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/