xref: /OK3568_Linux_fs/kernel/arch/powerpc/include/asm/copro.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0-or-later */
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun  * Copyright 2014 IBM Corp.
4*4882a593Smuzhiyun  */
5*4882a593Smuzhiyun 
6*4882a593Smuzhiyun #ifndef _ASM_POWERPC_COPRO_H
7*4882a593Smuzhiyun #define _ASM_POWERPC_COPRO_H
8*4882a593Smuzhiyun 
9*4882a593Smuzhiyun #include <linux/mm_types.h>
10*4882a593Smuzhiyun 
11*4882a593Smuzhiyun struct copro_slb
12*4882a593Smuzhiyun {
13*4882a593Smuzhiyun 	u64 esid, vsid;
14*4882a593Smuzhiyun };
15*4882a593Smuzhiyun 
16*4882a593Smuzhiyun int copro_handle_mm_fault(struct mm_struct *mm, unsigned long ea,
17*4882a593Smuzhiyun 			  unsigned long dsisr, vm_fault_t *flt);
18*4882a593Smuzhiyun 
19*4882a593Smuzhiyun int copro_calculate_slb(struct mm_struct *mm, u64 ea, struct copro_slb *slb);
20*4882a593Smuzhiyun 
21*4882a593Smuzhiyun 
22*4882a593Smuzhiyun #ifdef CONFIG_PPC_COPRO_BASE
23*4882a593Smuzhiyun void copro_flush_all_slbs(struct mm_struct *mm);
24*4882a593Smuzhiyun #else
copro_flush_all_slbs(struct mm_struct * mm)25*4882a593Smuzhiyun static inline void copro_flush_all_slbs(struct mm_struct *mm) {}
26*4882a593Smuzhiyun #endif
27*4882a593Smuzhiyun #endif /* _ASM_POWERPC_COPRO_H */
28