1 #ifndef _ASM_SCORE_TLBFLUSH_H
2 #define _ASM_SCORE_TLBFLUSH_H
9 * - flush_tlb_all() flushes all processes TLB entries
10 * - flush_tlb_mm(mm) flushes the specified mm context TLB entries
11 * - flush_tlb_page(vma, vmaddr) flushes one page
12 * - flush_tlb_range(vma, start, end) flushes a range of pages
13 * - flush_tlb_kernel_range(start, end) flushes a range of kernel pages
15 extern void local_flush_tlb_all(void);
16 extern void local_flush_tlb_mm(struct mm_struct
*mm
);
17 extern void local_flush_tlb_range(struct vm_area_struct
*vma
,
18 unsigned long start
, unsigned long end
);
19 extern void local_flush_tlb_kernel_range(unsigned long start
,
21 extern void local_flush_tlb_page(struct vm_area_struct
*vma
,
23 extern void local_flush_tlb_one(unsigned long vaddr
);
25 #define flush_tlb_all() local_flush_tlb_all()
26 #define flush_tlb_mm(mm) local_flush_tlb_mm(mm)
27 #define flush_tlb_range(vma, vmaddr, end) \
28 local_flush_tlb_range(vma, vmaddr, end)
29 #define flush_tlb_kernel_range(vmaddr, end) \
30 local_flush_tlb_kernel_range(vmaddr, end)
31 #define flush_tlb_page(vma, page) local_flush_tlb_page(vma, page)
32 #define flush_tlb_one(vaddr) local_flush_tlb_one(vaddr)
36 static inline unsigned long pevn_get(void)
48 static inline void pevn_set(unsigned long val
)
52 "nop\nnop\nnop\nnop\nnop\n"
56 static inline void pectx_set(unsigned long val
)
60 "nop\nnop\nnop\nnop\nnop\n"
64 static inline unsigned long pectx_get(void)
73 static inline unsigned long tlblock_get(void)
83 static inline void tlblock_set(unsigned long val
)
87 "nop\nnop\nnop\nnop\nnop\n"
91 static inline void tlbpt_set(unsigned long val
)
95 "nop\nnop\nnop\nnop\nnop\n"
99 static inline long tlbpt_get(void)
103 __asm__
__volatile__(
111 static inline void peaddr_set(unsigned long val
)
113 __asm__
__volatile__(
115 "nop\nnop\nnop\nnop\nnop\n"
119 /* TLB operations. */
120 static inline void tlb_probe(void)
122 __asm__
__volatile__("stlb;nop;nop;nop;nop;nop");
125 static inline void tlb_read(void)
127 __asm__
__volatile__("mftlb;nop;nop;nop;nop;nop");
130 static inline void tlb_write_indexed(void)
132 __asm__
__volatile__("mtptlb;nop;nop;nop;nop;nop");
135 static inline void tlb_write_random(void)
137 __asm__
__volatile__("mtrtlb;nop;nop;nop;nop;nop");
140 #endif /* Not __ASSEMBLY__ */
142 #endif /* _ASM_SCORE_TLBFLUSH_H */