1 #ifndef __ASM_ARM_ARM32_FLUSHTLB_H__
2 #define __ASM_ARM_ARM32_FLUSHTLB_H__
3 
4 /* Flush local TLBs, current VMID only */
flush_tlb_local(void)5 static inline void flush_tlb_local(void)
6 {
7     dsb(sy);
8 
9     WRITE_CP32((uint32_t) 0, TLBIALL);
10 
11     dsb(sy);
12     isb();
13 }
14 
15 /* Flush inner shareable TLBs, current VMID only */
flush_tlb(void)16 static inline void flush_tlb(void)
17 {
18     dsb(sy);
19 
20     WRITE_CP32((uint32_t) 0, TLBIALLIS);
21 
22     dsb(sy);
23     isb();
24 }
25 
26 /* Flush local TLBs, all VMIDs, non-hypervisor mode */
flush_tlb_all_local(void)27 static inline void flush_tlb_all_local(void)
28 {
29     dsb(sy);
30 
31     WRITE_CP32((uint32_t) 0, TLBIALLNSNH);
32 
33     dsb(sy);
34     isb();
35 }
36 
37 /* Flush innershareable TLBs, all VMIDs, non-hypervisor mode */
flush_tlb_all(void)38 static inline void flush_tlb_all(void)
39 {
40     dsb(sy);
41 
42     WRITE_CP32((uint32_t) 0, TLBIALLNSNHIS);
43 
44     dsb(sy);
45     isb();
46 }
47 
48 #endif /* __ASM_ARM_ARM32_FLUSHTLB_H__ */
49 /*
50  * Local variables:
51  * mode: C
52  * c-file-style: "BSD"
53  * c-basic-offset: 4
54  * indent-tabs-mode: nil
55  * End:
56  */
57