xref: /linux/arch/mips/include/asm/tlbex.h (revision 06d07429858317ded2db7986113a9e0129cd599b)
1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
2722b4544SJames Hogan #ifndef __ASM_TLBEX_H
3722b4544SJames Hogan #define __ASM_TLBEX_H
4722b4544SJames Hogan 
5722b4544SJames Hogan #include <asm/uasm.h>
6722b4544SJames Hogan 
7722b4544SJames Hogan /*
8722b4544SJames Hogan  * Write random or indexed TLB entry, and care about the hazards from
9722b4544SJames Hogan  * the preceding mtc0 and for the following eret.
10722b4544SJames Hogan  */
11722b4544SJames Hogan enum tlb_write_entry {
12722b4544SJames Hogan 	tlb_random,
13722b4544SJames Hogan 	tlb_indexed
14722b4544SJames Hogan };
15722b4544SJames Hogan 
16722b4544SJames Hogan extern int pgd_reg;
17722b4544SJames Hogan 
18722b4544SJames Hogan void build_get_pmde64(u32 **p, struct uasm_label **l, struct uasm_reloc **r,
19722b4544SJames Hogan 		      unsigned int tmp, unsigned int ptr);
20722b4544SJames Hogan void build_get_pgde32(u32 **p, unsigned int tmp, unsigned int ptr);
21722b4544SJames Hogan void build_get_ptep(u32 **p, unsigned int tmp, unsigned int ptr);
22722b4544SJames Hogan void build_update_entries(u32 **p, unsigned int tmp, unsigned int ptep);
23722b4544SJames Hogan void build_tlb_write_entry(u32 **p, struct uasm_label **l,
24722b4544SJames Hogan 			   struct uasm_reloc **r,
25722b4544SJames Hogan 			   enum tlb_write_entry wmode);
26*6fb04df9SArnd Bergmann void build_tlb_refill_handler(void);
27722b4544SJames Hogan 
284bcb4ad6SPaul Burton extern void handle_tlbl(void);
294bcb4ad6SPaul Burton extern char handle_tlbl_end[];
304bcb4ad6SPaul Burton 
314bcb4ad6SPaul Burton extern void handle_tlbs(void);
324bcb4ad6SPaul Burton extern char handle_tlbs_end[];
334bcb4ad6SPaul Burton 
344bcb4ad6SPaul Burton extern void handle_tlbm(void);
354bcb4ad6SPaul Burton extern char handle_tlbm_end[];
364bcb4ad6SPaul Burton 
37722b4544SJames Hogan #endif /* __ASM_TLBEX_H */
38