mm/x86: Remove dead code for hugetlbpage.c
Subsystems (3)
PATCH 1/1 mm/x86: Remove dead code for hugetlbpage.c
It seems to exist since the old times and never used once. Remove them.
Signed-off-by Peter Xu <[email protected]>
--- arch/x86/mm/hugetlbpage.c | 39 --------------------------------------- 1 file changed, 39 deletions(-)
arch/x86/mm/hugetlbpage.c +0 -39
@@ -19,44 +19,6 @@#include <asm/tlbflush.h> #include <asm/elf.h> -#if 0 /* This is just for testing */ -struct page * -follow_huge_addr (struct mm_struct *mm,unsigned long address,int write) -{ -unsigned long start = address; -int length =1 ; -int nr; -struct page *page; -struct vm_area_struct *vma; - - vma =find_vma (mm, addr); -if (!vma || !is_vm_hugetlb_page (vma)) -return ERR_PTR (-EINVAL ); - - pte =huge_pte_offset (mm, address,vma_mmu_pagesize (vma)); - -/* hugetlb should be locked, and hence, prefaulted */ -WARN_ON (!pte ||pte_none (*pte)); - - page = &pte_page (*pte)[vpfn % (HPAGE_SIZE /PAGE_SIZE )]; - -WARN_ON (!PageHead (page)); - -return page; -} - -int pmd_huge (pmd_t pmd) -{ -return 0 ; -} - -int pud_huge (pud_t pud) -{ -return 0 ; -} - -#else -/* * pmd_huge() returns 1 if @pmd is hugetlb related entry, that is normal * hugetlb entry or non-present (migration or hwpoisoned) hugetlb entry.
@@ -72,7 +34,6 @@ int pud_huge(pud_t pud) {return !!(pud_val (pud) & _PAGE_PSE); } -#endif #ifdef CONFIG_HUGETLB_PAGE static unsigned long hugetlb_get_unmapped_area_bottomup(struct file *file,
Signature · 1 line
2.32.0
Quoted 1 line · Peter Xu
It seems to exist since the old times and never used once. Remove them.
Yes, and the code even assumes hugetlb pages are prefaulted. i.e. No page fault support exists.
Quoted 5 lines
Signed-off-by Peter Xu <[email protected]>--- arch/x86/mm/hugetlbpage.c | 39 --------------------------------------- 1 file changed, 39 deletions(-)
Acked-by Mike Kravetz <[email protected]>
Signature · 1 line
Mike Kravetz
Quoted 3 lines · Peter Xu
It seems to exist since the old times and never used once. Remove them.
Signed-off-by Peter Xu <[email protected]>
Acked-by Muchun Song <[email protected]>
Thanks.