All of lore.kernel.org
 help / color / mirror / Atom feed
From: "tip-bot for H. Peter Anvin" <hpa@linux.intel.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
	yinghai@kernel.org, vgoyal@redhat.com, tglx@linutronix.de,
	hpa@linux.intel.com, sgruszka@redhat.com
Subject: [tip:x86/urgent] x86, kexec: Limit the crashkernel address appropriately
Date: Sat, 18 Dec 2010 04:34:06 GMT	[thread overview]
Message-ID: <tip-7f8595bfacef279f06c82ec98d420ef54f2537e0@git.kernel.org> (raw)
In-Reply-To: <20101217195035.GE14502@redhat.com>

Commit-ID:  7f8595bfacef279f06c82ec98d420ef54f2537e0
Gitweb:     http://git.kernel.org/tip/7f8595bfacef279f06c82ec98d420ef54f2537e0
Author:     H. Peter Anvin <hpa@linux.intel.com>
AuthorDate: Thu, 16 Dec 2010 19:20:41 -0800
Committer:  H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Fri, 17 Dec 2010 15:04:00 -0800

x86, kexec: Limit the crashkernel address appropriately

Keep the crash kernel address below 512 MiB for 32 bits and 896 MiB
for 64 bits.  For 32 bits, this retains compatibility with earlier
kernel releases, and makes it work even if the vmalloc= setting is
adjusted.

For 64 bits, we should be able to increase this substantially once a
hard-coded limit in kexec-tools is fixed.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Cc: Vivek Goyal <vgoyal@redhat.com>
Cc: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <20101217195035.GE14502@redhat.com>
---
 arch/x86/kernel/setup.c |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 21c6746..c9089a1 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -501,7 +501,18 @@ static inline unsigned long long get_total_mem(void)
 	return total << PAGE_SHIFT;
 }
 
-#define DEFAULT_BZIMAGE_ADDR_MAX 0x37FFFFFF
+/*
+ * Keep the crash kernel below this limit.  On 32 bits earlier kernels
+ * would limit the kernel to the low 512 MiB due to mapping restrictions.
+ * On 64 bits, kexec-tools currently limits us to 896 MiB; increase this
+ * limit once kexec-tools are fixed.
+ */
+#ifdef CONFIG_X86_32
+# define CRASH_KERNEL_ADDR_MAX	(512 << 20)
+#else
+# define CRASH_KERNEL_ADDR_MAX	(896 << 20)
+#endif
+
 static void __init reserve_crashkernel(void)
 {
 	unsigned long long total_mem;
@@ -520,10 +531,10 @@ static void __init reserve_crashkernel(void)
 		const unsigned long long alignment = 16<<20;	/* 16M */
 
 		/*
-		 *  kexec want bzImage is below DEFAULT_BZIMAGE_ADDR_MAX
+		 *  kexec want bzImage is below CRASH_KERNEL_ADDR_MAX
 		 */
 		crash_base = memblock_find_in_range(alignment,
-			       DEFAULT_BZIMAGE_ADDR_MAX, crash_size, alignment);
+			       CRASH_KERNEL_ADDR_MAX, crash_size, alignment);
 
 		if (crash_base == MEMBLOCK_ERROR) {
 			pr_info("crashkernel reservation failed - No suitable area found.\n");

  parent reply	other threads:[~2010-12-18  4:35 UTC|newest]

Thread overview: 81+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-03 11:16 kdump broken on 2.6.37-rc4 Stanislaw Gruszka
2010-12-03 11:16 ` Stanislaw Gruszka
2010-12-03 15:46 ` Maxim Uvarov
2010-12-03 15:46   ` Maxim Uvarov
2010-12-03 17:11   ` Stanislaw Gruszka
2010-12-03 17:11     ` Stanislaw Gruszka
2010-12-03 17:54     ` Neil Horman
2010-12-03 17:54       ` Neil Horman
2010-12-07 10:50       ` Stanislaw Gruszka
2010-12-07 10:50         ` Stanislaw Gruszka
2010-12-07 19:24         ` Yinghai Lu
2010-12-07 19:24           ` Yinghai Lu
2010-12-08 14:19           ` Stanislaw Gruszka
2010-12-08 14:19             ` Stanislaw Gruszka
2010-12-09  7:16             ` Yinghai Lu
2010-12-09  7:16               ` Yinghai Lu
2010-12-09 12:41               ` Stanislaw Gruszka
2010-12-09 12:41                 ` Stanislaw Gruszka
2010-12-09 20:09                 ` Yinghai Lu
2010-12-09 20:09                   ` Yinghai Lu
2010-12-13 10:08                   ` Stanislaw Gruszka
2010-12-13 10:08                     ` Stanislaw Gruszka
2010-12-13 18:20                     ` Yinghai Lu
2010-12-13 19:47                       ` H. Peter Anvin
2010-12-14 22:41                         ` Vivek Goyal
2010-12-15 10:39                           ` Stanislaw Gruszka
2010-12-15 22:41                             ` Yinghai Lu
2010-12-16  4:29                             ` Yinghai Lu
2010-12-16 10:00                               ` Stanislaw Gruszka
2010-12-16 16:16                                 ` H. Peter Anvin
2010-12-16 16:22                                   ` Vivek Goyal
2010-12-16 16:53                                     ` H. Peter Anvin
2010-12-18 21:50                                 ` Yinghai Lu
2010-12-16 14:39                               ` Vivek Goyal
2010-12-16 16:28                                 ` H. Peter Anvin
2010-12-16 17:28                                   ` Yinghai Lu
2010-12-16 19:58                                     ` H. Peter Anvin
2010-12-16 22:57                                       ` Yinghai Lu
2010-12-16 23:30                                       ` Yinghai Lu
2010-12-16 23:49                                         ` Yinghai Lu
2010-12-17  0:39                                           ` Yinghai Lu
2010-12-17  1:06                                             ` H. Peter Anvin
2010-12-17  1:21                                             ` H. Peter Anvin
2010-12-17  1:51                                             ` H. Peter Anvin
2010-12-17  3:05                                               ` Yinghai Lu
2010-12-17  3:07                                               ` Yinghai Lu
2010-12-17  3:19                                                 ` [tip:x86/urgent] x86-32: Make sure we can map all of lowmem if we need to tip-bot for H. Peter Anvin
2010-12-17 14:33                                                   ` Stanislaw Gruszka
2010-12-16 22:01                                     ` kdump broken on 2.6.37-rc4 Vivek Goyal
2010-12-16 22:58                                       ` Yinghai Lu
2010-12-17 16:15                                         ` Vivek Goyal
2010-12-17  1:15                                       ` H. Peter Anvin
2010-12-17  3:31                               ` H. Peter Anvin
2010-12-17  3:58                                 ` Yinghai
2010-12-17  4:08                                   ` H. Peter Anvin
2010-12-17  4:46                                     ` Yinghai Lu
2010-12-17  5:16                                       ` H. Peter Anvin
2010-12-17 17:01                                   ` Vivek Goyal
2010-12-17 17:56                                     ` H. Peter Anvin
2010-12-17 18:02                                       ` Vivek Goyal
2010-12-17 18:21                                         ` Yinghai Lu
2010-12-17 18:35                                           ` Vivek Goyal
2010-12-17 19:39                                           ` H. Peter Anvin
2010-12-17 19:46                                             ` Yinghai Lu
2010-12-17 19:50                                               ` Vivek Goyal
2010-12-17 19:52                                                 ` Yinghai Lu
2010-12-17 20:01                                                   ` Vivek Goyal
2010-12-17 20:06                                                     ` Yinghai Lu
2010-12-17 20:34                                                       ` Vivek Goyal
2010-12-17 23:51                                                         ` Vivek Goyal
2010-12-17 19:56                                                 ` H. Peter Anvin
2010-12-17 20:11                                                   ` Vivek Goyal
2010-12-17 20:59                                                     ` H. Peter Anvin
2010-12-17 21:13                                                       ` Vivek Goyal
2010-12-20 16:31                                                   ` Stanislaw Gruszka
2010-12-18  4:34                                                 ` tip-bot for H. Peter Anvin [this message]
2010-12-17 19:50                                               ` H. Peter Anvin
2010-12-13 10:25                   ` Américo Wang
2010-12-13 10:25                     ` Américo Wang
2010-12-05 14:35 ` Maciej Rutecki
2010-12-05 14:35   ` Maciej Rutecki

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=tip-7f8595bfacef279f06c82ec98d420ef54f2537e0@git.kernel.org \
    --to=hpa@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=sgruszka@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=vgoyal@redhat.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.