/* DMA memory allocation, derived from pci_alloc_consistent. However, the Au1000 data cache is coherent (when programmed so), therefore we return KSEG0 address, not KSEG1.  */
static void * dma_alloc(size_t, dma_addr_t *)
/* DMA memory allocation, derived from pci_alloc_consistent. However, the Au1000 data cache is coherent (when programmed so), therefore we return KSEG0 address, not KSEG1.  */
static void * dma_alloc(size_t, dma_addr_t *)
{
	void *ret;
	int gfp = GFP_ATOMIC | GFP_DMA;
	ret = (void *) __get_free_pages(gfp, get_order(size));
	if (ret != NULL) {
		memset(ret, 0, size);
		*dma_handle = virt_to_bus(ret);
		ret = (void *)KSEG0ADDR(ret);
	}
	return ret;
}