linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86: fix lower bound of crash kernel low reservation
@ 2017-06-16 16:16 Jiri Bohac
  2017-06-22 11:10 ` [tip:x86/boot] x86/debug: Extend the lower bound of crash kernel low reservations tip-bot for Jiri Bohac
  0 siblings, 1 reply; 2+ messages in thread
From: Jiri Bohac @ 2017-06-16 16:16 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Yinghai Lu; +Cc: linux-kernel

Commit 0212f9159694 (x86: Add Crash kernel low reservation)
introduced reserve_crashkernel_low. This is used to reserve
crash kernel memory either if crashkernel=size,low is given
on the command line or if the region reserved by
reserve_crashkernel is entirely above 4G.

reserve_crashkernel_low tries to find a block of low_size bytes.
But there seems to be no good reason to restrict the lower bound
of the range to low_size. 

Make memblock_find_in_range search from the start of memory.

Signed-off-by: Jiri Bohac <jbohac@suse.cz>
---
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
index f81823695014..65622f07e633 100644
--- a/arch/x86/kernel/setup.c
+++ b/arch/x86/kernel/setup.c
@@ -503,7 +503,7 @@ static int __init reserve_crashkernel_low(void)
 			return 0;
 	}
 
-	low_base = memblock_find_in_range(low_size, 1ULL << 32, low_size, CRASH_ALIGN);
+	low_base = memblock_find_in_range(0, 1ULL << 32, low_size, CRASH_ALIGN);
 	if (!low_base) {
 		pr_err("Cannot reserve %ldMB crashkernel low memory, please try smaller size.\n",
 		       (unsigned long)(low_size >> 20));

-- 
Jiri Bohac <jbohac@suse.cz>
SUSE Labs, Prague, Czechia

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

end of thread, other threads:[~2017-06-22 11:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-16 16:16 [PATCH] x86: fix lower bound of crash kernel low reservation Jiri Bohac
2017-06-22 11:10 ` [tip:x86/boot] x86/debug: Extend the lower bound of crash kernel low reservations tip-bot for Jiri Bohac

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).