summaryrefslogtreecommitdiff
path: root/arch/sparc/include/asm/io_32.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-01-14 14:14:53 +0300
committerDavid S. Miller <davem@davemloft.net>2010-01-14 14:14:53 +0300
commit8654164f54bd02787ae91db8526dcae8e7e34eeb (patch)
tree67d523ea1576aa6f9d475415fbb4b766ff6dc94b /arch/sparc/include/asm/io_32.h
parentaf2e7cc27016eadcf3840325aaef59afece3b8f2 (diff)
downloadlinux-8654164f54bd02787ae91db8526dcae8e7e34eeb.tar.xz
sparc32: Fix page_to_phys().
It doesn't account for phys_base like it should, fix by using page_to_pfn(). While we're here, make virt_to_page() use pfn_to_page() as well, so we consistently use the asm/memory-model.h abstractions instead of open-coding memory model assumptions. Tested-by: Kristoffer Glembo <kristoffer@gaisler.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/include/asm/io_32.h')
-rw-r--r--arch/sparc/include/asm/io_32.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sparc/include/asm/io_32.h b/arch/sparc/include/asm/io_32.h
index 93fe21e02c86..679c7504625a 100644
--- a/arch/sparc/include/asm/io_32.h
+++ b/arch/sparc/include/asm/io_32.h
@@ -8,7 +8,7 @@
#include <asm/page.h> /* IO address mapping routines need this */
#include <asm/system.h>
-#define page_to_phys(page) (((page) - mem_map) << PAGE_SHIFT)
+#define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT)
static inline u32 flip_dword (u32 l)
{