diff options
author | Jimi Xenidis <jimix@watson.ibm.com> | 2006-06-26 04:56:58 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-06-28 15:18:53 +1000 |
commit | d0b79c54fc14f1f2db64180a21b84146028c598b (patch) | |
tree | 26b3b74d80e96a7d7402723fbed90664147c016a /arch/powerpc | |
parent | c0ce7d0886cf0c2579c604eac41a7e125bc0e96d (diff) | |
download | talos-obmc-linux-d0b79c54fc14f1f2db64180a21b84146028c598b.tar.gz talos-obmc-linux-d0b79c54fc14f1f2db64180a21b84146028c598b.zip |
[POWERPC] Skip the "copy down" of the kernel if it is already at zero.
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>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/kernel/head_64.S | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S index da0924293496..f2fab687a01c 100644 --- a/arch/powerpc/kernel/head_64.S +++ b/arch/powerpc/kernel/head_64.S @@ -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 |