From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933948Ab3BNKML (ORCPT ); Thu, 14 Feb 2013 05:12:11 -0500 Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]:48696 "EHLO fgwmail6.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758091Ab3BNKMH (ORCPT ); Thu, 14 Feb 2013 05:12:07 -0500 From: HATAYAMA Daisuke Subject: [PATCH 04/13] vmcore: introduce types for objects copied in 2nd kernel To: ebiederm@xmission.com, vgoyal@redhat.com, cpw@sgi.com, kumagai-atsushi@mxc.nes.nec.co.jp, lisa.mitchell@hp.com Cc: kexec@lists.infradead.org, linux-kernel@vger.kernel.org Date: Thu, 14 Feb 2013 19:12:05 +0900 Message-ID: <20130214101205.22466.5909.stgit@localhost6.localdomain6> In-Reply-To: <20130214100945.22466.4172.stgit@localhost6.localdomain6> References: <20130214100945.22466.4172.stgit@localhost6.localdomain6> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Some parts of old memory need to be copied in buffers on 2nd kernel to be remapped to user-space. To distinguish objects in the buffer on 2nd kernel and the ones on old memory, enum vmcore_type is introduced: the object in the buffer on 2nd kernel has VMCORE_2ND_KERNEL type, and the one on old memory has VMCORE_OLD_MEMORY type. Signed-off-by: HATAYAMA Daisuke --- include/linux/proc_fs.h | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 32676b3..4b153ed 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h @@ -97,11 +97,20 @@ struct kcore_list { int type; }; +enum vmcore_type { + VMCORE_OLD_MEMORY, + VMCORE_2ND_KERNEL, +}; + struct vmcore { struct list_head list; - unsigned long long paddr; + union { + unsigned long long paddr; + char *buf; + }; unsigned long long size; loff_t offset; + enum vmcore_type type; }; #ifdef CONFIG_PROC_FS From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from fgwmail6.fujitsu.co.jp ([192.51.44.36]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1U5vnU-0002wd-Es for kexec@lists.infradead.org; Thu, 14 Feb 2013 10:12:08 +0000 Received: from m3.gw.fujitsu.co.jp (unknown [10.0.50.73]) by fgwmail6.fujitsu.co.jp (Postfix) with ESMTP id D21DF3EE0BD for ; Thu, 14 Feb 2013 19:12:06 +0900 (JST) Received: from smail (m3 [127.0.0.1]) by outgoing.m3.gw.fujitsu.co.jp (Postfix) with ESMTP id B029E45DEBF for ; Thu, 14 Feb 2013 19:12:06 +0900 (JST) Received: from s3.gw.fujitsu.co.jp (s3.gw.fujitsu.co.jp [10.0.50.93]) by m3.gw.fujitsu.co.jp (Postfix) with ESMTP id 7770845DEBB for ; Thu, 14 Feb 2013 19:12:06 +0900 (JST) Received: from s3.gw.fujitsu.co.jp (localhost.localdomain [127.0.0.1]) by s3.gw.fujitsu.co.jp (Postfix) with ESMTP id 64296E18006 for ; Thu, 14 Feb 2013 19:12:06 +0900 (JST) Received: from m1001.s.css.fujitsu.com (m1001.s.css.fujitsu.com [10.240.81.139]) by s3.gw.fujitsu.co.jp (Postfix) with ESMTP id 1588D1DB803C for ; Thu, 14 Feb 2013 19:12:06 +0900 (JST) From: HATAYAMA Daisuke Subject: [PATCH 04/13] vmcore: introduce types for objects copied in 2nd kernel Date: Thu, 14 Feb 2013 19:12:05 +0900 Message-ID: <20130214101205.22466.5909.stgit@localhost6.localdomain6> In-Reply-To: <20130214100945.22466.4172.stgit@localhost6.localdomain6> References: <20130214100945.22466.4172.stgit@localhost6.localdomain6> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: kexec-bounces@lists.infradead.org Errors-To: kexec-bounces+dwmw2=infradead.org@lists.infradead.org To: ebiederm@xmission.com, vgoyal@redhat.com, cpw@sgi.com, kumagai-atsushi@mxc.nes.nec.co.jp, lisa.mitchell@hp.com Cc: kexec@lists.infradead.org, linux-kernel@vger.kernel.org Some parts of old memory need to be copied in buffers on 2nd kernel to be remapped to user-space. To distinguish objects in the buffer on 2nd kernel and the ones on old memory, enum vmcore_type is introduced: the object in the buffer on 2nd kernel has VMCORE_2ND_KERNEL type, and the one on old memory has VMCORE_OLD_MEMORY type. Signed-off-by: HATAYAMA Daisuke --- include/linux/proc_fs.h | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 32676b3..4b153ed 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h @@ -97,11 +97,20 @@ struct kcore_list { int type; }; +enum vmcore_type { + VMCORE_OLD_MEMORY, + VMCORE_2ND_KERNEL, +}; + struct vmcore { struct list_head list; - unsigned long long paddr; + union { + unsigned long long paddr; + char *buf; + }; unsigned long long size; loff_t offset; + enum vmcore_type type; }; #ifdef CONFIG_PROC_FS _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec