Message ID | 20130701170941.GC24642@n2100.arm.linux.org.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Monday 01 July 2013 01:09 PM, Russell King - ARM Linux wrote: > On Mon, Jul 01, 2013 at 10:14:45AM -0400, Santosh Shilimkar wrote: >> I have been also carrying similar patch as yours in an attempt >> to make LPAE kernel work on ARM. Your patch carries better >> description, so will your version and include in my series >> which I plan to post on the list after some more testing. >> Will copy you. The changes are very similar to your series. > > And will you try to investigate and/or address my concerns with this > change? > Sure. Will try to look and come back to you. Regards, Santosh
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index 48ef6f5..a083724 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h @@ -153,6 +153,13 @@ static inline int dma_set_seg_boundary(struct device *dev, unsigned long mask) return -EIO; } +#ifndef dma_max_pfn +static inline unsigned long dma_max_pfn(struct device *dev) +{ + return dev->dma_mask ? (*dev->dma_mask >> PAGE_SHIFT) : 0; +} +#endif + static inline void *dma_zalloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flag) {