[PATCH 3/4] arm64: mm: move memblock_clear_nomap after __add_pages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Li Chen <lchen@xxxxxxxxxxxxx>

I'm trying to add struct page support to nomap reserved memory,
and have skipped nomap bitmap_intersects check in fill_subsection_map,
so just move memblock_clear_nomap after __add_pages.

Signed-off-by: Li Chen <lchen@xxxxxxxxxxxxx>
Change-Id: I5e26fdc3f3e55b12f1acc1adb47fb262c4877ff3
---
 arch/arm64/mm/mmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c
index 6680689242df..2e7f503837e4 100644
--- a/arch/arm64/mm/mmu.c
+++ b/arch/arm64/mm/mmu.c
@@ -1537,10 +1537,10 @@ int arch_add_memory(int nid, u64 start, u64 size,
 			     size, params->pgprot, __pgd_pgtable_alloc,
 			     flags);
 
-	memblock_clear_nomap(start, size);
 
 	ret = __add_pages(nid, start >> PAGE_SHIFT, size >> PAGE_SHIFT,
 			   params);
+	memblock_clear_nomap(start, size);
 	if (ret)
 		__remove_pgd_mapping(swapper_pg_dir,
 				     __phys_to_virt(start), size);
-- 
2.25.1




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux