From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S263818AbUIOM7e (ORCPT ); Wed, 15 Sep 2004 08:59:34 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S266115AbUIOM6y (ORCPT ); Wed, 15 Sep 2004 08:58:54 -0400 Received: from e4.ny.us.ibm.com ([32.97.182.104]:12726 "EHLO e4.ny.us.ibm.com") by vger.kernel.org with ESMTP id S263818AbUIOMxq (ORCPT ); Wed, 15 Sep 2004 08:53:46 -0400 Date: Wed, 15 Sep 2004 18:23:22 +0530 From: Hariprasad Nellitheertha To: akpm@osdl.org, linux-kernel@vger.kernel.org, fastboot@osdl.org Cc: Suparna Bhattacharya , mbligh@aracnet.com, ebiederm@xmission.com, litke@us.ibm.com Subject: Re: [PATCH][2/6]Memory preserving reboot using kexec Message-ID: <20040915125322.GC15450@in.ibm.com> Reply-To: hari@in.ibm.com References: <20040915125041.GA15450@in.ibm.com> <20040915125145.GB15450@in.ibm.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="R3G7APHDIzY6R/pk" Content-Disposition: inline In-Reply-To: <20040915125145.GB15450@in.ibm.com> User-Agent: Mutt/1.4.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org --R3G7APHDIzY6R/pk Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Regards, Hari -- Hariprasad Nellitheertha Linux Technology Center India Software Labs IBM India, Bangalore --R3G7APHDIzY6R/pk Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="kd-reb-269rc1-mm5.patch" This patch contains the code that does the memory preserving reboot. It copies over the first 640k into a backup region before handing over to kexec. The second kernel will boot using only the backup region. Signed off by Hariprasad Nellitheertha Signed off by Adam Litke --- linux-2.6.9-rc1-hari/arch/i386/Kconfig | 20 ++++++++ linux-2.6.9-rc1-hari/arch/i386/kernel/machine_kexec.c | 31 ++++++++++++ linux-2.6.9-rc1-hari/arch/i386/kernel/setup.c | 13 +++++ linux-2.6.9-rc1-hari/fs/proc/proc_misc.c | 25 ++++++++++ linux-2.6.9-rc1-hari/include/asm-i386/crash_dump.h | 44 ++++++++++++++++++ linux-2.6.9-rc1-hari/include/linux/bootmem.h | 1 linux-2.6.9-rc1-hari/include/linux/crash_dump.h | 28 +++++++++++ linux-2.6.9-rc1-hari/kernel/panic.c | 7 ++ linux-2.6.9-rc1-hari/mm/bootmem.c | 5 ++ 9 files changed, 174 insertions(+) diff -puN arch/i386/Kconfig~kd-reb-269rc1-mm5 arch/i386/Kconfig --- linux-2.6.9-rc1/arch/i386/Kconfig~kd-reb-269rc1-mm5 2004-09-15 17:36:30.000000000 +0530 +++ linux-2.6.9-rc1-hari/arch/i386/Kconfig 2004-09-15 17:36:30.000000000 +0530 @@ -894,6 +894,26 @@ config KEXEC support. As of this writing the exact hardware interface is strongly in flux, so no good recommendation can be made. +config CRASH_DUMP + bool "kernel crash dumps (EXPERIMENTAL)" + depends on KEXEC + help + Generate crash dump using kexec. + +config BACKUP_BASE + int "location of the crash dumps backup region" + depends on CRASH_DUMP + default 16 + help + This is the location where the second kernel will boot from. + +config BACKUP_SIZE + int "Size of the crash dumps backup region" + depends on CRASH_DUMP + range 16 64 + default 32 + help + The size of the second kernel's memory. endmenu diff -puN arch/i386/kernel/setup.c~kd-reb-269rc1-mm5 arch/i386/kernel/setup.c --- linux-2.6.9-rc1/arch/i386/kernel/setup.c~kd-reb-269rc1-mm5 2004-09-15 17:36:30.000000000 +0530 +++ linux-2.6.9-rc1-hari/arch/i386/kernel/setup.c 2004-09-15 17:36:30.000000000 +0530 @@ -39,6 +39,7 @@ #include #include #include +#include #include