[ARM] nommu: manage the CP15 things
All the current CP15 access codes in ARM arch can be categorized and conditioned by the defines as follows: Related operation Safe condition a. any CP15 access !CPU_CP15 b. alignment trap CPU_CP15_MMU c. D-cache(C-bit) CPU_CP15 d. I-cache CPU_CP15 && !( CPU_ARM610 || CPU_ARM710 || CPU_ARM720 || CPU_ARM740 || CPU_XSCALE || CPU_XSC3 ) e. alternate vector CPU_CP15 && !CPU_ARM740 f. TTB CPU_CP15_MMU g. Domain CPU_CP15_MMU h. FSR/FAR CPU_CP15_MMU For example, alternate vector is supported if and only if "CPU_CP15 && !CPU_ARM740" is satisfied. Signed-off-by: Hyok S. Choi <hyok.choi@samsung.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
committed by
Russell King
parent
fefdaa06cc
commit
f12d0d7c77
@ -29,9 +29,13 @@ ENTRY(v4_flush_user_cache_all)
|
||||
* Clean and invalidate the entire cache.
|
||||
*/
|
||||
ENTRY(v4_flush_kern_cache_all)
|
||||
#ifdef CPU_CP15
|
||||
mov r0, #0
|
||||
mcr p15, 0, r0, c7, c7, 0 @ flush ID cache
|
||||
mov pc, lr
|
||||
#else
|
||||
/* FALLTHROUGH */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* flush_user_cache_range(start, end, flags)
|
||||
@ -44,9 +48,13 @@ ENTRY(v4_flush_kern_cache_all)
|
||||
* - flags - vma_area_struct flags describing address space
|
||||
*/
|
||||
ENTRY(v4_flush_user_cache_range)
|
||||
#ifdef CPU_CP15
|
||||
mov ip, #0
|
||||
mcreq p15, 0, ip, c7, c7, 0 @ flush ID cache
|
||||
mov pc, lr
|
||||
#else
|
||||
/* FALLTHROUGH */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* coherent_kern_range(start, end)
|
||||
@ -108,8 +116,10 @@ ENTRY(v4_dma_inv_range)
|
||||
* - end - virtual end address
|
||||
*/
|
||||
ENTRY(v4_dma_flush_range)
|
||||
#ifdef CPU_CP15
|
||||
mov r0, #0
|
||||
mcr p15, 0, r0, c7, c7, 0 @ flush ID cache
|
||||
#endif
|
||||
/* FALLTHROUGH */
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user