Commit d9a9855d authored by Simon Horman's avatar Simon Horman Committed by Linus Torvalds

always reserve elfcore header memory in crash kernel

elfcore header memory needs to be reserved in a crash kernel.  This means
that the relevant code should be protected by CONFIG_CRASH_DUMP rather
than CONFIG_PROC_VMCORE.
Signed-off-by: default avatarSimon Horman <horms@verge.net.au>
Cc: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 85a0ee34
...@@ -1335,7 +1335,7 @@ kdump_find_rsvd_region (unsigned long size, struct rsvd_region *r, int n) ...@@ -1335,7 +1335,7 @@ kdump_find_rsvd_region (unsigned long size, struct rsvd_region *r, int n)
} }
#endif #endif
#ifdef CONFIG_PROC_VMCORE #ifdef CONFIG_CRASH_DUMP
/* locate the size find a the descriptor at a certain address */ /* locate the size find a the descriptor at a certain address */
unsigned long __init unsigned long __init
vmcore_find_descriptor_size (unsigned long address) vmcore_find_descriptor_size (unsigned long address)
......
...@@ -352,7 +352,7 @@ reserve_memory (void) ...@@ -352,7 +352,7 @@ reserve_memory (void)
} }
#endif #endif
#ifdef CONFIG_PROC_VMCORE #ifdef CONFIG_CRASH_KERNEL
if (reserve_elfcorehdr(&rsvd_region[n].start, if (reserve_elfcorehdr(&rsvd_region[n].start,
&rsvd_region[n].end) == 0) &rsvd_region[n].end) == 0)
n++; n++;
...@@ -496,9 +496,7 @@ static int __init parse_elfcorehdr(char *arg) ...@@ -496,9 +496,7 @@ static int __init parse_elfcorehdr(char *arg)
return 0; return 0;
} }
early_param("elfcorehdr", parse_elfcorehdr); early_param("elfcorehdr", parse_elfcorehdr);
#endif
#ifdef CONFIG_PROC_VMCORE
int __init reserve_elfcorehdr(unsigned long *start, unsigned long *end) int __init reserve_elfcorehdr(unsigned long *start, unsigned long *end)
{ {
unsigned long length; unsigned long length;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment