Re: kexec, x86/purgatory: Cleanup the unholy mess

2017-03-10 Thread Mike Galbraith
On Fri, 2017-03-10 at 16:31 +0100, Thomas Gleixner wrote: > On Fri, 10 Mar 2017, Mike Galbraith wrote: > > > On Fri, 2017-03-10 at 15:56 +0100, Thomas Gleixner wrote: > > > On Fri, 10 Mar 2017, Mike Galbraith wrote: > > > > Stuffing the lot into .kexec-purgatory worked. > > > > > > You beat me to

Re: kexec, x86/purgatory: Cleanup the unholy mess

2017-03-10 Thread Thomas Gleixner
On Fri, 10 Mar 2017, Mike Galbraith wrote: > On Fri, 2017-03-10 at 15:56 +0100, Thomas Gleixner wrote: > > On Fri, 10 Mar 2017, Mike Galbraith wrote: > > > Stuffing the lot into .kexec-purgatory worked. > > > > You beat me to it :) > > That's odd, I'm usually a day late and a dollar short :) He

Re: kexec, x86/purgatory: Cleanup the unholy mess

2017-03-10 Thread Vivek Goyal
On Fri, Mar 10, 2017 at 03:58:20PM +0100, Thomas Gleixner wrote: > On Fri, 10 Mar 2017, Vivek Goyal wrote: > > I think we probably will have to initialize these global variables in > > purgatory itself and that puts them in .data section and relocation > > works. > > > > That's how the code was in

Re: kexec, x86/purgatory: Cleanup the unholy mess

2017-03-10 Thread Thomas Gleixner
On Fri, 10 Mar 2017, Mike Galbraith wrote: > Stuffing the lot into .kexec-purgatory worked. You beat me to it :) And that's how that whole thing should have been done in the very beginning instead of relying on uncomprehensible compile/link magics. Thanks, tglx > --- > arch/x86/purgat

Re: kexec, x86/purgatory: Cleanup the unholy mess

2017-03-10 Thread Mike Galbraith
On Fri, 2017-03-10 at 15:56 +0100, Thomas Gleixner wrote: > On Fri, 10 Mar 2017, Mike Galbraith wrote: > > Stuffing the lot into .kexec-purgatory worked. > > You beat me to it :) That's odd, I'm usually a day late and a dollar short :) -Mike

Re: kexec, x86/purgatory: Cleanup the unholy mess

2017-03-10 Thread Thomas Gleixner
On Fri, 10 Mar 2017, Vivek Goyal wrote: > I think we probably will have to initialize these global variables in > purgatory itself and that puts them in .data section and relocation > works. > > That's how the code was intially. I initialized value of > purgatory_sha256_digest in the code and then

Re: kexec, x86/purgatory: Cleanup the unholy mess

2017-03-10 Thread Mike Galbraith
On Fri, 2017-03-10 at 14:57 +0100, Thomas Gleixner wrote: > On Fri, 10 Mar 2017, Mike Galbraith wrote: > > On Fri, 2017-03-10 at 13:17 +0100, Thomas Gleixner wrote: > > > The purgatory code defines global variables which are referenced via a > > > symbol lookup in the kexec code (core and arch). >

Re: kexec, x86/purgatory: Cleanup the unholy mess

2017-03-10 Thread Vivek Goyal
On Fri, Mar 10, 2017 at 02:57:38PM +0100, Thomas Gleixner wrote: > On Fri, 10 Mar 2017, Mike Galbraith wrote: > > On Fri, 2017-03-10 at 13:17 +0100, Thomas Gleixner wrote: > > > The purgatory code defines global variables which are referenced via a > > > symbol lookup in the kexec code (core and ar

Re: kexec, x86/purgatory: Cleanup the unholy mess

2017-03-10 Thread Thomas Gleixner
On Fri, 10 Mar 2017, Mike Galbraith wrote: > On Fri, 2017-03-10 at 13:17 +0100, Thomas Gleixner wrote: > > The purgatory code defines global variables which are referenced via a > > symbol lookup in the kexec code (core and arch). > > > > A recent commit addressing sparse warning made these static

Re: kexec, x86/purgatory: Cleanup the unholy mess

2017-03-10 Thread Mike Galbraith
On Fri, 2017-03-10 at 13:17 +0100, Thomas Gleixner wrote: > The purgatory code defines global variables which are referenced via a > symbol lookup in the kexec code (core and arch). > > A recent commit addressing sparse warning made these static and thereby > broke kexec file. > > Why did this ha

kexec, x86/purgatory: Cleanup the unholy mess

2017-03-10 Thread Thomas Gleixner
The purgatory code defines global variables which are referenced via a symbol lookup in the kexec code (core and arch). A recent commit addressing sparse warning made these static and thereby broke kexec file. Why did this happen? Simply because the whole machinery is undocumented and lacks any f