Skip to content

Commit

Permalink
[POWERPC] Skip the "copy down" of the kernel if it is already at zero.
Browse files Browse the repository at this point in the history
This patch allows the kernel to recognized that it was loaded at zero
and the copy down of the image is unnecessary.  This is useful for
Simulators and kexec models.
On a typical 3.8 MiB vmlinux.strip this saves about 2.3 million instructions.

Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Jimi Xenidis authored and Paul Mackerras committed Jun 28, 2006
1 parent c0ce7d0 commit d0b79c5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/powerpc/kernel/head_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -1664,6 +1664,9 @@ _STATIC(__after_prom_start)
/* i.e. where we are running */
/* the source addr */

cmpdi r4,0 /* In some cases the loader may */
beq .start_here_multiplatform /* have already put us at zero */
/* so we can skip the copy. */
LOAD_REG_IMMEDIATE(r5,copy_to_here) /* # bytes of memory to copy */
sub r5,r5,r27

Expand Down

0 comments on commit d0b79c5

Please sign in to comment.