From 7aed3b34fb0a98e89d0e999f5833ceebdb3876b9 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Fri, 7 May 2010 17:58:55 +0900 Subject: sh: shuffle the elfcorehdr handling over to the crash dump code. The elfcorehdr parsing was just tossed in setup.c, but nothing outside of the crash dump code/vmcore bits require it, so we just move it out of the way, as per ppc. Signed-off-by: Paul Mundt --- arch/sh/kernel/crash_dump.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'arch/sh/kernel/crash_dump.c') diff --git a/arch/sh/kernel/crash_dump.c b/arch/sh/kernel/crash_dump.c index 95d216255565..37c97d444576 100644 --- a/arch/sh/kernel/crash_dump.c +++ b/arch/sh/kernel/crash_dump.c @@ -4,7 +4,6 @@ * Created by: Hariprasad Nellitheertha (hari@in.ibm.com) * Copyright (C) IBM Corporation, 2004. All rights reserved */ - #include #include #include @@ -13,6 +12,25 @@ /* Stores the physical address of elf header of crash image. */ unsigned long long elfcorehdr_addr = ELFCORE_ADDR_MAX; +/* + * Note: elfcorehdr_addr is not just limited to vmcore. It is also used by + * is_kdump_kernel() to determine if we are booting after a panic. Hence + * ifdef it under CONFIG_CRASH_DUMP and not CONFIG_PROC_VMCORE. + * + * elfcorehdr= specifies the location of elf core header + * stored by the crashed kernel. + */ +static int __init parse_elfcorehdr(char *arg) +{ + if (!arg) + return -EINVAL; + + elfcorehdr_addr = memparse(arg, &arg); + + return 0; +} +early_param("elfcorehdr", parse_elfcorehdr); + /** * copy_oldmem_page - copy one page from "oldmem" * @pfn: page frame number to be copied -- cgit