From: Andi Kleen Date: Sat, 25 Mar 2006 15:29:58 +0000 (+0100) Subject: [PATCH] x86_64: Make pfn_valid work early in boot X-Git-Tag: MMI-PSA29.97-13-9~51125 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1f50249e940baa7133e0bdb32cd564bb3ba28456;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git [PATCH] x86_64: Make pfn_valid work early in boot It needs num_physpages, so initialize it early. It's later overwritten again. Signed-off-by: Andi Kleen Signed-off-by: Linus Torvalds --- diff --git a/arch/x86_64/kernel/setup.c b/arch/x86_64/kernel/setup.c index 01e2de4d2540..ad3b7fc24a05 100644 --- a/arch/x86_64/kernel/setup.c +++ b/arch/x86_64/kernel/setup.c @@ -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();