arm: make memory power routines conform to current generic API
The various routines to change memory power state used
in physical memory hotplug and hotremove used to take
a start pfn and a number of pages and return 1 for success
and 0 for failure.
The generic API these are called from now takes a start address
and size and returns a byte count of memory powered on or
off, so the ARM and platform specific routines should as well.
Signed-off-by: Larry Bassel <lbassel@codeaurora.org>
diff --git a/arch/arm/mach-msm/memory.c b/arch/arm/mach-msm/memory.c
index 25afc95..2d01795 100644
--- a/arch/arm/mach-msm/memory.c
+++ b/arch/arm/mach-msm/memory.c
@@ -194,30 +194,27 @@
return (void *)addr;
}
-int (*change_memory_power)(unsigned long, unsigned long, int);
+int (*change_memory_power)(u64, u64, int);
-int platform_physical_remove_pages(unsigned long start_pfn,
- unsigned long nr_pages)
+int platform_physical_remove_pages(u64 start, u64 size)
{
if (!change_memory_power)
return 0;
- return change_memory_power(start_pfn, nr_pages, MEMORY_DEEP_POWERDOWN);
+ return change_memory_power(start, size, MEMORY_DEEP_POWERDOWN);
}
-int platform_physical_active_pages(unsigned long start_pfn,
- unsigned long nr_pages)
+int platform_physical_active_pages(u64 start, u64 size)
{
if (!change_memory_power)
return 0;
- return change_memory_power(start_pfn, nr_pages, MEMORY_ACTIVE);
+ return change_memory_power(start, size, MEMORY_ACTIVE);
}
-int platform_physical_low_power_pages(unsigned long start_pfn,
- unsigned long nr_pages)
+int platform_physical_low_power_pages(u64 start, u64 size)
{
if (!change_memory_power)
return 0;
- return change_memory_power(start_pfn, nr_pages, MEMORY_SELF_REFRESH);
+ return change_memory_power(start, size, MEMORY_SELF_REFRESH);
}
char *memtype_name[] = {