Skip to content

Commit

Permalink
powerpc/kexec: Adds correct calling convention for kexec purgatory
Browse files Browse the repository at this point in the history
Call kexec purgatory code correctly. We were getting lucky before.
If you examine the powerpc 32bit kexec "purgatory" code you will
see it expects the following:

>From kexec-tools: purgatory/arch/ppc/v2wrap_32.S
-> calling convention:
->   r3 = physical number of this cpu (all cpus)
->   r4 = address of this chunk (master only)

As such, we need to set r3 to the current core, r4 happens to be
unused by purgatory at the moment but we go ahead and set it
here as well

Signed-off-by: Matthew McClintock <[email protected]>
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
  • Loading branch information
Matthew McClintock authored and ozbenh committed Aug 31, 2010
1 parent 2bfc96a commit 4562c98
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/powerpc/kernel/misc_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -810,6 +810,9 @@ relocate_new_kernel:
isync
sync

mfspr r3, SPRN_PIR /* current core we are running on */
mr r4, r5 /* load physical address of chunk called */

/* jump to the entry point, usually the setup routine */
mtlr r5
blrl
Expand Down

0 comments on commit 4562c98

Please sign in to comment.