Skip to content

Commit

Permalink
ARC: Use enough bits for determining page's cache color
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Vineet Gupta committed May 23, 2013
1 parent 3e87974 commit 006dfb3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arc/include/asm/cacheflush.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 006dfb3

Please sign in to comment.