* [PATCH] kexec: remove memory reserve patching for powerpc device tree
@ 2006-09-21 1:10 Michael Neuling
2006-09-21 1:59 ` Michael Ellerman
0 siblings, 1 reply; 11+ messages in thread
From: Michael Neuling @ 2006-09-21 1:10 UTC (permalink / raw)
To: Fastboot mailing list, linuxppc-dev
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 */
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] kexec: remove memory reserve patching for powerpc device tree
2006-09-21 1:10 [PATCH] kexec: remove memory reserve patching for powerpc device tree Michael Neuling
@ 2006-09-21 1:59 ` Michael Ellerman
2006-09-21 2:51 ` [Fastboot] " Horms
0 siblings, 1 reply; 11+ messages in thread
From: Michael Ellerman @ 2006-09-21 1:59 UTC (permalink / raw)
To: Michael Neuling; +Cc: linuxppc-dev, Fastboot mailing list
[-- Attachment #1: Type: text/plain, Size: 892 bytes --]
On Thu, 2006-09-21 at 11:10 +1000, Michael Neuling wrote:
> 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
>
Although it'd be nice to get rid of that code, I'm not sure we want to
go breaking this. This will mean RHEL5 and SLES10 users can't use
upstream kexec-tools :/
cheers
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 191 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Fastboot] [PATCH] kexec: remove memory reserve patching for powerpc device tree
2006-09-21 1:59 ` Michael Ellerman
@ 2006-09-21 2:51 ` Horms
2006-09-21 3:40 ` Michael Ellerman
0 siblings, 1 reply; 11+ messages in thread
From: Horms @ 2006-09-21 2:51 UTC (permalink / raw)
To: Michael Ellerman; +Cc: linuxppc-dev, Michael Neuling, Fastboot mailing list
On Thu, Sep 21, 2006 at 11:59:04AM +1000, Michael Ellerman wrote:
> On Thu, 2006-09-21 at 11:10 +1000, Michael Neuling wrote:
> > 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
> >
>
> Although it'd be nice to get rid of that code, I'm not sure we want to
> go breaking this. This will mean RHEL5 and SLES10 users can't use
> upstream kexec-tools :/
Surely if they are using a RHEL5 or SLES10 kernel then its
reasonably to expect they are also using a RHEL5 or SLES10 supplied
kexec-tool.
I guess it all comes down to backwards compatibility.
And IMHO thats a hard thing to maintain with something
as green as kexec.
I'm in favour of the patch, though I'm prepared to be convinced otherwise.
If the code needs to stay, perhaps this patch could be modified
so that the code in question is only executed if the kernel
is pre 2.6.18. Or is that just overly complex?
--
Horms
H: http://www.vergenet.net/~horms/
W: http://www.valinux.co.jp/en/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Fastboot] [PATCH] kexec: remove memory reserve patching for powerpc device tree
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
0 siblings, 2 replies; 11+ messages in thread
From: Michael Ellerman @ 2006-09-21 3:40 UTC (permalink / raw)
To: Horms; +Cc: linuxppc-dev, Michael Neuling, Fastboot mailing list
[-- Attachment #1: Type: text/plain, Size: 2274 bytes --]
On Thu, 2006-09-21 at 11:51 +0900, Horms wrote:
> On Thu, Sep 21, 2006 at 11:59:04AM +1000, Michael Ellerman wrote:
> > On Thu, 2006-09-21 at 11:10 +1000, Michael Neuling wrote:
> > > 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
> > >
> >
> > Although it'd be nice to get rid of that code, I'm not sure we want to
> > go breaking this. This will mean RHEL5 and SLES10 users can't use
> > upstream kexec-tools :/
>
> Surely if they are using a RHEL5 or SLES10 kernel then its
> reasonably to expect they are also using a RHEL5 or SLES10 supplied
> kexec-tool.
Or Ubuntu Dapper .. Debian Stable .. FC whatever. In general they'll be
using the distro tools sure, but I'd rather not force them to. I
generally expect to be able to run mainline kernels without upgrading my
entire distro - it should cut both ways IMHO.
> I guess it all comes down to backwards compatibility.
> And IMHO thats a hard thing to maintain with something
> as green as kexec.
>
> I'm in favour of the patch, though I'm prepared to be convinced otherwise.
Sure it's hard, but we can at least try. If we put this patch in we'll
be breaking backward compatibility simply in order to beautify the
kexec-tools code a little.
> If the code needs to stay, perhaps this patch could be modified
> so that the code in question is only executed if the kernel
> is pre 2.6.18. Or is that just overly complex?
There's no need, it simply means the blob is reserved twice, which is
pretty harmless.
I think the best option is just to add a note somewhere in the kexec
sources that we can remove that code sometime in the future.
cheers
--
Michael Ellerman
OzLabs, IBM Australia Development Lab
wwweb: http://michael.ellerman.id.au
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 191 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Fastboot] [PATCH] kexec: remove memory reserve patching for powerpc device tree
2006-09-21 3:40 ` Michael Ellerman
@ 2006-09-21 4:04 ` Michael Neuling
2006-09-21 13:55 ` Vivek Goyal
1 sibling, 0 replies; 11+ messages in thread
From: Michael Neuling @ 2006-09-21 4:04 UTC (permalink / raw)
To: michael; +Cc: linuxppc-dev, Horms, Fastboot mailing list
> Sure it's hard, but we can at least try. If we put this patch in we'll
> be breaking backward compatibility simply in order to beautify the
> kexec-tools code a little.
Agreed.
> I think the best option is just to add a note somewhere in the kexec
> sources that we can remove that code sometime in the future.
Agreed. The code being removed is hacky, but mostly harmless.
Mikey
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Fastboot] [PATCH] kexec: remove memory reserve patching for powerpc device tree
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
1 sibling, 1 reply; 11+ messages in thread
From: Vivek Goyal @ 2006-09-21 13:55 UTC (permalink / raw)
To: Michael Ellerman; +Cc: linuxppc-dev, Horms, Fastboot mailing list
On Thu, Sep 21, 2006 at 01:40:33PM +1000, Michael Ellerman wrote:
> On Thu, 2006-09-21 at 11:51 +0900, Horms wrote:
> > On Thu, Sep 21, 2006 at 11:59:04AM +1000, Michael Ellerman wrote:
> > > On Thu, 2006-09-21 at 11:10 +1000, Michael Neuling wrote:
> > > > 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
> > > >
> > >
> > > Although it'd be nice to get rid of that code, I'm not sure we want to
> > > go breaking this. This will mean RHEL5 and SLES10 users can't use
> > > upstream kexec-tools :/
> >
> > Surely if they are using a RHEL5 or SLES10 kernel then its
> > reasonably to expect they are also using a RHEL5 or SLES10 supplied
> > kexec-tool.
>
> Or Ubuntu Dapper .. Debian Stable .. FC whatever. In general they'll be
> using the distro tools sure, but I'd rather not force them to. I
> generally expect to be able to run mainline kernels without upgrading my
> entire distro - it should cut both ways IMHO.
>
Now with distros adopting kexce-tools, I am in for maintaining the backward
compatibility as far as possible. Putting a note in the code is good that
down the line, get rid of this code.
-Vivek
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Fastboot] [PATCH] kexec: remove memory reserve patching for powerpc device tree
2006-09-21 13:55 ` Vivek Goyal
@ 2006-09-21 14:18 ` Jon Loeliger
2006-09-21 14:32 ` Vivek Goyal
0 siblings, 1 reply; 11+ messages in thread
From: Jon Loeliger @ 2006-09-21 14:18 UTC (permalink / raw)
To: vgoyal; +Cc: linuxppc-dev, Horms, Fastboot mailing list
So, like, the other day Vivek Goyal mumbled:
>
> Now with distros adopting kexce-tools, I am in for maintaining the backward
> compatibility as far as possible. Putting a note in the code is good that
> down the line, get rid of this code.
Perhaps scheduling it as an entry in
Documentation/feature-removal-schedule.txt
just so people (distros) can plan around it?
jdl
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Fastboot] [PATCH] kexec: remove memory reserve patching for powerpc device tree
2006-09-21 14:18 ` Jon Loeliger
@ 2006-09-21 14:32 ` Vivek Goyal
2006-09-22 1:11 ` Michael Neuling
0 siblings, 1 reply; 11+ messages in thread
From: Vivek Goyal @ 2006-09-21 14:32 UTC (permalink / raw)
To: Jon Loeliger; +Cc: linuxppc-dev, Horms, Fastboot mailing list
On Thu, Sep 21, 2006 at 09:18:39AM -0500, Jon Loeliger wrote:
> So, like, the other day Vivek Goyal mumbled:
> >
> > Now with distros adopting kexce-tools, I am in for maintaining the backward
> > compatibility as far as possible. Putting a note in the code is good that
> > down the line, get rid of this code.
>
> Perhaps scheduling it as an entry in
>
> Documentation/feature-removal-schedule.txt
>
> just so people (distros) can plan around it?
Perfect. In kexec-tools it can go in doc/feature-removal-schedule.txt.
-Vivek
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Fastboot] [PATCH] kexec: remove memory reserve patching for powerpc device tree
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
0 siblings, 2 replies; 11+ messages in thread
From: Michael Neuling @ 2006-09-22 1:11 UTC (permalink / raw)
To: vgoyal; +Cc: Jon Loeliger, Fastboot mailing list, linuxppc-dev, Horms
In message <20060921143253.GC1542@in.ibm.com> you wrote:
> On Thu, Sep 21, 2006 at 09:18:39AM -0500, Jon Loeliger wrote:
> > So, like, the other day Vivek Goyal mumbled:
> > >
> > > Now with distros adopting kexce-tools, I am in for maintaining the backwa
rd
> > > compatibility as far as possible. Putting a note in the code is good that
> > > down the line, get rid of this code.
> >
> > Perhaps scheduling it as an entry in
> >
> > Documentation/feature-removal-schedule.txt
> >
> > just so people (distros) can plan around it?
>
> Perfect. In kexec-tools it can go in doc/feature-removal-schedule.txt.
It doesn't really need to go in the kernel source as the kernel has
already changed and besides, we were adding a feature to the kernel, not
removing one.
At this stage, it's just a kexec tools feature removal.
Mikey
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Fastboot] [PATCH] kexec: remove memory reserve patching for powerpc device tree
2006-09-22 1:11 ` Michael Neuling
@ 2006-09-22 1:21 ` Horms
2006-09-22 14:23 ` Vivek Goyal
1 sibling, 0 replies; 11+ messages in thread
From: Horms @ 2006-09-22 1:21 UTC (permalink / raw)
To: Michael Neuling; +Cc: Jon Loeliger, Fastboot mailing list, linuxppc-dev, vgoyal
On Fri, Sep 22, 2006 at 10:41:51AM +0930, Michael Neuling wrote:
> In message <20060921143253.GC1542@in.ibm.com> you wrote:
> > On Thu, Sep 21, 2006 at 09:18:39AM -0500, Jon Loeliger wrote:
> > > So, like, the other day Vivek Goyal mumbled:
> > > >
> > > > Now with distros adopting kexce-tools, I am in for maintaining the backwa
> rd
> > > > compatibility as far as possible. Putting a note in the code is good that
> > > > down the line, get rid of this code.
> > >
> > > Perhaps scheduling it as an entry in
> > >
> > > Documentation/feature-removal-schedule.txt
> > >
> > > just so people (distros) can plan around it?
> >
> > Perfect. In kexec-tools it can go in doc/feature-removal-schedule.txt.
>
> It doesn't really need to go in the kernel source as the kernel has
> already changed and besides, we were adding a feature to the kernel, not
> removing one.
>
> At this stage, it's just a kexec tools feature removal.
If someone wants to make a patch for kexec-tools I'm happy
to put it into kexec-tools-testing. Though I am a little dubious
about the possibilities of vendors taking any notice of it.
--
Horms
H: http://www.vergenet.net/~horms/
W: http://www.valinux.co.jp/en/
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [Fastboot] [PATCH] kexec: remove memory reserve patching for powerpc device tree
2006-09-22 1:11 ` Michael Neuling
2006-09-22 1:21 ` Horms
@ 2006-09-22 14:23 ` Vivek Goyal
1 sibling, 0 replies; 11+ messages in thread
From: Vivek Goyal @ 2006-09-22 14:23 UTC (permalink / raw)
To: Michael Neuling; +Cc: Jon Loeliger, Fastboot mailing list, linuxppc-dev, Horms
On Fri, Sep 22, 2006 at 10:41:51AM +0930, Michael Neuling wrote:
> In message <20060921143253.GC1542@in.ibm.com> you wrote:
> > On Thu, Sep 21, 2006 at 09:18:39AM -0500, Jon Loeliger wrote:
> > > So, like, the other day Vivek Goyal mumbled:
> > > >
> > > > Now with distros adopting kexce-tools, I am in for maintaining the backwa
> rd
> > > > compatibility as far as possible. Putting a note in the code is good that
> > > > down the line, get rid of this code.
> > >
> > > Perhaps scheduling it as an entry in
> > >
> > > Documentation/feature-removal-schedule.txt
> > >
> > > just so people (distros) can plan around it?
> >
> > Perfect. In kexec-tools it can go in doc/feature-removal-schedule.txt.
>
> It doesn't really need to go in the kernel source as the kernel has
> already changed and besides, we were adding a feature to the kernel, not
> removing one.
>
> At this stage, it's just a kexec tools feature removal.
>
Well, what I meant is that a similar file can go in kexec-tools/doc/ dir.
-Vivek
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2006-09-22 14:23 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-21 1:10 [PATCH] kexec: remove memory reserve patching for powerpc device tree Michael Neuling
2006-09-21 1:59 ` 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
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).