aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel/crash.c
diff options
context:
space:
mode:
authorHorms <horms@verge.net.au>2006-12-12 03:49:03 -0500
committerTony Luck <tony.luck@intel.com>2006-12-12 13:11:00 -0500
commit45a98fc622ae700eed34eb2be00743910d50dbe1 (patch)
treee5e5279c25582a7d26c37af189330318fe0f42dd /arch/ia64/kernel/crash.c
parentadf142e379bd20ad906a7e36f722eaabb3b44b0c (diff)
[IA64] CONFIG_KEXEC/CONFIG_CRASH_DUMP permutations
Actually, on reflection I think that there is a good case for keeping the options separate. I am thinking particularly of people who want a very small crashdump kernel and thus don't want to compile in kexec. The patch below should fix things up so that all valid combinations of KEXEC, CRASH_DUMP and VMCORE compile cleanly - VMCORE depends on CRASH_DUMP which is why I said valid combinations. In a nutshell it just untangles unrelated code and switches around a few defines. Please note that it creats a new file, arch/ia64/kernel/crash_dump.c This is in keeping with the i386 implementation. Signed-off-by: Simon Horman <horms@verge.net.au> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64/kernel/crash.c')
-rw-r--r--arch/ia64/kernel/crash.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/arch/ia64/kernel/crash.c b/arch/ia64/kernel/crash.c
index 0aabedf95dad..bc2f64d72244 100644
--- a/arch/ia64/kernel/crash.c
+++ b/arch/ia64/kernel/crash.c
@@ -19,29 +19,11 @@
19 19
20#include <asm/kdebug.h> 20#include <asm/kdebug.h>
21#include <asm/mca.h> 21#include <asm/mca.h>
22#include <asm/uaccess.h>
23 22
24int kdump_status[NR_CPUS]; 23int kdump_status[NR_CPUS];
25atomic_t kdump_cpu_freezed; 24atomic_t kdump_cpu_freezed;
26atomic_t kdump_in_progress; 25atomic_t kdump_in_progress;
27int kdump_on_init = 1; 26int kdump_on_init = 1;
28ssize_t
29copy_oldmem_page(unsigned long pfn, char *buf,
30 size_t csize, unsigned long offset, int userbuf)
31{
32 void *vaddr;
33
34 if (!csize)
35 return 0;
36 vaddr = __va(pfn<<PAGE_SHIFT);
37 if (userbuf) {
38 if (copy_to_user(buf, (vaddr + offset), csize)) {
39 return -EFAULT;
40 }
41 } else
42 memcpy(buf, (vaddr + offset), csize);
43 return csize;
44}
45 27
46static inline Elf64_Word 28static inline Elf64_Word
47*append_elf_note(Elf64_Word *buf, char *name, unsigned type, void *data, 29*append_elf_note(Elf64_Word *buf, char *name, unsigned type, void *data,
@@ -225,14 +207,10 @@ static ctl_table sys_table[] = {
225static int 207static int
226machine_crash_setup(void) 208machine_crash_setup(void)
227{ 209{
228 char *from = strstr(saved_command_line, "elfcorehdr=");
229 static struct notifier_block kdump_init_notifier_nb = { 210 static struct notifier_block kdump_init_notifier_nb = {
230 .notifier_call = kdump_init_notifier, 211 .notifier_call = kdump_init_notifier,
231 }; 212 };
232 int ret; 213 int ret;
233 if (from)
234 elfcorehdr_addr = memparse(from+11, &from);
235 saved_max_pfn = (unsigned long)-1;
236 if((ret = register_die_notifier(&kdump_init_notifier_nb)) != 0) 214 if((ret = register_die_notifier(&kdump_init_notifier_nb)) != 0)
237 return ret; 215 return ret;
238#ifdef CONFIG_SYSCTL 216#ifdef CONFIG_SYSCTL