]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] run page_address_init() earlier
authorAndrew Morton <akpm@osdl.org>
Thu, 1 Apr 2004 05:52:20 +0000 (21:52 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 1 Apr 2004 05:52:20 +0000 (21:52 -0800)
If someone runs page_address() before page_address_init(), the kernel locks
up over uninitialised spinlocks.

This only happens with the 4:4 patch, but it is more robust to run
page_address_init() before setup_arch().  page_address_init() simply
initialises statically allocated storage.

init/main.c

index 07f94366efcada5c796f4019beac18fda4c0d715..9d1ed1de14c56026659b261e1e39dc70d3886837 100644 (file)
@@ -409,6 +409,7 @@ asmlinkage void __init start_kernel(void)
  * enable them
  */
        lock_kernel();
+       page_address_init();
        printk(linux_banner);
        setup_arch(&command_line);
        setup_per_cpu_areas();
@@ -452,7 +453,6 @@ asmlinkage void __init start_kernel(void)
                initrd_start = 0;
        }
 #endif
-       page_address_init();
        mem_init();
        kmem_cache_init();
        if (late_time_init)