
This needs to be merged up to the correct place in the tree.

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

 memhotplug-dave/mm/page_alloc.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletion(-)

diff -puN mm/page_alloc.c~K4-swap_remove_compilefixes mm/page_alloc.c
--- memhotplug/mm/page_alloc.c~K4-swap_remove_compilefixes	2005-04-13 14:21:02.000000000 -0700
+++ memhotplug-dave/mm/page_alloc.c	2005-04-13 14:21:02.000000000 -0700
@@ -386,6 +386,8 @@ static inline void capture_pages(struct 
 		clear_page_under_capture(&page[i]);
 	page_zone(page)->present_pages -= (1UL << order);
 	totalram_pages -= (1UL << order);
+	if (PageHighMem(page))
+		totalhigh_pages -= (1UL << order);
 }
 
 static inline int test_remove_range(struct page *page, struct page *base,
@@ -646,6 +648,9 @@ void mark_free_pages(struct zone *zone)
 	}
 	spin_unlock_irqrestore(&zone->lock, flags);
 }
+#endif /* CONFIG_PM */
+
+#if defined(CONFIG_PM) || defined(CONFIG_MEMORY_HOTPLUG)
 
 /*
  * Spill all of this CPU's per-cpu pages back into the buddy allocator.
@@ -658,7 +663,7 @@ void drain_local_pages(void)
 	__drain_pages(smp_processor_id());
 	local_irq_restore(flags);	
 }
-#endif /* CONFIG_PM */
+#endif /* CONFIG_PM  || CONFIG_MEMORY_HOTPLUG */
 
 #ifdef CONFIG_MEMORY_HOTPLUG
 static inline int first_uncaptured_page(unsigned long start_pfn, int nr_pages)
_
