Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756643AbXKEOYU (ORCPT ); Mon, 5 Nov 2007 09:24:20 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755163AbXKEOYG (ORCPT ); Mon, 5 Nov 2007 09:24:06 -0500 Received: from mtagate6.de.ibm.com ([195.212.29.155]:51399 "EHLO mtagate6.de.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754986AbXKEOYE (ORCPT ); Mon, 5 Nov 2007 09:24:04 -0500 In-Reply-To: <24042.1194069991@neuling.org> References: <200710261437.29117.ossthema@de.ibm.com> <1193610737.9637.1.camel@concordia> <1193784636.32504.4.camel@concordia> <1193985008.1782.7.camel@concordia> <24042.1194069991@neuling.org> Subject: Re: [PATCH] ehea: add kexec support To: Michael Neuling Cc: Jan-Bernd Themann , Jeff Garzik , linux-kernel , linux-ppc , Marcus Eder , michael@ellerman.id.au, netdev , ossthema@linux.vnet.ibm.com, Stefan Roscher , Thomas Q Klein X-Mailer: Lotus Notes Release 8.0 August 02, 2007 Message-ID: From: Christoph Raisch Date: Mon, 5 Nov 2007 15:24:13 +0100 X-MIMETrack: Serialize by Router on D12ML067/12/M/IBM(Release 7.0.2HF71 | November 3, 2006) at 05/11/2007 15:23:59 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2130 Lines: 67 Michael Neuling wrote on 03.11.2007 07:06:31: > > DD allocates HEA resources and gets firmware_handles for these resources. > > 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 kernel. > > 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 anything else in kernel should be pretty small. This should allow to catch most cases, 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 work > > because resources have been freed before. > > > > Michael, would this work? Is ppc_md.machine_crash_shutdown the right hook? Gruss/Regards Christoph R - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/