mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86/e820: don't merge consecutive E820_PRAM ranges
@ 2016-10-12 18:01 Dan Williams
  2016-10-14 14:15 ` Dan Williams
  2016-10-16 11:20 ` [tip:x86/urgent] x86/e820: Don't " tip-bot for Dan Williams
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Williams @ 2016-10-12 18:01 UTC (permalink / raw)
  To: mingo
  Cc: linux-nvdimm, x86, Dave Chinner, linux-kernel, stable,
	Jeff Moyer, Zhang Yi, Thomas Gleixner

Commit 917db484dc6a "x86/boot: Fix kdump, cleanup aborted E820_PRAM
max_pfn manipulation" fixed up the broken manipulations of max_pfn in
the presence of E820_PRAM ranges. However, it also broke the
sanitize_e820_map() support for not merging E820_PRAM ranges.
Re-introduce the enabling to keep resource boundaries between
consecutive defined ranges. Otherwise, for example, an environment that
boots with memmap=2G!8G,2G!10G will end up with a single 4G /dev/pmem0
device instead of a /dev/pmem0 and /dev/pmem1 device 2G in size.

Cc: <stable@vger.kernel.org>
Cc: Zhang Yi <yizhan@redhat.com>
Cc: Jeff Moyer <jmoyer@redhat.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Reported-by: Dave Chinner <david@fromorbit.com>
Fixes: 917db484dc6a ("x86/boot: Fix kdump, cleanup aborted E820_PRAM max_pfn manipulation")
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 arch/x86/kernel/e820.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c
index b85fe5f91c3f..90e8dde3ec26 100644
--- a/arch/x86/kernel/e820.c
+++ b/arch/x86/kernel/e820.c
@@ -350,7 +350,7 @@ int __init sanitize_e820_map(struct e820entry *biosmap, int max_nr_map,
 		 * continue building up new bios map based on this
 		 * information
 		 */
-		if (current_type != last_type) {
+		if (current_type != last_type || current_type == E820_PRAM) {
 			if (last_type != 0)	 {
 				new_bios[new_bios_entry].size =
 					change_point[chgidx]->addr - last_addr;

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

end of thread, other threads:[~2016-10-16 11:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-12 18:01 [PATCH] x86/e820: don't merge consecutive E820_PRAM ranges Dan Williams
2016-10-14 14:15 ` Dan Williams
2016-10-16 11:20 ` [tip:x86/urgent] x86/e820: Don't " tip-bot for Dan Williams

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

Powered by JetHome