mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
[ARM] armv7: add support for asid-tagged VIVT I-cache
ARMv7 can have VIPT, PIPT or ASID-tagged VIVT I-cache. This patch adds the necessary invalidation of the I-cache when the ASID numbers are re-used. Signed-off-by: Catalin Marinas <[email protected]> Signed-off-by: Russell King <[email protected]>
This commit is contained in:
parent
56163fcf19
commit
065cf519c3
2 changed files with 22 additions and 0 deletions
|
|
@ -438,6 +438,7 @@ static inline void flush_anon_page(struct vm_area_struct *vma,
|
|||
#define __cacheid_vipt(val) (__cacheid_type_v7(val) ? 1 : __cacheid_vipt_prev7(val))
|
||||
#define __cacheid_vipt_nonaliasing(val) (__cacheid_type_v7(val) ? 1 : __cacheid_vipt_nonaliasing_prev7(val))
|
||||
#define __cacheid_vipt_aliasing(val) (__cacheid_type_v7(val) ? 0 : __cacheid_vipt_aliasing_prev7(val))
|
||||
#define __cacheid_vivt_asid_tagged_instr(val) (__cacheid_type_v7(val) ? ((val & (3 << 14)) == (1 << 14)) : 0)
|
||||
|
||||
#if defined(CONFIG_CPU_CACHE_VIVT) && !defined(CONFIG_CPU_CACHE_VIPT)
|
||||
|
||||
|
|
@ -445,6 +446,7 @@ static inline void flush_anon_page(struct vm_area_struct *vma,
|
|||
#define cache_is_vipt() 0
|
||||
#define cache_is_vipt_nonaliasing() 0
|
||||
#define cache_is_vipt_aliasing() 0
|
||||
#define icache_is_vivt_asid_tagged() 0
|
||||
|
||||
#elif defined(CONFIG_CPU_CACHE_VIPT)
|
||||
|
||||
|
|
@ -462,6 +464,12 @@ static inline void flush_anon_page(struct vm_area_struct *vma,
|
|||
__cacheid_vipt_aliasing(__val); \
|
||||
})
|
||||
|
||||
#define icache_is_vivt_asid_tagged() \
|
||||
({ \
|
||||
unsigned int __val = read_cpuid(CPUID_CACHETYPE); \
|
||||
__cacheid_vivt_asid_tagged_instr(__val); \
|
||||
})
|
||||
|
||||
#else
|
||||
|
||||
#define cache_is_vivt() \
|
||||
|
|
@ -490,6 +498,13 @@ static inline void flush_anon_page(struct vm_area_struct *vma,
|
|||
__cacheid_vipt_aliasing(__val); \
|
||||
})
|
||||
|
||||
#define icache_is_vivt_asid_tagged() \
|
||||
({ \
|
||||
unsigned int __val = read_cpuid(CPUID_CACHETYPE); \
|
||||
__cacheid_present(__val) && \
|
||||
__cacheid_vivt_asid_tagged_instr(__val); \
|
||||
})
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in a new issue