ARM: integrator: allow Integrator to be built with highmem
authorRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 25 Oct 2009 22:42:38 +0000 (22:42 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 25 Oct 2009 22:44:30 +0000 (22:44 +0000)
This fixes Integrator builds with highmem enabled; we need to
translate from 'struct page' to a DMA address, and this is not
possible without __pfn_to_bus().

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-integrator/include/mach/memory.h

index 2b2e7a110724b12aa0f8c07a576e4474a2ca8603..4891828454f5fdca8c72f5146633e2e5a362c204 100644 (file)
@@ -28,5 +28,6 @@
 #define BUS_OFFSET     UL(0x80000000)
 #define __virt_to_bus(x)       ((x) - PAGE_OFFSET + BUS_OFFSET)
 #define __bus_to_virt(x)       ((x) - BUS_OFFSET + PAGE_OFFSET)
+#define __pfn_to_bus(x)                (((x) << PAGE_SHIFT) + BUS_OFFSET)
 
 #endif