Merge branch 'x86-kdump-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-block.git] / arch / x86 / kernel / setup.c
index dcbdf54fb5c107c3bbcc7d397dee0abe655de55b..bbe35bf879f57e1af06a9105ce7d3f31cbc3f895 100644 (file)
@@ -836,8 +836,14 @@ dump_kernel_offset(struct notifier_block *self, unsigned long v, void *p)
 
 void __init setup_arch(char **cmdline_p)
 {
+       /*
+        * Reserve the memory occupied by the kernel between _text and
+        * __end_of_kernel_reserve symbols. Any kernel sections after the
+        * __end_of_kernel_reserve symbol must be explicitly reserved with a
+        * separate memblock_reserve() or they will be discarded.
+        */
        memblock_reserve(__pa_symbol(_text),
-                        (unsigned long)__bss_stop - (unsigned long)_text);
+                        (unsigned long)__end_of_kernel_reserve - (unsigned long)_text);
 
        /*
         * Make sure page 0 is always reserved because on systems with