hulk inclusion category: feature bugzilla: NA ---------------------------------------- sharepool remove the CONFIG_HUGETLB_INSERT_PAGE dependency by using the remap_pfn_range_try_pmd() interface for hugepages mappings. Signed-off-by: Yin Tirui <yintirui@huawei.com> --- mm/Kconfig | 1 - mm/share_pool.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/mm/Kconfig b/mm/Kconfig index 2465b06e8d84..15b5e9f57f80 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -1346,7 +1346,6 @@ config IOMMU_MM_DATA menuconfig ASCEND_FEATURES bool "Support Ascend Features" depends on ARM64 - select HUGETLB_INSERT_PAGE select EXTEND_HUGEPAGE_MAPPING select SHARE_POOL help diff --git a/mm/share_pool.c b/mm/share_pool.c index f52705ac814b..fb92eb5094b5 100644 --- a/mm/share_pool.c +++ b/mm/share_pool.c @@ -1994,8 +1994,8 @@ static int sp_vma_insert_hugepages(struct vm_area_struct *vma, struct page **pag vm_flags_set(vma, VM_IO | VM_PFNMAP | VM_DONTEXPAND | VM_DONTDUMP); do { - int ret = hugetlb_insert_hugepage_pte(vma->vm_mm, uaddr, - vma->vm_page_prot, pages[i]); + int ret = remap_pfn_range_try_pmd(vma, uaddr, page_to_pfn(pages[i]), + PMD_SIZE, vma->vm_page_prot); if (ret) return ret; -- 2.43.0