Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Make extended crashkernel= syntax less confusing
@ 2008-04-30  1:36 Michael Ellerman
  2008-04-30 18:29 ` Andrew Morton
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Ellerman @ 2008-04-30  1:36 UTC (permalink / raw)
  To: Andrew Morton; +Cc: bwalle, kexec

The extended crashkernel syntax is a little confusing in the
way it handles ranges. eg:

 crashkernel=512M-2G:64M,2G-:128M

Means if the machine has between 512M and 2G of memory the
crash region should be 64M, and if the machine has 2G of
memory the region should be 64M. Only if the machine has
more than 2G memory will 128M be allocated.

Although that semantic is correct, it is somewhat baffling.
Instead I propose that the end of the range means the first
address past the end of the range, ie: 512M up to but not
including 2G.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Acked-by: Bernhard Walle <bwalle@suse.de>
---

 kernel/kexec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/kexec.c b/kernel/kexec.c
index 6782dce..0ab5e33 100644
--- a/kernel/kexec.c
+++ b/kernel/kexec.c
@@ -1217,7 +1217,7 @@ static int __init parse_crashkernel_mem(char 			*cmdline,
 		}
 
 		/* match ? */
-		if (system_ram >= start && system_ram <= end) {
+		if (system_ram >= start && system_ram < end) {
 			*crash_size = size;
 			break;
 		}
-- 
1.5.5


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

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

end of thread, other threads:[~2008-05-01  0:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-30  1:36 [PATCH] Make extended crashkernel= syntax less confusing Michael Ellerman
2008-04-30 18:29 ` Andrew Morton
2008-04-30 21:57   ` Bernhard Walle
2008-05-01  0:16     ` Simon Horman
2008-04-30 23:16   ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox