Преглед изворни кода

Merge branch 'x86/mm' into x86/asm, to merge branches

Most of x86/mm is already in x86/asm, so merge the rest too.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Ingo Molnar пре 7 година
родитељ
комит
d04fdafc06
3 измењених фајлова са 10 додато и 11 уклоњено
  1. 0 1
      arch/x86/mm/mem_encrypt.c
  2. 0 10
      mm/page_alloc.c
  3. 10 0
      mm/sparse.c

+ 0 - 1
arch/x86/mm/mem_encrypt.c

@@ -69,7 +69,6 @@ static void __init __sme_early_enc_dec(resource_size_t paddr,
 	if (!sme_me_mask)
 	if (!sme_me_mask)
 		return;
 		return;
 
 
-	local_flush_tlb();
 	wbinvd();
 	wbinvd();
 
 
 	/*
 	/*

+ 0 - 10
mm/page_alloc.c

@@ -5646,16 +5646,6 @@ void __init sparse_memory_present_with_active_regions(int nid)
 	unsigned long start_pfn, end_pfn;
 	unsigned long start_pfn, end_pfn;
 	int i, this_nid;
 	int i, this_nid;
 
 
-#ifdef CONFIG_SPARSEMEM_EXTREME
-	if (!mem_section) {
-		unsigned long size, align;
-
-		size = sizeof(struct mem_section) * NR_SECTION_ROOTS;
-		align = 1 << (INTERNODE_CACHE_SHIFT);
-		mem_section = memblock_virt_alloc(size, align);
-	}
-#endif
-
 	for_each_mem_pfn_range(i, nid, &start_pfn, &end_pfn, &this_nid)
 	for_each_mem_pfn_range(i, nid, &start_pfn, &end_pfn, &this_nid)
 		memory_present(this_nid, start_pfn, end_pfn);
 		memory_present(this_nid, start_pfn, end_pfn);
 }
 }

+ 10 - 0
mm/sparse.c

@@ -207,6 +207,16 @@ void __init memory_present(int nid, unsigned long start, unsigned long end)
 {
 {
 	unsigned long pfn;
 	unsigned long pfn;
 
 
+#ifdef CONFIG_SPARSEMEM_EXTREME
+	if (unlikely(!mem_section)) {
+		unsigned long size, align;
+
+		size = sizeof(struct mem_section) * NR_SECTION_ROOTS;
+		align = 1 << (INTERNODE_CACHE_SHIFT);
+		mem_section = memblock_virt_alloc(size, align);
+	}
+#endif
+
 	start &= PAGE_SECTION_MASK;
 	start &= PAGE_SECTION_MASK;
 	mminit_validate_memmodel_limits(&start, &end);
 	mminit_validate_memmodel_limits(&start, &end);
 	for (pfn = start; pfn < end; pfn += PAGES_PER_SECTION) {
 	for (pfn = start; pfn < end; pfn += PAGES_PER_SECTION) {