public inbox for kexec@lists.infradead.org
 help / color / mirror / Atom feed
From: Thomas Renninger <trenn@suse.de>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: yinghai@kernel.org, Simon Horman <horms@verge.net.au>,
	kexec@lists.infradead.org, x86@kernel.org, vgoyal@redhat.com
Subject: [PATCH 2/3] x86: Introduce Linux kernel specific E820_RESERVED_KDUMP e820 memory range type
Date: Wed, 30 Jan 2013 17:08:15 +0100	[thread overview]
Message-ID: <201301301708.15967.trenn@suse.de> (raw)
In-Reply-To: <201301301703.42601.trenn@suse.de>

This functionality will be picked up by later memmap= boot
parameter options. Originally E820_USABLE declared memory (used by the
productive, but crashed kernel) will get converted to the new
E820_RESERVED_KDUMP type.
The memory area where the kdump kernel resides (passed via memmap=X@Y
by kexec-tools) will be set usable again.

Also include a tiny whitespace to tab cleanup.

Signed-off-by: Thomas Renninger <trenn@suse.de>
---
 arch/x86/include/uapi/asm/e820.h |    9 ++++++++-
 arch/x86/kernel/e820.c           |   14 +++++++++-----
 2 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/arch/x86/include/uapi/asm/e820.h b/arch/x86/include/uapi/asm/e820.h
index bbae024..2171ca5 100644
--- a/arch/x86/include/uapi/asm/e820.h
+++ b/arch/x86/include/uapi/asm/e820.h
@@ -45,7 +45,14 @@
  * included in the S3 integrity calculation and so should not include
  * any memory that BIOS might alter over the S3 transition
  */
-#define E820_RESERVED_KERN        128
+#define E820_RESERVED_KERN	128
+
+/*
+ * Kdump kernel will use this type for formerly usable memory
+ * the crashed kernel used (and as defined by the original e820 map).
+ * It will then only set the memory area it resides in to usable memory
+ */
+#define E820_RESERVED_KDUMP	129
 
 #ifndef __ASSEMBLY__
 #include <linux/types.h>
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
index d32abea..e3c5b7f 100644
--- a/arch/x86/kernel/e820.c
+++ b/arch/x86/kernel/e820.c
@@ -149,6 +149,9 @@ static void __init e820_print_type(u32 type)
 	case E820_UNUSABLE:
 		printk(KERN_CONT "unusable");
 		break;
+	case E820_RESERVED_KDUMP:
+		printk(KERN_CONT "kdump reserved");
+		break;
 	default:
 		printk(KERN_CONT "type %u", type);
 		break;
@@ -911,11 +914,12 @@ static inline const char *e820_type_to_string(int e820_type)
 {
 	switch (e820_type) {
 	case E820_RESERVED_KERN:
-	case E820_RAM:	return "System RAM";
-	case E820_ACPI:	return "ACPI Tables";
-	case E820_NVS:	return "ACPI Non-volatile Storage";
-	case E820_UNUSABLE:	return "Unusable memory";
-	default:	return "reserved";
+	case E820_RAM:			return "System RAM";
+	case E820_ACPI:			return "ACPI Tables";
+	case E820_NVS:			return "ACPI Non-volatile Storage";
+	case E820_UNUSABLE:		return "Unusable memory";
+	case E820_RESERVED_KDUMP:	return "Kdump reserved";
+	default:			return "reserved";
 	}
 }
 

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

  parent reply	other threads:[~2013-01-30 16:08 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-22 15:02 [PATCH 0/3] Make use of new memmap= kernel parameter syntax Thomas Renninger
2013-01-22 15:02 ` [PATCH 1/3] kexec: Split kernel_version() to also be able to pass a release string Thomas Renninger
2013-01-22 15:02 ` [PATCH 2/3] kexec x86: Extract kernel version and convert it to KERNEL_VERSION() style Thomas Renninger
2013-01-22 15:02 ` [PATCH 3/3] kexec x86: Make kexec aware of new memmap= kernel parameter possibilities Thomas Renninger
2013-01-30  4:31 ` [PATCH 0/3] Make use of new memmap= kernel parameter syntax Simon Horman
2013-01-30  5:40   ` H. Peter Anvin
2013-01-30  5:52     ` Simon Horman
2013-01-30 16:03     ` Thomas Renninger
2013-01-30 16:06       ` [PATCH 1/3] x86 e820: Check for exactmap appearance when parsing first memmap option Thomas Renninger
2013-01-30 16:09         ` H. Peter Anvin
2013-01-30 16:08       ` Thomas Renninger [this message]
2013-01-30 16:10       ` [PATCH 3/3] x86 e820: Introduce memmap=kdump_reserve_usable for kdump usage Thomas Renninger
2013-01-30 16:10       ` [PATCH 0/3] Make use of new memmap= kernel parameter syntax H. Peter Anvin
2013-01-30 16:13       ` [PATCH 0/3] Cleanup kdump memmap= passing and e820 usage Thomas Renninger
2013-01-30 16:16         ` H. Peter Anvin
2013-01-30 16:39           ` Thomas Renninger
2013-01-30 16:52             ` H. Peter Anvin
2013-01-30 17:41               ` Yinghai Lu
2013-01-30 18:52               ` Eric W. Biederman
2013-01-30 21:38                 ` H. Peter Anvin
2013-01-30 21:57                   ` Eric W. Biederman
2013-01-30 22:10                     ` H. Peter Anvin
2013-01-30 22:29                       ` Eric W. Biederman
2013-01-30 22:41                         ` H. Peter Anvin
2013-01-30 22:49                           ` Yinghai Lu
2013-01-31  0:15                         ` Thomas Renninger
2013-01-31  0:18                           ` H. Peter Anvin
2013-01-31  9:11                             ` Thomas Renninger
2013-02-06 15:23                           ` Thomas Renninger
2013-02-06 23:04                             ` Eric W. Biederman
2013-02-06 23:11                               ` H. Peter Anvin
2013-02-06 23:39                                 ` Eric W. Biederman
2013-02-08 20:08                                   ` Thomas Renninger
2013-02-08 20:25                                     ` Eric W. Biederman
2013-02-08 20:56                                       ` Thomas Renninger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201301301708.15967.trenn@suse.de \
    --to=trenn@suse.de \
    --cc=horms@verge.net.au \
    --cc=hpa@zytor.com \
    --cc=kexec@lists.infradead.org \
    --cc=vgoyal@redhat.com \
    --cc=x86@kernel.org \
    --cc=yinghai@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox