[PATCH] x86_64: Make pfn_valid work early in boot
authorAndi Kleen <ak@suse.de>
Sat, 25 Mar 2006 15:29:58 +0000 (16:29 +0100)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sat, 25 Mar 2006 17:10:54 +0000 (09:10 -0800)
It needs num_physpages, so initialize it early. It's later overwritten
again.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/x86_64/kernel/setup.c

index 01e2de4d254026ff8089533aae9d46b6c6b372a3..ad3b7fc24a0500360f8f4e10db19f8194775ee36 100644 (file)
@@ -614,6 +614,7 @@ void __init setup_arch(char **cmdline_p)
         * we are rounding upwards:
         */
        end_pfn = e820_end_of_ram();
+       num_physpages = end_pfn;                /* for pfn_valid */
 
        check_efer();