
Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
---

 memhotplug-dave/include/linux/nonlinear.h |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff -puN include/linux/nonlinear.h~E1-use-__boot-nonlinear include/linux/nonlinear.h
--- memhotplug/include/linux/nonlinear.h~E1-use-__boot-nonlinear	2004-12-10 13:52:37.000000000 -0800
+++ memhotplug-dave/include/linux/nonlinear.h	2004-12-10 13:52:37.000000000 -0800
@@ -89,8 +89,10 @@ static inline unsigned long
 __pa(const void *ptr_addr)
 {
 	unsigned long addr = (unsigned long)ptr_addr;
-	BUG_ON(mem_section[addr_to_section(addr-PAGE_OFFSET)].phys_section == INVALID_SECTION);
-	return section_to_addr(mem_section[addr_to_section(addr-PAGE_OFFSET)].phys_section) |
+	unsigned long section = addr_to_section(__boot_pa(addr));
+
+	BUG_ON(mem_section[section].phys_section == INVALID_SECTION);
+	return section_to_addr(mem_section[section].phys_section) |
 		section_offset(addr);
 }
 
@@ -98,8 +100,8 @@ static inline void *
 __va(const unsigned long addr)
 {
 	BUG_ON(phys_section[addr_to_section(addr)] == INVALID_PHYS_SECTION);
-	return (void *)(section_to_addr(phys_section[addr_to_section(addr)]) |
-		section_offset(addr)) + PAGE_OFFSET;
+	return __boot_va(section_to_addr(phys_section[addr_to_section(addr)]) |
+		         section_offset(addr));
 }
 
 extern struct page *pfn_to_page(unsigned long pfn);
_
