Merge branch 'for_linus' of git://git.infradead.org/~dedekind/ubifs-2.6
[pandora-kernel.git] / arch / powerpc / mm / mem.c
index f67e118..1ca2235 100644 (file)
@@ -44,6 +44,7 @@
 #include <asm/btext.h>
 #include <asm/tlb.h>
 #include <asm/sections.h>
+#include <asm/sparsemem.h>
 #include <asm/vdso.h>
 #include <asm/fixmap.h>
 
@@ -151,6 +152,7 @@ out:
        return ret;
 }
 #endif /* CONFIG_MEMORY_HOTREMOVE */
+#endif /* CONFIG_MEMORY_HOTPLUG */
 
 /*
  * walk_memory_resource() needs to make sure there is no holes in a given
@@ -184,8 +186,6 @@ walk_memory_resource(unsigned long start_pfn, unsigned long nr_pages, void *arg,
 }
 EXPORT_SYMBOL_GPL(walk_memory_resource);
 
-#endif /* CONFIG_MEMORY_HOTPLUG */
-
 void show_mem(void)
 {
        unsigned long total = 0, reserved = 0;
@@ -330,7 +330,7 @@ static int __init mark_nonram_nosave(void)
 void __init paging_init(void)
 {
        unsigned long total_ram = lmb_phys_mem_size();
-       unsigned long top_of_ram = lmb_end_of_DRAM();
+       phys_addr_t top_of_ram = lmb_end_of_DRAM();
        unsigned long max_zone_pfns[MAX_NR_ZONES];
 
 #ifdef CONFIG_PPC32
@@ -349,10 +349,10 @@ void __init paging_init(void)
        kmap_prot = PAGE_KERNEL;
 #endif /* CONFIG_HIGHMEM */
 
-       printk(KERN_DEBUG "Top of RAM: 0x%lx, Total RAM: 0x%lx\n",
-              top_of_ram, total_ram);
+       printk(KERN_DEBUG "Top of RAM: 0x%llx, Total RAM: 0x%lx\n",
+              (u64)top_of_ram, total_ram);
        printk(KERN_DEBUG "Memory hole size: %ldMB\n",
-              (top_of_ram - total_ram) >> 20);
+              (long int)((top_of_ram - total_ram) >> 20));
        memset(max_zone_pfns, 0, sizeof(max_zone_pfns));
 #ifdef CONFIG_HIGHMEM
        max_zone_pfns[ZONE_DMA] = lowmem_end_addr >> PAGE_SHIFT;