aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2010-05-07 04:58:55 -0400
committerPaul Mundt <lethal@linux-sh.org>2010-05-07 04:58:55 -0400
commit7aed3b34fb0a98e89d0e999f5833ceebdb3876b9 (patch)
treedbf3eb56fe9ad5a42523d1f207443d8ef3fdae78 /arch
parentaa424bbb8cf5f7f3c6a70065bcb28a6e6af7897d (diff)
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 <lethal@linux-sh.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/sh/kernel/crash_dump.c20
-rw-r--r--arch/sh/kernel/setup.c19
2 files changed, 19 insertions, 20 deletions
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 @@
4 * Created by: Hariprasad Nellitheertha (hari@in.ibm.com) 4 * Created by: Hariprasad Nellitheertha (hari@in.ibm.com)
5 * Copyright (C) IBM Corporation, 2004. All rights reserved 5 * Copyright (C) IBM Corporation, 2004. All rights reserved
6 */ 6 */
7
8#include <linux/errno.h> 7#include <linux/errno.h>
9#include <linux/crash_dump.h> 8#include <linux/crash_dump.h>
10#include <linux/io.h> 9#include <linux/io.h>
@@ -13,6 +12,25 @@
13/* Stores the physical address of elf header of crash image. */ 12/* Stores the physical address of elf header of crash image. */
14unsigned long long elfcorehdr_addr = ELFCORE_ADDR_MAX; 13unsigned long long elfcorehdr_addr = ELFCORE_ADDR_MAX;
15 14
15/*
16 * Note: elfcorehdr_addr is not just limited to vmcore. It is also used by
17 * is_kdump_kernel() to determine if we are booting after a panic. Hence
18 * ifdef it under CONFIG_CRASH_DUMP and not CONFIG_PROC_VMCORE.
19 *
20 * elfcorehdr= specifies the location of elf core header
21 * stored by the crashed kernel.
22 */
23static int __init parse_elfcorehdr(char *arg)
24{
25 if (!arg)
26 return -EINVAL;
27
28 elfcorehdr_addr = memparse(arg, &arg);
29
30 return 0;
31}
32early_param("elfcorehdr", parse_elfcorehdr);
33
16/** 34/**
17 * copy_oldmem_page - copy one page from "oldmem" 35 * copy_oldmem_page - copy one page from "oldmem"
18 * @pfn: page frame number to be copied 36 * @pfn: page frame number to be copied
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
index 9c7f7811af70..4f1585f41f2b 100644
--- a/arch/sh/kernel/setup.c
+++ b/arch/sh/kernel/setup.c
@@ -380,25 +380,6 @@ static void __init setup_memory(void)
380extern void __init setup_memory(void); 380extern void __init setup_memory(void);
381#endif 381#endif
382 382
383/*
384 * Note: elfcorehdr_addr is not just limited to vmcore. It is also used by
385 * is_kdump_kernel() to determine if we are booting after a panic. Hence
386 * ifdef it under CONFIG_CRASH_DUMP and not CONFIG_PROC_VMCORE.
387 */
388#ifdef CONFIG_CRASH_DUMP
389/* elfcorehdr= specifies the location of elf core header
390 * stored by the crashed kernel.
391 */
392static int __init parse_elfcorehdr(char *arg)
393{
394 if (!arg)
395 return -EINVAL;
396 elfcorehdr_addr = memparse(arg, &arg);
397 return 0;
398}
399early_param("elfcorehdr", parse_elfcorehdr);
400#endif
401
402void __init __attribute__ ((weak)) plat_early_device_setup(void) 383void __init __attribute__ ((weak)) plat_early_device_setup(void)
403{ 384{
404} 385}