diff options
Diffstat (limited to 'arch/x86/mm/init_64.c')
-rw-r--r-- | arch/x86/mm/init_64.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 122bcef222fc..a25cc6fa2207 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c | |||
@@ -763,6 +763,20 @@ unsigned long __init_refok init_memory_mapping(unsigned long start, | |||
763 | end_pfn = end>>PAGE_SHIFT; | 763 | end_pfn = end>>PAGE_SHIFT; |
764 | nr_range = save_mr(mr, nr_range, start_pfn, end_pfn, 0); | 764 | nr_range = save_mr(mr, nr_range, start_pfn, end_pfn, 0); |
765 | 765 | ||
766 | /* try to merge same page size and continuous */ | ||
767 | for (i = 0; nr_range > 1 && i < nr_range - 1; i++) { | ||
768 | unsigned long old_start; | ||
769 | if (mr[i].end != mr[i+1].start || | ||
770 | mr[i].page_size_mask != mr[i+1].page_size_mask) | ||
771 | continue; | ||
772 | /* move it */ | ||
773 | old_start = mr[i].start; | ||
774 | memmove(&mr[i], &mr[i+1], | ||
775 | (nr_range - 1 - i) * sizeof (struct map_range)); | ||
776 | mr[i].start = old_start; | ||
777 | nr_range--; | ||
778 | } | ||
779 | |||
766 | for (i = 0; i < nr_range; i++) | 780 | for (i = 0; i < nr_range; i++) |
767 | printk(KERN_DEBUG " %010lx - %010lx page %s\n", | 781 | printk(KERN_DEBUG " %010lx - %010lx page %s\n", |
768 | mr[i].start, mr[i].end, | 782 | mr[i].start, mr[i].end, |