Skip to content

Commit

Permalink
mm: tidy up set_ptes definition
Browse files Browse the repository at this point in the history
Now that all architectures are converted, we can remove the PFN_PTE_SHIFT
ifdef and we can define set_pte_at() unconditionally.

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Matthew Wilcox (Oracle) <[email protected]>
Reviewed-by: Anshuman Khandual <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
  • Loading branch information
Matthew Wilcox (Oracle) authored and akpm00 committed Aug 22, 2023
1 parent 00caa3b commit 75473b7
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions include/linux/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ static inline int pmd_young(pmd_t pmd)
#endif

#ifndef set_ptes
#ifdef PFN_PTE_SHIFT
/**
* set_ptes - Map consecutive pages to a contiguous range of addresses.
* @mm: Address space to map the pages into.
Expand Down Expand Up @@ -234,13 +233,8 @@ static inline void set_ptes(struct mm_struct *mm, unsigned long addr,
}
arch_leave_lazy_mmu_mode();
}
#ifndef set_pte_at
#define set_pte_at(mm, addr, ptep, pte) set_ptes(mm, addr, ptep, pte, 1)
#endif
#endif
#else
#define set_pte_at(mm, addr, ptep, pte) set_ptes(mm, addr, ptep, pte, 1)
#endif

#ifndef __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS
extern int ptep_set_access_flags(struct vm_area_struct *vma,
Expand Down

0 comments on commit 75473b7

Please sign in to comment.