|
@@ -874,7 +874,7 @@ check_pages_isolated(unsigned long start_pfn, unsigned long end_pfn)
|
|
|
return offlined;
|
|
|
}
|
|
|
|
|
|
-static int __ref offline_pages(unsigned long start_pfn,
|
|
|
+static int __ref __offline_pages(unsigned long start_pfn,
|
|
|
unsigned long end_pfn, unsigned long timeout)
|
|
|
{
|
|
|
unsigned long pfn, nr_pages, expire;
|
|
@@ -1007,15 +1007,24 @@ out:
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
+int offline_pages(unsigned long start_pfn, unsigned long nr_pages)
|
|
|
+{
|
|
|
+ return __offline_pages(start_pfn, start_pfn + nr_pages, 120 * HZ);
|
|
|
+}
|
|
|
+
|
|
|
int remove_memory(u64 start, u64 size)
|
|
|
{
|
|
|
unsigned long start_pfn, end_pfn;
|
|
|
|
|
|
start_pfn = PFN_DOWN(start);
|
|
|
end_pfn = start_pfn + PFN_DOWN(size);
|
|
|
- return offline_pages(start_pfn, end_pfn, 120 * HZ);
|
|
|
+ return __offline_pages(start_pfn, end_pfn, 120 * HZ);
|
|
|
}
|
|
|
#else
|
|
|
+int offline_pages(unsigned long start_pfn, unsigned long nr_pages)
|
|
|
+{
|
|
|
+ return -EINVAL;
|
|
|
+}
|
|
|
int remove_memory(u64 start, u64 size)
|
|
|
{
|
|
|
return -EINVAL;
|