Commit d5ed7444 authored by Aneesh Kumar K.V's avatar Aneesh Kumar K.V Committed by Linus Torvalds
Browse files

mm/hugetlb: export hugetlb_entry_migration helper

We will be using this later from the ppc64 code.  Change the return type
to bool.


Signed-off-by: default avatarAneesh Kumar K.V <>
Reviewed-by: default avatarNaoya Horiguchi <>
Cc: Anshuman Khandual <>
Cc: Michael Ellerman <>
Cc: Benjamin Herrenschmidt <>
Cc: Mike Kravetz <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 080dbb61
......@@ -126,6 +126,7 @@ int pud_huge(pud_t pud);
unsigned long hugetlb_change_protection(struct vm_area_struct *vma,
unsigned long address, unsigned long end, pgprot_t newprot);
bool is_hugetlb_entry_migration(pte_t pte);
static inline void reset_vma_resv_huge_pages(struct vm_area_struct *vma)
......@@ -3201,17 +3201,17 @@ static void set_huge_ptep_writable(struct vm_area_struct *vma,
update_mmu_cache(vma, address, ptep);
static int is_hugetlb_entry_migration(pte_t pte)
bool is_hugetlb_entry_migration(pte_t pte)
swp_entry_t swp;
if (huge_pte_none(pte) || pte_present(pte))
return 0;
return false;
swp = pte_to_swp_entry(pte);
if (non_swap_entry(swp) && is_migration_entry(swp))
return 1;
return true;
return 0;
return false;
static int is_hugetlb_entry_hwpoisoned(pte_t pte)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment