12 #include <linux/kexec.h>
13 #include <linux/reboot.h>
20 #include <asm/machdep.h>
22 #include <asm/sections.h>
31 chip = irq_desc_get_chip(desc);
58 if (
ppc_md.machine_kexec_prepare)
59 return ppc_md.machine_kexec_prepare(image);
71 #ifdef CONFIG_NEED_MULTIPLE_NODES
75 #ifndef CONFIG_NEED_MULTIPLE_NODES
86 int save_ftrace_enabled;
88 save_ftrace_enabled = __ftrace_enabled_save();
91 ppc_md.machine_kexec(image);
95 __ftrace_enabled_restore(save_ftrace_enabled);
104 unsigned long long crash_size, crash_base;
109 &crash_size, &crash_base);
110 if (ret == 0 && crash_size > 0) {
125 #ifndef CONFIG_NONSTATIC_KERNEL
127 printk(
"Crash kernel location must be 0x%x\n",
147 printk(
"Crash kernel base must be aligned to 0x%lx\n",
159 "Crash kernel can not overlap current kernel\n");
167 printk(
"Adjusted memory limit for crashkernel, now 0x%llx\n",
172 "for crashkernel (System RAM: %ldMB)\n",
173 (
unsigned long)(crash_size >> 20),
189 static struct property kernel_end_prop = {
190 .name =
"linux,kernel-end",
192 .
value = &kernel_end,
195 static struct property crashk_base_prop = {
196 .name =
"linux,crashkernel-base",
201 static struct property crashk_size_prop = {
202 .name =
"linux,crashkernel-size",
204 .
value = &crashk_size,
207 static struct property memory_limit_prop = {
208 .name =
"linux,memory-limit",
209 .length =
sizeof(
unsigned long long),
240 static int __init kexec_setup(
void)
255 kernel_end =
__pa(_end);
258 export_crashk_values(node);