/* Looks at a memory address and categorizes it. */
DMA_MemType_t dma_mem_type(void *addr)
/* Looks at a memory address and categorizes it. */
DMA_MemType_t dma_mem_type(void *addr)
{
	unsigned long addrVal = (unsigned long)addr;
	if (addrVal >= VMALLOC_END) {
		return DMA_MEM_TYPE_DMA;
	}
	if (is_vmalloc_addr(addr)) {
		return DMA_MEM_TYPE_VMALLOC;
	}
	if (addrVal >= PAGE_OFFSET) {
		return DMA_MEM_TYPE_KMALLOC;
	}
	return DMA_MEM_TYPE_USER;
}