aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2017-11-10 02:05:30 -0500
committerIngo Molnar <mingo@kernel.org>2017-11-10 02:05:30 -0500
commitd04fdafc066fed10cc9610b2f36f1d0ff0327864 (patch)
treef3365e4bf1064737a36e5488641a14e54fc173bc
parent7980f029d05d8a3b4634aa6952e1ec51bce9431f (diff)
parentc5e260890d5fd6687287f2b532c738a359a61a82 (diff)
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>
-rw-r--r--arch/x86/mm/mem_encrypt.c1
-rw-r--r--mm/page_alloc.c10
-rw-r--r--mm/sparse.c10
3 files changed, 10 insertions, 11 deletions
diff --git a/arch/x86/mm/mem_encrypt.c b/arch/x86/mm/mem_encrypt.c
index 5049b8bad3e7..d247c14469de 100644
--- a/arch/x86/mm/mem_encrypt.c
+++ b/arch/x86/mm/mem_encrypt.c
@@ -69,7 +69,6 @@ static void __init __sme_early_enc_dec(resource_size_t paddr,
69 if (!sme_me_mask) 69 if (!sme_me_mask)
70 return; 70 return;
71 71
72 local_flush_tlb();
73 wbinvd(); 72 wbinvd();
74 73
75 /* 74 /*
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 8dfd13f724d9..77e4d3c5c57b 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5646,16 +5646,6 @@ void __init sparse_memory_present_with_active_regions(int nid)
5646 unsigned long start_pfn, end_pfn; 5646 unsigned long start_pfn, end_pfn;
5647 int i, this_nid; 5647 int i, this_nid;
5648 5648
5649#ifdef CONFIG_SPARSEMEM_EXTREME
5650 if (!mem_section) {
5651 unsigned long size, align;
5652
5653 size = sizeof(struct mem_section) * NR_SECTION_ROOTS;
5654 align = 1 << (INTERNODE_CACHE_SHIFT);
5655 mem_section = memblock_virt_alloc(size, align);
5656 }
5657#endif
5658
5659 for_each_mem_pfn_range(i, nid, &start_pfn, &end_pfn, &this_nid) 5649 for_each_mem_pfn_range(i, nid, &start_pfn, &end_pfn, &this_nid)
5660 memory_present(this_nid, start_pfn, end_pfn); 5650 memory_present(this_nid, start_pfn, end_pfn);
5661} 5651}
diff --git a/mm/sparse.c b/mm/sparse.c
index 044138852baf..60805abf98af 100644
--- a/mm/sparse.c
+++ b/mm/sparse.c
@@ -207,6 +207,16 @@ void __init memory_present(int nid, unsigned long start, unsigned long end)
207{ 207{
208 unsigned long pfn; 208 unsigned long pfn;
209 209
210#ifdef CONFIG_SPARSEMEM_EXTREME
211 if (unlikely(!mem_section)) {
212 unsigned long size, align;
213
214 size = sizeof(struct mem_section) * NR_SECTION_ROOTS;
215 align = 1 << (INTERNODE_CACHE_SHIFT);
216 mem_section = memblock_virt_alloc(size, align);
217 }
218#endif
219
210 start &= PAGE_SECTION_MASK; 220 start &= PAGE_SECTION_MASK;
211 mminit_validate_memmodel_limits(&start, &end); 221 mminit_validate_memmodel_limits(&start, &end);
212 for (pfn = start; pfn < end; pfn += PAGES_PER_SECTION) { 222 for (pfn = start; pfn < end; pfn += PAGES_PER_SECTION) {