diff options
Diffstat (limited to 'arch/ia64/kernel/crash.c')
-rw-r--r-- | arch/ia64/kernel/crash.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/arch/ia64/kernel/crash.c b/arch/ia64/kernel/crash.c index bc2f64d72244..5cdd2f5fa064 100644 --- a/arch/ia64/kernel/crash.c +++ b/arch/ia64/kernel/crash.c | |||
@@ -52,7 +52,7 @@ extern void ia64_dump_cpu_regs(void *); | |||
52 | static DEFINE_PER_CPU(struct elf_prstatus, elf_prstatus); | 52 | static DEFINE_PER_CPU(struct elf_prstatus, elf_prstatus); |
53 | 53 | ||
54 | void | 54 | void |
55 | crash_save_this_cpu() | 55 | crash_save_this_cpu(void) |
56 | { | 56 | { |
57 | void *buf; | 57 | void *buf; |
58 | unsigned long cfm, sof, sol; | 58 | unsigned long cfm, sof, sol; |
@@ -79,6 +79,7 @@ crash_save_this_cpu() | |||
79 | final_note(buf); | 79 | final_note(buf); |
80 | } | 80 | } |
81 | 81 | ||
82 | #ifdef CONFIG_SMP | ||
82 | static int | 83 | static int |
83 | kdump_wait_cpu_freeze(void) | 84 | kdump_wait_cpu_freeze(void) |
84 | { | 85 | { |
@@ -91,6 +92,7 @@ kdump_wait_cpu_freeze(void) | |||
91 | } | 92 | } |
92 | return 1; | 93 | return 1; |
93 | } | 94 | } |
95 | #endif | ||
94 | 96 | ||
95 | void | 97 | void |
96 | machine_crash_shutdown(struct pt_regs *pt) | 98 | machine_crash_shutdown(struct pt_regs *pt) |
@@ -116,6 +118,11 @@ machine_crash_shutdown(struct pt_regs *pt) | |||
116 | static void | 118 | static void |
117 | machine_kdump_on_init(void) | 119 | machine_kdump_on_init(void) |
118 | { | 120 | { |
121 | if (!ia64_kimage) { | ||
122 | printk(KERN_NOTICE "machine_kdump_on_init(): " | ||
123 | "kdump not configured\n"); | ||
124 | return; | ||
125 | } | ||
119 | local_irq_disable(); | 126 | local_irq_disable(); |
120 | kexec_disable_iosapic(); | 127 | kexec_disable_iosapic(); |
121 | machine_kexec(ia64_kimage); | 128 | machine_kexec(ia64_kimage); |
@@ -132,11 +139,12 @@ kdump_cpu_freeze(struct unw_frame_info *info, void *arg) | |||
132 | atomic_inc(&kdump_cpu_freezed); | 139 | atomic_inc(&kdump_cpu_freezed); |
133 | kdump_status[cpuid] = 1; | 140 | kdump_status[cpuid] = 1; |
134 | mb(); | 141 | mb(); |
135 | if (cpuid == 0) { | 142 | #ifdef CONFIG_HOTPLUG_CPU |
136 | for (;;) | 143 | if (cpuid != 0) |
137 | cpu_relax(); | ||
138 | } else | ||
139 | ia64_jump_to_sal(&sal_boot_rendez_state[cpuid]); | 144 | ia64_jump_to_sal(&sal_boot_rendez_state[cpuid]); |
145 | #endif | ||
146 | for (;;) | ||
147 | cpu_relax(); | ||
140 | } | 148 | } |
141 | 149 | ||
142 | static int | 150 | static int |
@@ -214,7 +222,7 @@ machine_crash_setup(void) | |||
214 | if((ret = register_die_notifier(&kdump_init_notifier_nb)) != 0) | 222 | if((ret = register_die_notifier(&kdump_init_notifier_nb)) != 0) |
215 | return ret; | 223 | return ret; |
216 | #ifdef CONFIG_SYSCTL | 224 | #ifdef CONFIG_SYSCTL |
217 | register_sysctl_table(sys_table, 0); | 225 | register_sysctl_table(sys_table); |
218 | #endif | 226 | #endif |
219 | return 0; | 227 | return 0; |
220 | } | 228 | } |