linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Neuling <mikey@neuling.org>
To: Fastboot mailing list <fastboot@lists.osdl.org>, linuxppc-dev@ozlabs.org
Subject: [PATCH] kexec: remove memory reserve patching for powerpc device tree
Date: Thu, 21 Sep 2006 11:10:30 +1000	[thread overview]
Message-ID: <20060921011031.4BFEA67BCE@ozlabs.org> (raw)

This code no longer needed with Jimi's auto reserve of device tree blob
kernel patch now in 2.6.18.    

This patch will break Linux if you're kexecing to a kernel which doesn't
have this patch (ie. earlier than 2.6.17).  Required kernel patch is
this one:   
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4d1f3f25d9c303d1ce63b42cc94c54ac0ab2e950

Signed-off-by: Michael Neuling <mikey@neuling.org>
---
This should be save to include now 2.6.18 has been released.  

 kexec/arch/ppc64/fs2dt.c           |    2 --
 kexec/arch/ppc64/kexec-elf-ppc64.c |   19 -------------------
 2 files changed, 21 deletions(-)

Index: kexec-tools-1.101/kexec/arch/ppc64/fs2dt.c
===================================================================
--- kexec-tools-1.101.orig/kexec/arch/ppc64/fs2dt.c
+++ kexec-tools-1.101/kexec/arch/ppc64/fs2dt.c
@@ -445,8 +445,6 @@ int create_flatten_tree(struct kexec_inf
 	bb->version = 2;
 	bb->last_comp_version = 2;
 
-	reserve(me, bb->totalsize); /* patched later in kexec_load */
-
 	buf = (unsigned char *) malloc(bb->totalsize);
 	*bufp = buf;
 	memcpy(buf, bb, bb->off_mem_rsvmap);
Index: kexec-tools-1.101/kexec/arch/ppc64/kexec-elf-ppc64.c
===================================================================
--- kexec-tools-1.101.orig/kexec/arch/ppc64/kexec-elf-ppc64.c
+++ kexec-tools-1.101/kexec/arch/ppc64/kexec-elf-ppc64.c
@@ -81,8 +81,6 @@ int elf_ppc64_load(int argc, char **argv
 	off_t seg_size = 0;
 	struct mem_phdr *phdr;
 	size_t size;
-	unsigned long long *rsvmap_ptr;
-	struct bootblock *bb_ptr;
 	unsigned int nr_segments, i;
 	int result, opt;
 	unsigned long my_kernel, my_dt_offset;
@@ -249,23 +247,6 @@ int elf_ppc64_load(int argc, char **argv
 				0, 0, max_addr, -1);
 	}
 
-	/* patch reserve map address for flattened device-tree
-	 * find last entry (both 0) in the reserve mem list.  Assume DT
-	 * entry is before this one
-	 */
-	bb_ptr = (struct bootblock *)(
-		(unsigned char *)info->segment[(info->nr_segments)-1].buf);
-	rsvmap_ptr = (unsigned long long *)(
-		(unsigned char *)info->segment[(info->nr_segments)-1].buf +
-		bb_ptr->off_mem_rsvmap);
-	while (*rsvmap_ptr || *(rsvmap_ptr+1))
-		rsvmap_ptr += 2;
-	rsvmap_ptr -= 2;
-	*rsvmap_ptr = (unsigned long long)(
-		info->segment[(info->nr_segments)-1].mem);
-	rsvmap_ptr++;
-	*rsvmap_ptr = (unsigned long long)bb_ptr->totalsize;
-
 	nr_segments = info->nr_segments;
 
 	/* Set kernel */

             reply	other threads:[~2006-09-21  1:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-21  1:10 Michael Neuling [this message]
2006-09-21  1:59 ` [PATCH] kexec: remove memory reserve patching for powerpc device tree Michael Ellerman
2006-09-21  2:51   ` [Fastboot] " Horms
2006-09-21  3:40     ` Michael Ellerman
2006-09-21  4:04       ` Michael Neuling
2006-09-21 13:55       ` Vivek Goyal
2006-09-21 14:18         ` Jon Loeliger
2006-09-21 14:32           ` Vivek Goyal
2006-09-22  1:11             ` Michael Neuling
2006-09-22  1:21               ` Horms
2006-09-22 14:23               ` Vivek Goyal

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=20060921011031.4BFEA67BCE@ozlabs.org \
    --to=mikey@neuling.org \
    --cc=fastboot@lists.osdl.org \
    --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;
as well as URLs for NNTP newsgroup(s).