diff options
author | Vineet Gupta <vgupta@synopsys.com> | 2014-03-07 02:52:22 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-03-07 13:12:56 -0500 |
commit | b053940df41808f0f27568eb36820d10a8a987f8 (patch) | |
tree | 650fcd1af2047258705e2d722fbdf2369780184f | |
parent | e1aa17c7b52c2cc1a4c20f62deadcd94ce8b632c (diff) |
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: bd12976c3664 (ARC: cacheflush refactor #3: Unify the {d,i}cache)
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org # 3.13
Cc: arc-linux-dev@synopsys.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | arch/arc/mm/cache_arc700.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arc/mm/cache_arc700.c b/arch/arc/mm/cache_arc700.c index 6b58c1de7577..400c663b21c2 100644 --- a/arch/arc/mm/cache_arc700.c +++ b/arch/arc/mm/cache_arc700.c | |||
@@ -282,7 +282,7 @@ static inline void __cache_line_loop(unsigned long paddr, unsigned long vaddr, | |||
282 | #else | 282 | #else |
283 | /* if V-P const for loop, PTAG can be written once outside loop */ | 283 | /* if V-P const for loop, PTAG can be written once outside loop */ |
284 | if (full_page_op) | 284 | if (full_page_op) |
285 | write_aux_reg(ARC_REG_DC_PTAG, paddr); | 285 | write_aux_reg(aux_tag, paddr); |
286 | #endif | 286 | #endif |
287 | 287 | ||
288 | while (num_lines-- > 0) { | 288 | while (num_lines-- > 0) { |
@@ -296,7 +296,7 @@ static inline void __cache_line_loop(unsigned long paddr, unsigned long vaddr, | |||
296 | write_aux_reg(aux_cmd, vaddr); | 296 | write_aux_reg(aux_cmd, vaddr); |
297 | vaddr += L1_CACHE_BYTES; | 297 | vaddr += L1_CACHE_BYTES; |
298 | #else | 298 | #else |
299 | write_aux_reg(aux, paddr); | 299 | write_aux_reg(aux_cmd, paddr); |
300 | paddr += L1_CACHE_BYTES; | 300 | paddr += L1_CACHE_BYTES; |
301 | #endif | 301 | #endif |
302 | } | 302 | } |