mm/hmm: fault non-owner device private entries
[linux-2.6-microblaze.git] / mm / sparse-vmemmap.c
index f4fa61d..dbbd1a7 100644 (file)
@@ -78,6 +78,14 @@ static int __split_vmemmap_huge_pmd(pmd_t *pmd, unsigned long start)
 
        spin_lock(&init_mm.page_table_lock);
        if (likely(pmd_leaf(*pmd))) {
+               /*
+                * Higher order allocations from buddy allocator must be able to
+                * be treated as indepdenent small pages (as they can be freed
+                * individually).
+                */
+               if (!PageReserved(page))
+                       split_page(page, get_order(PMD_SIZE));
+
                /* Make pte visible before pmd. See comment in pmd_install(). */
                smp_wmb();
                pmd_populate_kernel(&init_mm, pmd, pgtable);