Merge branch 'drm-patches' of master.kernel.org:/pub/scm/linux/kernel/git/airlied...
[linux-drm-fsl-dcu.git] / arch / powerpc / mm / init_32.c
index 7d0d75c11848ec7ca0e1c8b0468e7958e47a1331..5fce6ccecb8dee301d98e5ca97c7d9290a5540d9 100644 (file)
@@ -18,7 +18,6 @@
  *
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/sched.h>
 #include <linux/kernel.h>
@@ -116,6 +115,10 @@ void MMU_setup(void)
        if (strstr(cmd_line, "noltlbs")) {
                __map_without_ltlbs = 1;
        }
+#ifdef CONFIG_DEBUG_PAGEALLOC
+       __map_without_bats = 1;
+       __map_without_ltlbs = 1;
+#endif
 }
 
 /*
@@ -216,7 +219,7 @@ static void free_sec(unsigned long start, unsigned long end, const char *name)
 
        while (start < end) {
                ClearPageReserved(virt_to_page(start));
-               set_page_count(virt_to_page(start), 1);
+               init_page_count(virt_to_page(start));
                free_page(start);
                cnt++;
                start += PAGE_SIZE;
@@ -248,7 +251,7 @@ void free_initrd_mem(unsigned long start, unsigned long end)
                printk ("Freeing initrd memory: %ldk freed\n", (end - start) >> 10);
        for (; start < end; start += PAGE_SIZE) {
                ClearPageReserved(virt_to_page(start));
-               set_page_count(virt_to_page(start), 1);
+               init_page_count(virt_to_page(start));
                free_page(start);
                totalram_pages++;
        }