Commit dc1b0aa3 authored by Catalin Marinas's avatar Catalin Marinas Committed by Russell King

[ARM PATCH] 1882/1: Fixes in the v6_dma_(invalidate|flush)_range functions

Patch from Catalin Marinas

The v6_dma_invalidate_range - the "mcr" instruction for draining

the write buffer requires r0 == 0. A "cmp" instruction for

testing the end address is missing in the v6_dma_flush_range

function.
parent 2b01a2d3
...@@ -151,6 +151,7 @@ ENTRY(v6_dma_inv_range) ...@@ -151,6 +151,7 @@ ENTRY(v6_dma_inv_range)
add r0, r0, #D_CACHE_LINE_SIZE add r0, r0, #D_CACHE_LINE_SIZE
cmp r0, r1 cmp r0, r1
blo 1b blo 1b
mov r0, #0
mcr p15, 0, r0, c7, c10, 4 @ drain write buffer mcr p15, 0, r0, c7, c10, 4 @ drain write buffer
mov pc, lr mov pc, lr
...@@ -188,6 +189,7 @@ ENTRY(v6_dma_flush_range) ...@@ -188,6 +189,7 @@ ENTRY(v6_dma_flush_range)
mcr p15, 0, r0, c7, c15, 1 @ clean & invalidate line mcr p15, 0, r0, c7, c15, 1 @ clean & invalidate line
#endif #endif
add r0, r0, #D_CACHE_LINE_SIZE add r0, r0, #D_CACHE_LINE_SIZE
cmp r0, r1
blo 1b blo 1b
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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment