Skip to content

Commit

Permalink
ARM: 9057/1: cache-v7: add missing ISB after cache level selection
Browse files Browse the repository at this point in the history
A write to CSSELR needs to complete before its results can be observed
via CCSIDR. So add a ISB to ensure that this is the case.

Acked-by: Nicolas Pitre <[email protected]>
Signed-off-by: Ard Biesheuvel <[email protected]>
Signed-off-by: Russell King <[email protected]>
  • Loading branch information
ardbiesheuvel authored and Russell King committed Mar 9, 2021
1 parent c4e792d commit c0e5073
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions arch/arm/mm/cache-v7.S
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@ icache_size:
* procedures.
*/
ENTRY(v7_invalidate_l1)
mov r0, #0
mcr p15, 2, r0, c0, c0, 0
mrc p15, 1, r0, c0, c0, 0
mov r0, #0
mcr p15, 2, r0, c0, c0, 0 @ select L1 data cache in CSSELR
isb
mrc p15, 1, r0, c0, c0, 0 @ read cache geometry from CCSIDR

movw r1, #0x7fff
and r2, r1, r0, lsr #13
Expand Down

0 comments on commit c0e5073

Please sign in to comment.