[PATCH] ehea: add kexec support
RAISCH at de.ibm.com
Tue Nov 6 01:24:13 EST 2007
Michael Neuling <mikey at neuling.org> wrote on 03.11.2007 07:06:31:
> > DD allocates HEA resources and gets firmware_handles for these
> > To free the resources DD needs to use exactly these handles.
> > There's no generic firmware call "clean out all resources".
> > Allocating the same resources twice does not work.
> Can we get a new firmware call to do this?
Well, there's no simple answer to this. I'm not working on firmware.
I'm trying to get an answer... but don't expect anything "real soon".
> > So a new kernel can't free the resources allocated by an old kernel,
> > because the numeric values of the handles aren't known anymore.
> How many possible handles are there?
Depends on system configuration, between
4 and 64 per port.
> If the handles are lost, is the only way to clear out the HEA resources
> is to reset the partition?
Yes, that's exactly the problem.
> > Potential Solution:
> > Hea driver cleanup function hooks into ppc_md.machine_crash_shutdown
> > and frees all firmware resources at shutdown time of the crashed
> This means the crashed kernel now has to be trusted to shut down and
> free up the resources. Isn't trusting the crashing kernel in this way
> against the whole kdump idea?
I would hope that if the cleanup routine only does hcalls
and does not change any kernel memory areas, then the risk to damage
else in kernel should be pretty small. This should allow to catch most
but as always you can imagine situations where the kernel memory is broken
beyond hope to even restart the kdump kernel.
> > crash_kexec continues and loads new kernel.
> > The new kernel restarts the HEA driver within kdump kernel, which will
> > because resources have been freed before.
> > Michael, would this work?
Is ppc_md.machine_crash_shutdown the right hook?
More information about the Linuxppc-dev