]> err.no Git - linux-2.6/blobdiff - arch/powerpc/mm/init_64.c
Merge branches 'at91', 'dyntick', 'ep93xx', 'iop', 'ixp', 'misc', 'orion', 'omap...
[linux-2.6] / arch / powerpc / mm / init_64.c
index d9c82d3d64821d4ed15fa48ec745ebb39d9fccb8..6aa65375abf5919ce2b02c0efe309dd8d39c893c 100644 (file)
 #include <linux/nodemask.h>
 #include <linux/module.h>
 #include <linux/poison.h>
+#include <linux/lmb.h>
 
 #include <asm/pgalloc.h>
 #include <asm/page.h>
 #include <asm/prom.h>
-#include <asm/lmb.h>
 #include <asm/rtas.h>
 #include <asm/io.h>
 #include <asm/mmu_context.h>
 
 #include "mmu_decl.h"
 
-#ifdef DEBUG
-#define DBG(fmt...) printk(fmt)
-#else
-#define DBG(fmt...)
-#endif
-
 #if PGTABLE_RANGE > USER_VSID_RANGE
 #warning Limited user VSID range means pagetable space is wasted
 #endif
@@ -80,8 +74,8 @@
 #warning TASK_SIZE is smaller than it needs to be.
 #endif
 
-/* max amount of RAM to use */
-unsigned long __max_memory;
+phys_addr_t memstart_addr = ~0;
+phys_addr_t kernstart_addr;
 
 void free_initmem(void)
 {
@@ -130,7 +124,7 @@ static int __init setup_kcore(void)
                /* GFP_ATOMIC to avoid might_sleep warnings during boot */
                kcore_mem = kmalloc(sizeof(struct kcore_list), GFP_ATOMIC);
                if (!kcore_mem)
-                       panic("%s: kmalloc failed\n", __FUNCTION__);
+                       panic("%s: kmalloc failed\n", __func__);
 
                kclist_add(kcore_mem, __va(base), size);
        }
@@ -175,8 +169,8 @@ void pgtable_cache_init(void)
                int size = pgtable_cache_size[i];
                const char *name = pgtable_cache_name[i];
 
-               DBG("Allocating page table cache %s (#%d) "
-                   "for size: %08x...\n", name, i, size);
+               pr_debug("Allocating page table cache %s (#%d) "
+                       "for size: %08x...\n", name, i, size);
                pgtable_cache[i] = kmem_cache_create(name,
                                                     size, size,
                                                     SLAB_PANIC,
@@ -216,12 +210,12 @@ int __meminit vmemmap_populated(unsigned long start, int page_size)
 }
 
 int __meminit vmemmap_populate(struct page *start_page,
-                                       unsigned long nr_pages, int node)
+                              unsigned long nr_pages, int node)
 {
        unsigned long mode_rw;
        unsigned long start = (unsigned long)start_page;
        unsigned long end = (unsigned long)(start_page + nr_pages);
-       unsigned long page_size = 1 << mmu_psize_defs[mmu_linear_psize].shift;
+       unsigned long page_size = 1 << mmu_psize_defs[mmu_vmemmap_psize].shift;
 
        mode_rw = _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_COHERENT | PP_RWXX;
 
@@ -239,15 +233,15 @@ int __meminit vmemmap_populate(struct page *start_page,
                if (!p)
                        return -ENOMEM;
 
-               printk(KERN_WARNING "vmemmap %08lx allocated at %p, "
-                                   "physical %08lx.\n", start, p, __pa(p));
+               pr_debug("vmemmap %08lx allocated at %p, physical %08lx.\n",
+                       start, p, __pa(p));
 
                mapped = htab_bolt_mapping(start, start + page_size,
-                                       __pa(p), mode_rw, mmu_linear_psize,
+                                       __pa(p), mode_rw, mmu_vmemmap_psize,
                                        mmu_kernel_ssize);
                BUG_ON(mapped < 0);
        }
 
        return 0;
 }
-#endif
+#endif /* CONFIG_SPARSEMEM_VMEMMAP */