aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/machine_kexec_64.c
diff options
context:
space:
mode:
authorMilton Miller <miltonm@bga.com>2008-10-22 10:39:18 +0000
committerPaul Mackerras <paulus@samba.org>2008-10-31 16:11:44 +1100
commit1767c8f392857694899403a65942cc70b5b7d132 (patch)
tree609181f519dbf8569808b564a2b15358b79596f5 /arch/powerpc/kernel/machine_kexec_64.c
parentMerge branch 'merge' of master.kernel.org:/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx into merge (diff)
downloadlinux-dev-1767c8f392857694899403a65942cc70b5b7d132.tar.xz
linux-dev-1767c8f392857694899403a65942cc70b5b7d132.zip
powerpc: Kexec exit should not use magic numbers
Commit 54622f10a6aabb8bb2bdacf3dd070046f03dc246 ("powerpc: Support for relocatable kdump kernel") added a magic flag value in a register to tell purgatory that it should be a panic kernel. This part is wrong and is reverted by this commit. The kernel gets a list of memory blocks and a entry point from user space. Its job is to copy the blocks into place and then branch to the designated entry point (after turning "off" the mmu). The user space tool inserts a trampoline, called purgatory, that runs before the user supplied code. Its job is to establish the entry environment for the new kernel or other application based on the contents of memory. The purgatory code is compiled and embedded in the tool, where it is later patched using the elf symbol table using elf symbols. Since the tool knows it is creating a purgatory that will run after a kernel crash, it should just patch purgatory (or the kernel directly) if something needs to happen. Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/machine_kexec_64.c')
-rw-r--r--arch/powerpc/kernel/machine_kexec_64.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/arch/powerpc/kernel/machine_kexec_64.c b/arch/powerpc/kernel/machine_kexec_64.c
index e6efec788c4d..3c4ca046e854 100644
--- a/arch/powerpc/kernel/machine_kexec_64.c
+++ b/arch/powerpc/kernel/machine_kexec_64.c
@@ -255,14 +255,11 @@ static union thread_union kexec_stack
/* Our assembly helper, in kexec_stub.S */
extern NORET_TYPE void kexec_sequence(void *newstack, unsigned long start,
void *image, void *control,
- void (*clear_all)(void),
- unsigned long kdump_flag) ATTRIB_NORET;
+ void (*clear_all)(void)) ATTRIB_NORET;
/* too late to fail here */
void default_machine_kexec(struct kimage *image)
{
- unsigned long kdump_flag = 0;
-
/* prepare control code if any */
/*
@@ -275,8 +272,6 @@ void default_machine_kexec(struct kimage *image)
if (crashing_cpu == -1)
kexec_prepare_cpus();
- else
- kdump_flag = KDUMP_SIGNATURE;
/* switch to a staticly allocated stack. Based on irq stack code.
* XXX: the task struct will likely be invalid once we do the copy!
@@ -289,7 +284,7 @@ void default_machine_kexec(struct kimage *image)
*/
kexec_sequence(&kexec_stack, image->start, image,
page_address(image->control_code_page),
- ppc_md.hpte_clear_all, kdump_flag);
+ ppc_md.hpte_clear_all);
/* NOTREACHED */
}