LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jimi Xenidis <jimix@watson.ibm.com>
To: linuxppc-dev@ozlabs.org
Subject: [PATCH] Skip the "copy down" of the kernel if it is already at zero.
Date: Mon, 26 Jun 2006 04:56:58 -0400	[thread overview]
Message-ID: <E1Fumtu-0005ax-Je@kmac.watson.ibm.com> (raw)


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.

---

 arch/powerpc/kernel/head_64.S |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

88f9d7e234b31d5b06decf266414ba2e920ede3e
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S
index b7d1404..cd57a6b 100644
--- a/arch/powerpc/kernel/head_64.S
+++ b/arch/powerpc/kernel/head_64.S
@@ -1654,6 +1654,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
 
-- 
1.3.3

                 reply	other threads:[~2006-06-26  8:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1Fumtu-0005ax-Je@kmac.watson.ibm.com \
    --to=jimix@watson.ibm.com \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox