Drivers like NVMe need to be able to determine the page size used for DMA transfers. Add a new API that defaults to return PAGE_SHIFT on all architectures.
Signed-off-by: Nishanth Aravamudan <n...@linux.vnet.ibm.com> diff --git a/include/asm-generic/dma-mapping-common.h b/include/asm-generic/dma-mapping-common.h index b1bc954..86e4e97 100644 --- a/include/asm-generic/dma-mapping-common.h +++ b/include/asm-generic/dma-mapping-common.h @@ -355,4 +355,11 @@ static inline int dma_set_mask(struct device *dev, u64 mask) } #endif +#ifndef HAVE_ARCH_DMA_GET_PAGE_SHIFT +static inline unsigned long dma_get_page_shift(struct device *dev) +{ + return PAGE_SHIFT; +} +#endif + #endif -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/