diff options
Diffstat (limited to 'include/asm-arm/cacheflush.h')
-rw-r--r-- | include/asm-arm/cacheflush.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/asm-arm/cacheflush.h b/include/asm-arm/cacheflush.h index 6832ef96bc16..d1294a46c70c 100644 --- a/include/asm-arm/cacheflush.h +++ b/include/asm-arm/cacheflush.h | |||
@@ -438,6 +438,7 @@ static inline void flush_anon_page(struct vm_area_struct *vma, | |||
438 | #define __cacheid_vipt(val) (__cacheid_type_v7(val) ? 1 : __cacheid_vipt_prev7(val)) | 438 | #define __cacheid_vipt(val) (__cacheid_type_v7(val) ? 1 : __cacheid_vipt_prev7(val)) |
439 | #define __cacheid_vipt_nonaliasing(val) (__cacheid_type_v7(val) ? 1 : __cacheid_vipt_nonaliasing_prev7(val)) | 439 | #define __cacheid_vipt_nonaliasing(val) (__cacheid_type_v7(val) ? 1 : __cacheid_vipt_nonaliasing_prev7(val)) |
440 | #define __cacheid_vipt_aliasing(val) (__cacheid_type_v7(val) ? 0 : __cacheid_vipt_aliasing_prev7(val)) | 440 | #define __cacheid_vipt_aliasing(val) (__cacheid_type_v7(val) ? 0 : __cacheid_vipt_aliasing_prev7(val)) |
441 | #define __cacheid_vivt_asid_tagged_instr(val) (__cacheid_type_v7(val) ? ((val & (3 << 14)) == (1 << 14)) : 0) | ||
441 | 442 | ||
442 | #if defined(CONFIG_CPU_CACHE_VIVT) && !defined(CONFIG_CPU_CACHE_VIPT) | 443 | #if defined(CONFIG_CPU_CACHE_VIVT) && !defined(CONFIG_CPU_CACHE_VIPT) |
443 | 444 | ||
@@ -445,6 +446,7 @@ static inline void flush_anon_page(struct vm_area_struct *vma, | |||
445 | #define cache_is_vipt() 0 | 446 | #define cache_is_vipt() 0 |
446 | #define cache_is_vipt_nonaliasing() 0 | 447 | #define cache_is_vipt_nonaliasing() 0 |
447 | #define cache_is_vipt_aliasing() 0 | 448 | #define cache_is_vipt_aliasing() 0 |
449 | #define icache_is_vivt_asid_tagged() 0 | ||
448 | 450 | ||
449 | #elif defined(CONFIG_CPU_CACHE_VIPT) | 451 | #elif defined(CONFIG_CPU_CACHE_VIPT) |
450 | 452 | ||
@@ -462,6 +464,12 @@ static inline void flush_anon_page(struct vm_area_struct *vma, | |||
462 | __cacheid_vipt_aliasing(__val); \ | 464 | __cacheid_vipt_aliasing(__val); \ |
463 | }) | 465 | }) |
464 | 466 | ||
467 | #define icache_is_vivt_asid_tagged() \ | ||
468 | ({ \ | ||
469 | unsigned int __val = read_cpuid(CPUID_CACHETYPE); \ | ||
470 | __cacheid_vivt_asid_tagged_instr(__val); \ | ||
471 | }) | ||
472 | |||
465 | #else | 473 | #else |
466 | 474 | ||
467 | #define cache_is_vivt() \ | 475 | #define cache_is_vivt() \ |
@@ -490,6 +498,13 @@ static inline void flush_anon_page(struct vm_area_struct *vma, | |||
490 | __cacheid_vipt_aliasing(__val); \ | 498 | __cacheid_vipt_aliasing(__val); \ |
491 | }) | 499 | }) |
492 | 500 | ||
501 | #define icache_is_vivt_asid_tagged() \ | ||
502 | ({ \ | ||
503 | unsigned int __val = read_cpuid(CPUID_CACHETYPE); \ | ||
504 | __cacheid_present(__val) && \ | ||
505 | __cacheid_vivt_asid_tagged_instr(__val); \ | ||
506 | }) | ||
507 | |||
493 | #endif | 508 | #endif |
494 | 509 | ||
495 | #endif | 510 | #endif |