Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc: Deduplicate prototypes of ptep_set_access_flags() and phys_mem_access_prot()

Prototypes of ptep_set_access_flags() and phys_mem_access_prot() are identical
for book3s and nohash.

Deduplicate them.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/b846832cce842a2852615b7356937fb9507e436d.1695659959.git.christophe.leroy@csgroup.eu

authored by

Christophe Leroy and committed by
Michael Ellerman
93f81f6e 3b8547ec

+10 -19
-9
arch/powerpc/include/asm/book3s/pgtable.h
··· 9 9 #endif 10 10 11 11 #ifndef __ASSEMBLY__ 12 - #define __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS 13 - extern int ptep_set_access_flags(struct vm_area_struct *vma, unsigned long address, 14 - pte_t *ptep, pte_t entry, int dirty); 15 - 16 - struct file; 17 - extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, 18 - unsigned long size, pgprot_t vma_prot); 19 - #define __HAVE_PHYS_MEM_ACCESS_PROT 20 - 21 12 void __update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t *ptep); 22 13 23 14 /*
-10
arch/powerpc/include/asm/nohash/pgtable.h
··· 207 207 mb(); 208 208 } 209 209 210 - 211 - #define __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS 212 - extern int ptep_set_access_flags(struct vm_area_struct *vma, unsigned long address, 213 - pte_t *ptep, pte_t entry, int dirty); 214 - 215 210 /* 216 211 * Macro to mark a page protection value as "uncacheable". 217 212 */ ··· 234 239 (__pgprot(pgprot_val(prot) & ~_PAGE_CACHE_CTL)) 235 240 236 241 #define pgprot_writecombine pgprot_noncached_wc 237 - 238 - struct file; 239 - extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, 240 - unsigned long size, pgprot_t vma_prot); 241 - #define __HAVE_PHYS_MEM_ACCESS_PROT 242 242 243 243 #ifdef CONFIG_HUGETLB_PAGE 244 244 static inline int hugepd_ok(hugepd_t hpd)
+10
arch/powerpc/include/asm/pgtable.h
··· 110 110 static inline void mark_initmem_nx(void) { } 111 111 #endif 112 112 113 + #define __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS 114 + int ptep_set_access_flags(struct vm_area_struct *vma, unsigned long address, 115 + pte_t *ptep, pte_t entry, int dirty); 116 + 117 + struct file; 118 + pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, 119 + unsigned long size, pgprot_t vma_prot); 120 + #define __HAVE_PHYS_MEM_ACCESS_PROT 121 + 122 + 113 123 /* 114 124 * When used, PTE_FRAG_NR is defined in subarch pgtable.h 115 125 * so we are sure it is included when arriving here.