All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: Move crashkernel reservation before dma32_reserve_bootmem()
@ 2008-07-13 18:49 Bernhard Walle
  2008-07-14  2:43 ` Ken'ichi Ohmichi
  2008-07-14 13:30 ` Vivek Goyal
  0 siblings, 2 replies; 13+ messages in thread
From: Bernhard Walle @ 2008-07-13 18:49 UTC (permalink / raw)
  To: x86; +Cc: akpm, Bernhard Walle, kexec, Bernhard Walle, vgoyal

From: Bernhard Walle <bernhard.walle@gmx.de>

On a x86-64 machine (nothing special I could encounter) I had the problem that
crashkernel reservation with the usual "64M@16M" failed. While debugging that,
I encountered that dma32_reserve_bootmem() reserves a memory region which is in
that area.

Because dma32_reserve_bootmem() does not rely on a specific offset but
crashkernel does, it makes sense to move the crashkernel reservation up a bit.
I tested that patch and it works without problems. I don't see any negative
effects of that move, but maybe I oversaw something ...

While the long-term solution is to make the crashkernel reservation dynamic
(which is already done in -tip), this bug should be fixed also short-term for
2.6.26 (or 2.6.26-stable if it's too short), and that's why I made that patch.


Signed-off-by: Bernhard Walle <bwalle@suse.de>
Signed-off-by: Bernhard Walle <bernhard.walle@gmx.de>
---
 arch/x86/kernel/setup_64.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/setup_64.c b/arch/x86/kernel/setup_64.c
index 6dff128..158cefe 100644
--- a/arch/x86/kernel/setup_64.c
+++ b/arch/x86/kernel/setup_64.c
@@ -444,6 +444,12 @@ void __init setup_arch(char **cmdline_p)
 	contig_initmem_init(0, end_pfn);
 #endif
 
+	/*
+	 * dma32_reserve_bootmem() allocates bootmem which may conflict
+	 * with the crashkernel command line, so do that before
+	 */
+	reserve_crashkernel();
+
 	dma32_reserve_bootmem();
 
 #ifdef CONFIG_ACPI_SLEEP
@@ -484,7 +490,6 @@ void __init setup_arch(char **cmdline_p)
 		}
 	}
 #endif
-	reserve_crashkernel();
 
 	reserve_ibft_region();
 
-- 
1.5.6.2


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

^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [PATCH] x86: Move crashkernel reservation before dma32_reserve_bootmem()
@ 2008-07-17 22:15 ` Bernhard Walle
  0 siblings, 0 replies; 13+ messages in thread
From: Bernhard Walle @ 2008-07-17 22:15 UTC (permalink / raw)
  To: x86; +Cc: akpm, kexec, linux-kernel, vgoyal, Bernhard Walle

On a x86-64 machine (nothing special I could encounter) I had the problem that
crashkernel reservation with the usual "64M@16M" failed. While debugging that,
I encountered that dma32_reserve_bootmem() reserves a memory region which is in
that area.

Because dma32_reserve_bootmem() does not rely on a specific offset but
crashkernel does, it makes sense to move the crashkernel reservation up a bit.
I tested that patch and it works without problems. I don't see any negative
effects of that move, but maybe I oversaw something ...

While we strictly don't need that patch in 2.6.27 because we have the
automatic, dynamic offset detection, it makes sense to also include it here
because:

  - it's easier to get it in -stable then,
  - many people are still used to the 'crashkernel=...@16M' syntax,
  - not everybody may be using a reloatable kernel.

Signed-off-by: Bernhard Walle <bwalle@suse.de>
---
 arch/x86/kernel/setup.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index 531b55b..16101c0 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -792,6 +792,12 @@ void __init setup_arch(char **cmdline_p)
 
 	initmem_init(0, max_pfn);
 
+	/*
+	 * dma32_reserve_bootmem() allocates bootmem which may conflict
+	 * with the crashkernel command line, so do that before
+	 */
+	reserve_crashkernel();
+
 #ifdef CONFIG_X86_64
 	dma32_reserve_bootmem();
 #endif
@@ -808,7 +814,6 @@ void __init setup_arch(char **cmdline_p)
 	 */
 	find_smp_config();
 #endif
-	reserve_crashkernel();
 
 	reserve_ibft_region();
 
-- 
1.5.6


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

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2008-07-18 16:22 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-13 18:49 [PATCH] x86: Move crashkernel reservation before dma32_reserve_bootmem() Bernhard Walle
2008-07-14  2:43 ` Ken'ichi Ohmichi
2008-07-14 13:30 ` Vivek Goyal
2008-07-14 13:37   ` Bernhard Walle
2008-07-17  7:30     ` Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2008-07-17 22:15 Bernhard Walle
2008-07-17 22:15 ` Bernhard Walle
2008-07-17 22:50 ` Yinghai Lu
2008-07-17 22:50   ` Yinghai Lu
2008-07-18  9:52   ` Bernhard Walle
2008-07-18  9:52     ` Bernhard Walle
2008-07-18 16:22     ` Yinghai Lu
2008-07-18 16:22       ` Yinghai Lu

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.