Re: [PATCH] sparc: use asm-generic/scatterlist.h

From: Arnd Bergmann
Date: Tue Mar 02 2010 - 07:03:44 EST

On Tuesday 02 March 2010, FUJITA Tomonori wrote:
> If we go with such approach, then we could use something like the
> following. There are only two kinds of scatterlist definitions (use
> dma_length or not) so we can cover all the architectures.
> diff --git a/include/asm-generic/scatterlist.h b/include/asm-generic/scatterlist.h
> index 8b94544..1bf620d 100644
> --- a/include/asm-generic/scatterlist.h
> +++ b/include/asm-generic/scatterlist.h
> @@ -11,7 +11,9 @@ struct scatterlist {
> unsigned int offset;
> unsigned int length;
> dma_addr_t dma_address;
> unsigned int dma_length;
> +#endif
> };

Yes, that sounds good. If the only reason to need dma_length is virtual merging,
a clearer (from the Kconfig perspective, not from the implementation) name
might be CONFIG_HAVE_IOMMU_VMERGE, similar to the CONFIG_IOMMU_VMERGE option
on PPC64 that determines the default for the virtual merging runtime option.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at