diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2005-06-28 08:40:39 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2005-06-28 08:40:39 -0400 |
commit | 603fff54420a0ccc4c3b48bfef43896fb4e33161 (patch) | |
tree | 0be240afa2df6187491d73b91e068400b2d1cd6e /include/asm-arm/tlbflush.h | |
parent | 99f95e5286df2f69edab8a04c7080d986ee4233b (diff) | |
parent | 8b22c249e7de453961e4d253b19fc2a0bdd65d53 (diff) |
[PATCH] ARM SMP: TLB implementations only affect local CPU
The existing TLB flush implementations only have an effect on
the local CPU. Prefix them with local_.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
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 |