From: Yasunori Goto I found old unsuitable interfaces for memory hotplug in 2.6.13-mm3. The third argument of sparse_add_one_section() was changed from mem_map to nr_pages. And the third argument of add/remove_memory() was removed. However, both still remain at a few place. Signed-off-by: Yasunori Goto Cc: Dave Hansen Signed-off-by: Andrew Morton --- drivers/acpi/acpi_memhotplug.c | 5 ++--- mm/memory_hotplug.c | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff -puN drivers/acpi/acpi_memhotplug.c~memory-hotplug-move-section_mem_map-alloc-to-sparsec-fix drivers/acpi/acpi_memhotplug.c --- devel/drivers/acpi/acpi_memhotplug.c~memory-hotplug-move-section_mem_map-alloc-to-sparsec-fix 2005-09-15 18:54:17.000000000 -0700 +++ devel-akpm/drivers/acpi/acpi_memhotplug.c 2005-09-15 18:54:17.000000000 -0700 @@ -200,8 +200,7 @@ static int acpi_memory_enable_device(str * Note: Assume that this function returns zero on success */ result = add_memory(mem_device->start_addr, - (mem_device->end_addr - mem_device->start_addr) + 1, - mem_device->read_write_attribute); + (mem_device->end_addr - mem_device->start_addr) + 1); if (result) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "\nadd_memory failed\n")); mem_device->state = MEMORY_INVALID_STATE; @@ -259,7 +258,7 @@ static int acpi_memory_disable_device(st * Ask the VM to offline this memory range. * Note: Assume that this function returns zero on success */ - result = remove_memory(start, len, attr); + result = remove_memory(start, len); if (result) { ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Hot-Remove failed.\n")); return_VALUE(result); diff -puN mm/memory_hotplug.c~memory-hotplug-move-section_mem_map-alloc-to-sparsec-fix mm/memory_hotplug.c --- devel/mm/memory_hotplug.c~memory-hotplug-move-section_mem_map-alloc-to-sparsec-fix 2005-09-15 18:54:17.000000000 -0700 +++ devel-akpm/mm/memory_hotplug.c 2005-09-15 18:54:17.000000000 -0700 @@ -39,15 +39,14 @@ static void __add_zone(struct zone *zone } extern int sparse_add_one_section(struct zone *zone, unsigned long start_pfn, - struct page *mem_map); + int nr_pages); static int __add_section(struct zone *zone, unsigned long phys_start_pfn) { struct pglist_data *pgdat = zone->zone_pgdat; int nr_pages = PAGES_PER_SECTION; - struct page *memmap; int ret; - ret = sparse_add_one_section(zone, phys_start_pfn, memmap); + ret = sparse_add_one_section(zone, phys_start_pfn, nr_pages); if (ret < 0) return ret; _