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/mm/init.c b/arch/arm/mm/init.c
index 42d340a..2cff9aa 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -750,26 +750,17 @@
int arch_physical_active_memory(u64 start, u64 size)
{
- unsigned long start_pfn = start >> PAGE_SHIFT;
- unsigned long nr_pages = size >> PAGE_SHIFT;
-
- return platform_physical_active_pages(start_pfn, nr_pages);
+ return platform_physical_active_pages(start, size);
}
int arch_physical_remove_memory(u64 start, u64 size)
{
- unsigned long start_pfn = start >> PAGE_SHIFT;
- unsigned long nr_pages = size >> PAGE_SHIFT;
-
- return platform_physical_remove_pages(start_pfn, nr_pages);
+ return platform_physical_remove_pages(start, size);
}
int arch_physical_low_power_memory(u64 start, u64 size)
{
- unsigned long start_pfn = start >> PAGE_SHIFT;
- unsigned long nr_pages = size >> PAGE_SHIFT;
-
- return platform_physical_low_power_pages(start_pfn, nr_pages);
+ return platform_physical_low_power_pages(start, size);
}
#endif