From 9eedd96301cad8ab58ee8c1e579677d0a75c2ba1 Mon Sep 17 00:00:00 2001 From: Russell King Date: Mon, 3 Jan 2011 00:00:17 +0000 Subject: ARM: DMA: Replace page_to_dma()/dma_to_page() with pfn_to_dma()/dma_to_pfn() Replace the page_to_dma() and dma_to_page() macros with their PFN equivalents. This allows us to map parts of memory which do not have a struct page allocated to them to bus addresses. This will be used internally by dma_alloc_coherent()/dma_alloc_writecombine(). Build tested on Versatile, OMAP1, IOP13xx and KS8695. Tested-by: Janusz Krzysztofik Signed-off-by: Russell King --- arch/arm/mach-ks8695/include/mach/memory.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'arch/arm/mach-ks8695') diff --git a/arch/arm/mach-ks8695/include/mach/memory.h b/arch/arm/mach-ks8695/include/mach/memory.h index ffa19aae6e05..bace9a681adc 100644 --- a/arch/arm/mach-ks8695/include/mach/memory.h +++ b/arch/arm/mach-ks8695/include/mach/memory.h @@ -35,17 +35,17 @@ extern struct bus_type platform_bus_type; __phys_to_virt(x) : __bus_to_virt(x)); }) #define __arch_virt_to_dma(dev, x) ({ is_lbus_device(dev) ? \ (dma_addr_t)__virt_to_phys(x) : (dma_addr_t)__virt_to_bus(x); }) -#define __arch_page_to_dma(dev, x) \ - ({ dma_addr_t __dma = page_to_phys(page); \ +#define __arch_pfn_to_dma(dev, pfn) \ + ({ dma_addr_t __dma = __pfn_to_phys(pfn); \ if (!is_lbus_device(dev)) \ __dma = __dma - PHYS_OFFSET + KS8695_PCIMEM_PA; \ __dma; }) -#define __arch_dma_to_page(dev, x) \ +#define __arch_dma_to_pfn(dev, x) \ ({ dma_addr_t __dma = x; \ if (!is_lbus_device(dev)) \ __dma += PHYS_OFFSET - KS8695_PCIMEM_PA; \ - phys_to_page(__dma); \ + __phys_to_pfn(__dma); \ }) #endif -- cgit v1.2.3