]> www.infradead.org Git - users/willy/pagecache.git/commitdiff
mm: Tidy up set_ptes definition
authorMatthew Wilcox (Oracle) <willy@infradead.org>
Sun, 5 Mar 2023 16:02:06 +0000 (11:02 -0500)
committerMatthew Wilcox (Oracle) <willy@infradead.org>
Wed, 2 Aug 2023 02:53:28 +0000 (22:53 -0400)
Now that all architectures are converted, we can remove the
PFN_PTE_SHIFT ifdef and we can define set_pte_at() unconditionally.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
include/linux/pgtable.h

index 3fde0d5d1c298f3c878c1af0a88cc19ab50c21ca..9df42e4721fcccd61d3fa06f0ef1f80cbde62081 100644 (file)
@@ -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.
@@ -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,