diff options
Diffstat (limited to 'include/asm-arm/cacheflush.h')
-rw-r--r-- | include/asm-arm/cacheflush.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/include/asm-arm/cacheflush.h b/include/asm-arm/cacheflush.h index b87226192be9..6832ef96bc16 100644 --- a/include/asm-arm/cacheflush.h +++ b/include/asm-arm/cacheflush.h | |||
@@ -426,11 +426,18 @@ static inline void flush_anon_page(struct vm_area_struct *vma, | |||
426 | */ | 426 | */ |
427 | #define flush_icache_page(vma,page) do { } while (0) | 427 | #define flush_icache_page(vma,page) do { } while (0) |
428 | 428 | ||
429 | #define __cacheid_present(val) (val != read_cpuid(CPUID_ID)) | 429 | #define __cacheid_present(val) (val != read_cpuid(CPUID_ID)) |
430 | #define __cacheid_vivt(val) ((val & (15 << 25)) != (14 << 25)) | 430 | #define __cacheid_type_v7(val) ((val & (7 << 29)) == (4 << 29)) |
431 | #define __cacheid_vipt(val) ((val & (15 << 25)) == (14 << 25)) | 431 | |
432 | #define __cacheid_vipt_nonaliasing(val) ((val & (15 << 25 | 1 << 23)) == (14 << 25)) | 432 | #define __cacheid_vivt_prev7(val) ((val & (15 << 25)) != (14 << 25)) |
433 | #define __cacheid_vipt_aliasing(val) ((val & (15 << 25 | 1 << 23)) == (14 << 25 | 1 << 23)) | 433 | #define __cacheid_vipt_prev7(val) ((val & (15 << 25)) == (14 << 25)) |
434 | #define __cacheid_vipt_nonaliasing_prev7(val) ((val & (15 << 25 | 1 << 23)) == (14 << 25)) | ||
435 | #define __cacheid_vipt_aliasing_prev7(val) ((val & (15 << 25 | 1 << 23)) == (14 << 25 | 1 << 23)) | ||
436 | |||
437 | #define __cacheid_vivt(val) (__cacheid_type_v7(val) ? 0 : __cacheid_vivt_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)) | ||
440 | #define __cacheid_vipt_aliasing(val) (__cacheid_type_v7(val) ? 0 : __cacheid_vipt_aliasing_prev7(val)) | ||
434 | 441 | ||
435 | #if defined(CONFIG_CPU_CACHE_VIVT) && !defined(CONFIG_CPU_CACHE_VIPT) | 442 | #if defined(CONFIG_CPU_CACHE_VIVT) && !defined(CONFIG_CPU_CACHE_VIPT) |
436 | 443 | ||