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.


_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to