提交 18afea04 编写于 作者: N Nicolas Pitre 提交者: Russell King

[ARM] 3294/1: don't invalidate individual BTB entries on ARMv6

Patch from Nicolas Pitre

Doing so adds a much larger cost to the loop than the cost implied by
simply invalidating the whole BTB at once.
Signed-off-by: NNicolas Pitre <nico@cam.org>
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 8a052e0b
...@@ -92,22 +92,16 @@ ENTRY(v6_coherent_kern_range) ...@@ -92,22 +92,16 @@ ENTRY(v6_coherent_kern_range)
* - the Icache does not read data from the write buffer * - the Icache does not read data from the write buffer
*/ */
ENTRY(v6_coherent_user_range) ENTRY(v6_coherent_user_range)
bic r0, r0, #CACHE_LINE_SIZE - 1
1:
#ifdef HARVARD_CACHE #ifdef HARVARD_CACHE
mcr p15, 0, r0, c7, c10, 1 @ clean D line bic r0, r0, #CACHE_LINE_SIZE - 1
1: mcr p15, 0, r0, c7, c10, 1 @ clean D line
mcr p15, 0, r0, c7, c5, 1 @ invalidate I line mcr p15, 0, r0, c7, c5, 1 @ invalidate I line
#endif add r0, r0, #CACHE_LINE_SIZE
mcr p15, 0, r0, c7, c5, 7 @ invalidate BTB entry
add r0, r0, #BTB_FLUSH_SIZE
mcr p15, 0, r0, c7, c5, 7 @ invalidate BTB entry
add r0, r0, #BTB_FLUSH_SIZE
mcr p15, 0, r0, c7, c5, 7 @ invalidate BTB entry
add r0, r0, #BTB_FLUSH_SIZE
mcr p15, 0, r0, c7, c5, 7 @ invalidate BTB entry
add r0, r0, #BTB_FLUSH_SIZE
cmp r0, r1 cmp r0, r1
blo 1b blo 1b
#endif
mcr p15, 0, r0, c7, c5, 6 @ invalidate BTB
#ifdef HARVARD_CACHE #ifdef HARVARD_CACHE
mov r0, #0 mov r0, #0
mcr p15, 0, r0, c7, c10, 4 @ drain write buffer mcr p15, 0, r0, c7, c10, 4 @ drain write buffer
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册