diff options
Diffstat (limited to 'include/asm-xtensa/tlbflush.h')
-rw-r--r-- | include/asm-xtensa/tlbflush.h | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/include/asm-xtensa/tlbflush.h b/include/asm-xtensa/tlbflush.h index 23bfe9db45f5..43f6ec859af9 100644 --- a/include/asm-xtensa/tlbflush.h +++ b/include/asm-xtensa/tlbflush.h | |||
@@ -39,7 +39,7 @@ extern void flush_tlb_range(struct vm_area_struct*,unsigned long,unsigned long); | |||
39 | * page-table pages. | 39 | * page-table pages. |
40 | */ | 40 | */ |
41 | 41 | ||
42 | extern inline void flush_tlb_pgtables(struct mm_struct *mm, | 42 | static inline void flush_tlb_pgtables(struct mm_struct *mm, |
43 | unsigned long start, unsigned long end) | 43 | unsigned long start, unsigned long end) |
44 | { | 44 | { |
45 | } | 45 | } |
@@ -51,26 +51,26 @@ extern inline void flush_tlb_pgtables(struct mm_struct *mm, | |||
51 | #define ITLB_PROBE_SUCCESS (1 << ITLB_WAYS_LOG2) | 51 | #define ITLB_PROBE_SUCCESS (1 << ITLB_WAYS_LOG2) |
52 | #define DTLB_PROBE_SUCCESS (1 << DTLB_WAYS_LOG2) | 52 | #define DTLB_PROBE_SUCCESS (1 << DTLB_WAYS_LOG2) |
53 | 53 | ||
54 | extern inline unsigned long itlb_probe(unsigned long addr) | 54 | static inline unsigned long itlb_probe(unsigned long addr) |
55 | { | 55 | { |
56 | unsigned long tmp; | 56 | unsigned long tmp; |
57 | __asm__ __volatile__("pitlb %0, %1\n\t" : "=a" (tmp) : "a" (addr)); | 57 | __asm__ __volatile__("pitlb %0, %1\n\t" : "=a" (tmp) : "a" (addr)); |
58 | return tmp; | 58 | return tmp; |
59 | } | 59 | } |
60 | 60 | ||
61 | extern inline unsigned long dtlb_probe(unsigned long addr) | 61 | static inline unsigned long dtlb_probe(unsigned long addr) |
62 | { | 62 | { |
63 | unsigned long tmp; | 63 | unsigned long tmp; |
64 | __asm__ __volatile__("pdtlb %0, %1\n\t" : "=a" (tmp) : "a" (addr)); | 64 | __asm__ __volatile__("pdtlb %0, %1\n\t" : "=a" (tmp) : "a" (addr)); |
65 | return tmp; | 65 | return tmp; |
66 | } | 66 | } |
67 | 67 | ||
68 | extern inline void invalidate_itlb_entry (unsigned long probe) | 68 | static inline void invalidate_itlb_entry (unsigned long probe) |
69 | { | 69 | { |
70 | __asm__ __volatile__("iitlb %0; isync\n\t" : : "a" (probe)); | 70 | __asm__ __volatile__("iitlb %0; isync\n\t" : : "a" (probe)); |
71 | } | 71 | } |
72 | 72 | ||
73 | extern inline void invalidate_dtlb_entry (unsigned long probe) | 73 | static inline void invalidate_dtlb_entry (unsigned long probe) |
74 | { | 74 | { |
75 | __asm__ __volatile__("idtlb %0; dsync\n\t" : : "a" (probe)); | 75 | __asm__ __volatile__("idtlb %0; dsync\n\t" : : "a" (probe)); |
76 | } | 76 | } |
@@ -80,68 +80,68 @@ extern inline void invalidate_dtlb_entry (unsigned long probe) | |||
80 | * caller must follow up with an 'isync', which can be relatively | 80 | * caller must follow up with an 'isync', which can be relatively |
81 | * expensive on some Xtensa implementations. | 81 | * expensive on some Xtensa implementations. |
82 | */ | 82 | */ |
83 | extern inline void invalidate_itlb_entry_no_isync (unsigned entry) | 83 | static inline void invalidate_itlb_entry_no_isync (unsigned entry) |
84 | { | 84 | { |
85 | /* Caller must follow up with 'isync'. */ | 85 | /* Caller must follow up with 'isync'. */ |
86 | __asm__ __volatile__ ("iitlb %0\n" : : "a" (entry) ); | 86 | __asm__ __volatile__ ("iitlb %0\n" : : "a" (entry) ); |
87 | } | 87 | } |
88 | 88 | ||
89 | extern inline void invalidate_dtlb_entry_no_isync (unsigned entry) | 89 | static inline void invalidate_dtlb_entry_no_isync (unsigned entry) |
90 | { | 90 | { |
91 | /* Caller must follow up with 'isync'. */ | 91 | /* Caller must follow up with 'isync'. */ |
92 | __asm__ __volatile__ ("idtlb %0\n" : : "a" (entry) ); | 92 | __asm__ __volatile__ ("idtlb %0\n" : : "a" (entry) ); |
93 | } | 93 | } |
94 | 94 | ||
95 | extern inline void set_itlbcfg_register (unsigned long val) | 95 | static inline void set_itlbcfg_register (unsigned long val) |
96 | { | 96 | { |
97 | __asm__ __volatile__("wsr %0, "__stringify(ITLBCFG)"\n\t" "isync\n\t" | 97 | __asm__ __volatile__("wsr %0, "__stringify(ITLBCFG)"\n\t" "isync\n\t" |
98 | : : "a" (val)); | 98 | : : "a" (val)); |
99 | } | 99 | } |
100 | 100 | ||
101 | extern inline void set_dtlbcfg_register (unsigned long val) | 101 | static inline void set_dtlbcfg_register (unsigned long val) |
102 | { | 102 | { |
103 | __asm__ __volatile__("wsr %0, "__stringify(DTLBCFG)"; dsync\n\t" | 103 | __asm__ __volatile__("wsr %0, "__stringify(DTLBCFG)"; dsync\n\t" |
104 | : : "a" (val)); | 104 | : : "a" (val)); |
105 | } | 105 | } |
106 | 106 | ||
107 | extern inline void set_ptevaddr_register (unsigned long val) | 107 | static inline void set_ptevaddr_register (unsigned long val) |
108 | { | 108 | { |
109 | __asm__ __volatile__(" wsr %0, "__stringify(PTEVADDR)"; isync\n" | 109 | __asm__ __volatile__(" wsr %0, "__stringify(PTEVADDR)"; isync\n" |
110 | : : "a" (val)); | 110 | : : "a" (val)); |
111 | } | 111 | } |
112 | 112 | ||
113 | extern inline unsigned long read_ptevaddr_register (void) | 113 | static inline unsigned long read_ptevaddr_register (void) |
114 | { | 114 | { |
115 | unsigned long tmp; | 115 | unsigned long tmp; |
116 | __asm__ __volatile__("rsr %0, "__stringify(PTEVADDR)"\n\t" : "=a" (tmp)); | 116 | __asm__ __volatile__("rsr %0, "__stringify(PTEVADDR)"\n\t" : "=a" (tmp)); |
117 | return tmp; | 117 | return tmp; |
118 | } | 118 | } |
119 | 119 | ||
120 | extern inline void write_dtlb_entry (pte_t entry, int way) | 120 | static inline void write_dtlb_entry (pte_t entry, int way) |
121 | { | 121 | { |
122 | __asm__ __volatile__("wdtlb %1, %0; dsync\n\t" | 122 | __asm__ __volatile__("wdtlb %1, %0; dsync\n\t" |
123 | : : "r" (way), "r" (entry) ); | 123 | : : "r" (way), "r" (entry) ); |
124 | } | 124 | } |
125 | 125 | ||
126 | extern inline void write_itlb_entry (pte_t entry, int way) | 126 | static inline void write_itlb_entry (pte_t entry, int way) |
127 | { | 127 | { |
128 | __asm__ __volatile__("witlb %1, %0; isync\n\t" | 128 | __asm__ __volatile__("witlb %1, %0; isync\n\t" |
129 | : : "r" (way), "r" (entry) ); | 129 | : : "r" (way), "r" (entry) ); |
130 | } | 130 | } |
131 | 131 | ||
132 | extern inline void invalidate_page_directory (void) | 132 | static inline void invalidate_page_directory (void) |
133 | { | 133 | { |
134 | invalidate_dtlb_entry (DTLB_WAY_PGTABLE); | 134 | invalidate_dtlb_entry (DTLB_WAY_PGTABLE); |
135 | } | 135 | } |
136 | 136 | ||
137 | extern inline void invalidate_itlb_mapping (unsigned address) | 137 | static inline void invalidate_itlb_mapping (unsigned address) |
138 | { | 138 | { |
139 | unsigned long tlb_entry; | 139 | unsigned long tlb_entry; |
140 | while ((tlb_entry = itlb_probe (address)) & ITLB_PROBE_SUCCESS) | 140 | while ((tlb_entry = itlb_probe (address)) & ITLB_PROBE_SUCCESS) |
141 | invalidate_itlb_entry (tlb_entry); | 141 | invalidate_itlb_entry (tlb_entry); |
142 | } | 142 | } |
143 | 143 | ||
144 | extern inline void invalidate_dtlb_mapping (unsigned address) | 144 | static inline void invalidate_dtlb_mapping (unsigned address) |
145 | { | 145 | { |
146 | unsigned long tlb_entry; | 146 | unsigned long tlb_entry; |
147 | while ((tlb_entry = dtlb_probe (address)) & DTLB_PROBE_SUCCESS) | 147 | while ((tlb_entry = dtlb_probe (address)) & DTLB_PROBE_SUCCESS) |
@@ -165,28 +165,28 @@ extern inline void invalidate_dtlb_mapping (unsigned address) | |||
165 | * as[07..00] contain the asid | 165 | * as[07..00] contain the asid |
166 | */ | 166 | */ |
167 | 167 | ||
168 | extern inline unsigned long read_dtlb_virtual (int way) | 168 | static inline unsigned long read_dtlb_virtual (int way) |
169 | { | 169 | { |
170 | unsigned long tmp; | 170 | unsigned long tmp; |
171 | __asm__ __volatile__("rdtlb0 %0, %1\n\t" : "=a" (tmp), "+a" (way)); | 171 | __asm__ __volatile__("rdtlb0 %0, %1\n\t" : "=a" (tmp), "+a" (way)); |
172 | return tmp; | 172 | return tmp; |
173 | } | 173 | } |
174 | 174 | ||
175 | extern inline unsigned long read_dtlb_translation (int way) | 175 | static inline unsigned long read_dtlb_translation (int way) |
176 | { | 176 | { |
177 | unsigned long tmp; | 177 | unsigned long tmp; |
178 | __asm__ __volatile__("rdtlb1 %0, %1\n\t" : "=a" (tmp), "+a" (way)); | 178 | __asm__ __volatile__("rdtlb1 %0, %1\n\t" : "=a" (tmp), "+a" (way)); |
179 | return tmp; | 179 | return tmp; |
180 | } | 180 | } |
181 | 181 | ||
182 | extern inline unsigned long read_itlb_virtual (int way) | 182 | static inline unsigned long read_itlb_virtual (int way) |
183 | { | 183 | { |
184 | unsigned long tmp; | 184 | unsigned long tmp; |
185 | __asm__ __volatile__("ritlb0 %0, %1\n\t" : "=a" (tmp), "+a" (way)); | 185 | __asm__ __volatile__("ritlb0 %0, %1\n\t" : "=a" (tmp), "+a" (way)); |
186 | return tmp; | 186 | return tmp; |
187 | } | 187 | } |
188 | 188 | ||
189 | extern inline unsigned long read_itlb_translation (int way) | 189 | static inline unsigned long read_itlb_translation (int way) |
190 | { | 190 | { |
191 | unsigned long tmp; | 191 | unsigned long tmp; |
192 | __asm__ __volatile__("ritlb1 %0, %1\n\t" : "=a" (tmp), "+a" (way)); | 192 | __asm__ __volatile__("ritlb1 %0, %1\n\t" : "=a" (tmp), "+a" (way)); |