1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */ 2*4882a593Smuzhiyun #ifndef _ASM_POWERPC_BOOK3S_PGTABLE_H 3*4882a593Smuzhiyun #define _ASM_POWERPC_BOOK3S_PGTABLE_H 4*4882a593Smuzhiyun 5*4882a593Smuzhiyun #ifdef CONFIG_PPC64 6*4882a593Smuzhiyun #include <asm/book3s/64/pgtable.h> 7*4882a593Smuzhiyun #else 8*4882a593Smuzhiyun #include <asm/book3s/32/pgtable.h> 9*4882a593Smuzhiyun #endif 10*4882a593Smuzhiyun 11*4882a593Smuzhiyun #define FIRST_USER_ADDRESS 0UL 12*4882a593Smuzhiyun #ifndef __ASSEMBLY__ 13*4882a593Smuzhiyun /* Insert a PTE, top-level function is out of line. It uses an inline 14*4882a593Smuzhiyun * low level function in the respective pgtable-* files 15*4882a593Smuzhiyun */ 16*4882a593Smuzhiyun extern void set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep, 17*4882a593Smuzhiyun pte_t pte); 18*4882a593Smuzhiyun 19*4882a593Smuzhiyun 20*4882a593Smuzhiyun #define __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS 21*4882a593Smuzhiyun extern int ptep_set_access_flags(struct vm_area_struct *vma, unsigned long address, 22*4882a593Smuzhiyun pte_t *ptep, pte_t entry, int dirty); 23*4882a593Smuzhiyun 24*4882a593Smuzhiyun struct file; 25*4882a593Smuzhiyun extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, 26*4882a593Smuzhiyun unsigned long size, pgprot_t vma_prot); 27*4882a593Smuzhiyun #define __HAVE_PHYS_MEM_ACCESS_PROT 28*4882a593Smuzhiyun 29*4882a593Smuzhiyun /* 30*4882a593Smuzhiyun * This gets called at the end of handling a page fault, when 31*4882a593Smuzhiyun * the kernel has put a new PTE into the page table for the process. 32*4882a593Smuzhiyun * We use it to ensure coherency between the i-cache and d-cache 33*4882a593Smuzhiyun * for the page which has just been mapped in. 34*4882a593Smuzhiyun * On machines which use an MMU hash table, we use this to put a 35*4882a593Smuzhiyun * corresponding HPTE into the hash table ahead of time, instead of 36*4882a593Smuzhiyun * waiting for the inevitable extra hash-table miss exception. 37*4882a593Smuzhiyun */ 38*4882a593Smuzhiyun void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t *ptep); 39*4882a593Smuzhiyun 40*4882a593Smuzhiyun #endif /* __ASSEMBLY__ */ 41*4882a593Smuzhiyun #endif 42