]> Pileus Git - ~andy/linux/commitdiff
ARC: Use enough bits for determining page's cache color
authorVineet Gupta <vgupta@synopsys.com>
Sun, 19 May 2013 08:36:44 +0000 (14:06 +0530)
committerVineet Gupta <vgupta@synopsys.com>
Thu, 23 May 2013 08:55:09 +0000 (14:25 +0530)
The current code uses 2 bits for determining page's dcache color, thus
sorting pages into 4 bins, whereas the aliasing dcache really has 2 bins
(8k page, 64k dcache - 4 way-set-assoc).
This can cause extraneous flushes - e.g. color 0 and 2.

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
arch/arc/include/asm/cacheflush.h

index 7d819749478cf21cbfe1ba9947e2cdee7f124442..ef62682e8d9567670fc435be9bc5ddfddb5fa06b 100644 (file)
@@ -93,7 +93,7 @@ static inline int cache_is_vipt_aliasing(void)
 #endif
 }
 
-#define CACHE_COLOR(addr)      (((unsigned long)(addr) >> (PAGE_SHIFT)) & 3)
+#define CACHE_COLOR(addr)      (((unsigned long)(addr) >> (PAGE_SHIFT)) & 1)
 
 /*
  * checks if two addresses (after page aligning) index into same cache set