Signed-off-by: Dave Hansen --- memhotplug-dave/mm/Kconfig | 17 +++++++++++++++++ memhotplug-dave/mm/mmigrate.c | 3 ++- 2 files changed, 19 insertions(+), 1 deletion(-) diff -puN mm/Kconfig~AA-PM-07.1-memory_migration-merge mm/Kconfig --- memhotplug/mm/Kconfig~AA-PM-07.1-memory_migration-merge 2005-07-28 13:50:35.000000000 -0700 +++ memhotplug-dave/mm/Kconfig 2005-07-28 13:50:35.000000000 -0700 @@ -119,3 +119,20 @@ config MEMORY_HOTPLUG comment "Memory hotplug is currently incompatible with Software Suspend" depends on SPARSEMEM && HOTPLUG && SOFTWARE_SUSPEND +*************** +*** 110,112 **** + config MEMORY_MIGRATE + select SWAP + bool "Memory migration" +--- 110,120 ---- + config MEMORY_MIGRATE + select SWAP + bool "Memory migration" + default y if MEMORY_HOTPLUG + +config MEMORY_REMOVE + bool "Allow for memory hot-remove" + depends on MEMORY_HOTPLUG && MEMORY_MIGRATE && (X86 && !X86_64) + help + Enabling this option allows you to hot-remove highmem zones + on i386 systems. The i386 depenence is a hack for now. diff -puN mm/mmigrate.c~AA-PM-07.1-memory_migration-merge mm/mmigrate.c --- memhotplug/mm/mmigrate.c~AA-PM-07.1-memory_migration-merge 2005-07-28 13:50:35.000000000 -0700 +++ memhotplug-dave/mm/mmigrate.c 2005-07-28 13:50:35.000000000 -0700 @@ -310,7 +310,8 @@ migrate_onepage(struct page *page) * Allocate a new page with the same gfp_mask * as the target page has. */ - if ((newpage = page_cache_alloc(mapping)) == NULL) { + newpage = page_cache_alloc(mapping); + if (newpage == NULL) { unlock_page(page); return ERR_PTR(-ENOMEM); } _