diff options
Diffstat (limited to 'include/asm-arm/tlbflush.h')
-rw-r--r-- | include/asm-arm/tlbflush.h | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/include/asm-arm/tlbflush.h b/include/asm-arm/tlbflush.h index 8a864b118569..9387a5e1ffe0 100644 --- a/include/asm-arm/tlbflush.h +++ b/include/asm-arm/tlbflush.h | |||
@@ -235,7 +235,7 @@ extern struct cpu_tlb_fns cpu_tlb; | |||
235 | 235 | ||
236 | #define tlb_flag(f) ((always_tlb_flags & (f)) || (__tlb_flag & possible_tlb_flags & (f))) | 236 | #define tlb_flag(f) ((always_tlb_flags & (f)) || (__tlb_flag & possible_tlb_flags & (f))) |
237 | 237 | ||
238 | static inline void flush_tlb_all(void) | 238 | static inline void local_flush_tlb_all(void) |
239 | { | 239 | { |
240 | const int zero = 0; | 240 | const int zero = 0; |
241 | const unsigned int __tlb_flag = __cpu_tlb_flags; | 241 | const unsigned int __tlb_flag = __cpu_tlb_flags; |
@@ -253,7 +253,7 @@ static inline void flush_tlb_all(void) | |||
253 | asm("mcr%? p15, 0, %0, c8, c5, 0" : : "r" (zero)); | 253 | asm("mcr%? p15, 0, %0, c8, c5, 0" : : "r" (zero)); |
254 | } | 254 | } |
255 | 255 | ||
256 | static inline void flush_tlb_mm(struct mm_struct *mm) | 256 | static inline void local_flush_tlb_mm(struct mm_struct *mm) |
257 | { | 257 | { |
258 | const int zero = 0; | 258 | const int zero = 0; |
259 | const int asid = ASID(mm); | 259 | const int asid = ASID(mm); |
@@ -282,7 +282,7 @@ static inline void flush_tlb_mm(struct mm_struct *mm) | |||
282 | } | 282 | } |
283 | 283 | ||
284 | static inline void | 284 | static inline void |
285 | flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr) | 285 | local_flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr) |
286 | { | 286 | { |
287 | const int zero = 0; | 287 | const int zero = 0; |
288 | const unsigned int __tlb_flag = __cpu_tlb_flags; | 288 | const unsigned int __tlb_flag = __cpu_tlb_flags; |
@@ -313,7 +313,7 @@ flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr) | |||
313 | asm("mcr%? p15, 0, %0, c8, c5, 1" : : "r" (uaddr)); | 313 | asm("mcr%? p15, 0, %0, c8, c5, 1" : : "r" (uaddr)); |
314 | } | 314 | } |
315 | 315 | ||
316 | static inline void flush_tlb_kernel_page(unsigned long kaddr) | 316 | static inline void local_flush_tlb_kernel_page(unsigned long kaddr) |
317 | { | 317 | { |
318 | const int zero = 0; | 318 | const int zero = 0; |
319 | const unsigned int __tlb_flag = __cpu_tlb_flags; | 319 | const unsigned int __tlb_flag = __cpu_tlb_flags; |
@@ -384,8 +384,24 @@ static inline void clean_pmd_entry(pmd_t *pmd) | |||
384 | /* | 384 | /* |
385 | * Convert calls to our calling convention. | 385 | * Convert calls to our calling convention. |
386 | */ | 386 | */ |
387 | #define flush_tlb_range(vma,start,end) __cpu_flush_user_tlb_range(start,end,vma) | 387 | #define local_flush_tlb_range(vma,start,end) __cpu_flush_user_tlb_range(start,end,vma) |
388 | #define flush_tlb_kernel_range(s,e) __cpu_flush_kern_tlb_range(s,e) | 388 | #define local_flush_tlb_kernel_range(s,e) __cpu_flush_kern_tlb_range(s,e) |
389 | |||
390 | #ifndef CONFIG_SMP | ||
391 | #define flush_tlb_all local_flush_tlb_all | ||
392 | #define flush_tlb_mm local_flush_tlb_mm | ||
393 | #define flush_tlb_page local_flush_tlb_page | ||
394 | #define flush_tlb_kernel_page local_flush_tlb_kernel_page | ||
395 | #define flush_tlb_range local_flush_tlb_range | ||
396 | #define flush_tlb_kernel_range local_flush_tlb_kernel_range | ||
397 | #else | ||
398 | extern void flush_tlb_all(void); | ||
399 | extern void flush_tlb_mm(struct mm_struct *mm); | ||
400 | extern void flush_tlb_page(struct vm_area_struct *vma, unsigned long uaddr); | ||
401 | extern void flush_tlb_kernel_page(unsigned long kaddr); | ||
402 | extern void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, unsigned long end); | ||
403 | extern void flush_tlb_kernel_range(unsigned long start, unsigned long end); | ||
404 | #endif | ||
389 | 405 | ||
390 | /* | 406 | /* |
391 | * if PG_dcache_dirty is set for the page, we need to ensure that any | 407 | * if PG_dcache_dirty is set for the page, we need to ensure that any |