1 #ifndef __ASM_ARM_ARM64_FLUSHTLB_H__
2 #define __ASM_ARM_ARM64_FLUSHTLB_H__
3
4 /* Flush local TLBs, current VMID only */
flush_tlb_local(void)5 static inline void flush_tlb_local(void)
6 {
7 asm volatile(
8 "dsb sy;"
9 "tlbi vmalls12e1;"
10 "dsb sy;"
11 "isb;"
12 : : : "memory");
13 }
14
15 /* Flush innershareable TLBs, current VMID only */
flush_tlb(void)16 static inline void flush_tlb(void)
17 {
18 asm volatile(
19 "dsb sy;"
20 "tlbi vmalls12e1is;"
21 "dsb sy;"
22 "isb;"
23 : : : "memory");
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 asm volatile(
30 "dsb sy;"
31 "tlbi alle1;"
32 "dsb sy;"
33 "isb;"
34 : : : "memory");
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 asm volatile(
41 "dsb sy;"
42 "tlbi alle1is;"
43 "dsb sy;"
44 "isb;"
45 : : : "memory");
46 }
47
48 #endif /* __ASM_ARM_ARM64_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