Skip to content

Commit

Permalink
ARC: Use correct PTAG register for icache flush
Browse files Browse the repository at this point in the history
This fixes a subtle issue with cache flush which could potentially cause
random userspace crashes because of stale icache lines.

This error crept in when consolidating the cache flush code

Fixes: bd12976 (ARC: cacheflush refactor #3: Unify the {d,i}cache)
Signed-off-by: Vineet Gupta <[email protected]>
Cc: [email protected]
Cc: [email protected]  # 3.13
Cc: [email protected]
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
vineetgarc authored and torvalds committed Mar 7, 2014
1 parent e1aa17c commit b053940
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/arc/mm/cache_arc700.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ static inline void __cache_line_loop(unsigned long paddr, unsigned long vaddr,
#else
/* if V-P const for loop, PTAG can be written once outside loop */
if (full_page_op)
write_aux_reg(ARC_REG_DC_PTAG, paddr);
write_aux_reg(aux_tag, paddr);
#endif

while (num_lines-- > 0) {
Expand All @@ -296,7 +296,7 @@ static inline void __cache_line_loop(unsigned long paddr, unsigned long vaddr,
write_aux_reg(aux_cmd, vaddr);
vaddr += L1_CACHE_BYTES;
#else
write_aux_reg(aux, paddr);
write_aux_reg(aux_cmd, paddr);
paddr += L1_CACHE_BYTES;
#endif
}
Expand Down

0 comments on commit b053940

Please sign in to comment.