diff options
| -rw-r--r-- | arch/arm/kernel/setup.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 714cbaaab3aa..2183bb83ac83 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | #include <linux/screen_info.h> | 20 | #include <linux/screen_info.h> |
| 21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
| 22 | #include <linux/kexec.h> | 22 | #include <linux/kexec.h> |
| 23 | #include <linux/crash_dump.h> | ||
| 23 | #include <linux/root_dev.h> | 24 | #include <linux/root_dev.h> |
| 24 | #include <linux/cpu.h> | 25 | #include <linux/cpu.h> |
| 25 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
| @@ -730,6 +731,30 @@ static void __init reserve_crashkernel(void) | |||
| 730 | static inline void reserve_crashkernel(void) {} | 731 | static inline void reserve_crashkernel(void) {} |
| 731 | #endif /* CONFIG_KEXEC */ | 732 | #endif /* CONFIG_KEXEC */ |
| 732 | 733 | ||
| 734 | /* | ||
| 735 | * Note: elfcorehdr_addr is not just limited to vmcore. It is also used by | ||
| 736 | * is_kdump_kernel() to determine if we are booting after a panic. Hence | ||
| 737 | * ifdef it under CONFIG_CRASH_DUMP and not CONFIG_PROC_VMCORE. | ||
| 738 | */ | ||
| 739 | |||
| 740 | #ifdef CONFIG_CRASH_DUMP | ||
| 741 | /* | ||
| 742 | * elfcorehdr= specifies the location of elf core header stored by the crashed | ||
| 743 | * kernel. This option will be passed by kexec loader to the capture kernel. | ||
| 744 | */ | ||
| 745 | static int __init setup_elfcorehdr(char *arg) | ||
| 746 | { | ||
| 747 | char *end; | ||
| 748 | |||
| 749 | if (!arg) | ||
| 750 | return -EINVAL; | ||
| 751 | |||
| 752 | elfcorehdr_addr = memparse(arg, &end); | ||
| 753 | return end > arg ? 0 : -EINVAL; | ||
| 754 | } | ||
| 755 | early_param("elfcorehdr", setup_elfcorehdr); | ||
| 756 | #endif /* CONFIG_CRASH_DUMP */ | ||
| 757 | |||
| 733 | void __init setup_arch(char **cmdline_p) | 758 | void __init setup_arch(char **cmdline_p) |
| 734 | { | 759 | { |
| 735 | struct tag *tags = (struct tag *)&init_tags; | 760 | struct tag *tags = (struct tag *)&init_tags; |
