Skip to content

Commit b053940

Browse files
vineetgarctorvalds
authored andcommitted
ARC: Use correct PTAG register for icache flush
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]>
1 parent e1aa17c commit b053940

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/arc/mm/cache_arc700.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ static inline void __cache_line_loop(unsigned long paddr, unsigned long vaddr,
282282
#else
283283
/* if V-P const for loop, PTAG can be written once outside loop */
284284
if (full_page_op)
285-
write_aux_reg(ARC_REG_DC_PTAG, paddr);
285+
write_aux_reg(aux_tag, paddr);
286286
#endif
287287

288288
while (num_lines-- > 0) {
@@ -296,7 +296,7 @@ static inline void __cache_line_loop(unsigned long paddr, unsigned long vaddr,
296296
write_aux_reg(aux_cmd, vaddr);
297297
vaddr += L1_CACHE_BYTES;
298298
#else
299-
write_aux_reg(aux, paddr);
299+
write_aux_reg(aux_cmd, paddr);
300300
paddr += L1_CACHE_BYTES;
301301
#endif
302302
}

0 commit comments

Comments
 (0)