]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - mm/page_cgroup.c
Merge branch 'upstream/xen-tracing2' of git://git.kernel.org/pub/scm/linux/kernel...
[mv-sheeva.git] / mm / page_cgroup.c
index 9cb1c44ffc37229619cf6e6b27df483283c02c7c..39d216d535eaed26ff926dbf403de24d744e69a6 100644 (file)
@@ -225,8 +225,8 @@ int __meminit online_page_cgroup(unsigned long start_pfn,
        unsigned long start, end, pfn;
        int fail = 0;
 
-       start = start_pfn & ~(PAGES_PER_SECTION - 1);
-       end = ALIGN(start_pfn + nr_pages, PAGES_PER_SECTION);
+       start = SECTION_ALIGN_DOWN(start_pfn);
+       end = SECTION_ALIGN_UP(start_pfn + nr_pages);
 
        if (nid == -1) {
                /*
@@ -258,8 +258,8 @@ int __meminit offline_page_cgroup(unsigned long start_pfn,
 {
        unsigned long start, end, pfn;
 
-       start = start_pfn & ~(PAGES_PER_SECTION - 1);
-       end = ALIGN(start_pfn + nr_pages, PAGES_PER_SECTION);
+       start = SECTION_ALIGN_DOWN(start_pfn);
+       end = SECTION_ALIGN_UP(start_pfn + nr_pages);
 
        for (pfn = start; pfn < end; pfn += PAGES_PER_SECTION)
                __free_page_cgroup(pfn);