[PATCH 1/2] powerpc: rename get_dma_direct_offset get_dma_offset

Benjamin Herrenschmidt benh at kernel.crashing.org
Mon Sep 21 15:19:50 EST 2009


On Wed, 2009-09-02 at 17:23 -0500, Becky Bruce wrote:

>  #ifdef CONFIG_NOT_COHERENT_CACHE
>  /*
> @@ -90,6 +89,14 @@ static inline void set_dma_ops(struct device *dev, struct dma_map_ops *ops)
>  	dev->archdata.dma_ops = ops;
>  }
>  
> +static inline unsigned long get_dma_offset(struct device *dev)
> +{
> +	if (dev)
> +		return (unsigned long)dev->archdata.dma_data;
> +
> +	return PCI_DRAM_OFFSET;
> +}

My main objection here is that this makes it look "too" generic ... it
only works for direct and swiotlb, not iommu. Maybe not a big deal but
I think at least there should be a comment explaining what it is and
when it can be used in the header.

Cheers,
Ben.




More information about the Linuxppc-dev mailing list