From 8654164f54bd02787ae91db8526dcae8e7e34eeb Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Thu, 14 Jan 2010 03:14:53 -0800 Subject: 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 Signed-off-by: David S. Miller --- arch/sparc/include/asm/io_32.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/sparc/include/asm/io_32.h') 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 /* IO address mapping routines need this */ #include -#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) { -- cgit v1.2.3-59-g8ed1b