]> err.no Git - linux-2.6/blobdiff - arch/sparc64/mm/init.c
Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
[linux-2.6] / arch / sparc64 / mm / init.c
index 177d8aaeec42e2d147b92617dd308afa9c2baec1..ec3e2c72302a78a66c5da100c892f4328117a7e3 100644 (file)
@@ -160,6 +160,7 @@ extern unsigned int sparc_ramdisk_image;
 extern unsigned int sparc_ramdisk_size;
 
 struct page *mem_map_zero __read_mostly;
+EXPORT_SYMBOL(mem_map_zero);
 
 unsigned int sparc64_highest_unlocked_tlb_ent __read_mostly;
 
@@ -770,6 +771,9 @@ static void __init find_ramdisk(unsigned long phys_base)
                initrd_end = ramdisk_image + sparc_ramdisk_size;
 
                lmb_reserve(initrd_start, initrd_end);
+
+               initrd_start += PAGE_OFFSET;
+               initrd_end += PAGE_OFFSET;
        }
 #endif
 }
@@ -1699,9 +1703,21 @@ void __init paging_init(void)
         * functions like clear_dcache_dirty_cpu use the cpu mask
         * in 13-bit signed-immediate instruction fields.
         */
-       BUILD_BUG_ON(FLAGS_RESERVED != 32);
+
+       /*
+        * Page flags must not reach into upper 32 bits that are used
+        * for the cpu number
+        */
+       BUILD_BUG_ON(NR_PAGEFLAGS > 32);
+
+       /*
+        * The bit fields placed in the high range must not reach below
+        * the 32 bit boundary. Otherwise we cannot place the cpu field
+        * at the 32 bit boundary.
+        */
        BUILD_BUG_ON(SECTIONS_WIDTH + NODES_WIDTH + ZONES_WIDTH +
-                    ilog2(roundup_pow_of_two(NR_CPUS)) > FLAGS_RESERVED);
+               ilog2(roundup_pow_of_two(NR_CPUS)) > 32);
+
        BUILD_BUG_ON(NR_CPUS > 4096);
 
        kern_base = (prom_boot_mapping_phys_low >> 22UL) << 22UL;
@@ -2349,16 +2365,3 @@ void __flush_tlb_all(void)
        __asm__ __volatile__("wrpr      %0, 0, %%pstate"
                             : : "r" (pstate));
 }
-
-#ifdef CONFIG_MEMORY_HOTPLUG
-
-void online_page(struct page *page)
-{
-       ClearPageReserved(page);
-       init_page_count(page);
-       __free_page(page);
-       totalram_pages++;
-       num_physpages++;
-}
-
-#endif /* CONFIG_MEMORY_HOTPLUG */