aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorKevin Cernekee <cernekee@gmail.com>2009-09-18 22:12:45 -0400
committerRalf Baechle <ralf@linux-mips.org>2009-09-30 15:47:00 -0400
commit96983ffefce46312e9372d357309dda413553009 (patch)
treeda15ecb8a3c728af409fa0903f292731c358e222 /arch
parenta648e8119666782f21b509a7886be9b281e41ccb (diff)
MIPS: MIPSxx SC: Avoid destructive invalidation on partial L2 cachelines.
This extends commit a8ca8b64e3fdfec17679cba0ca5ce6e3ffed092d to cover MIPSxx-style board cache code. Signed-off-by: Kevin Cernekee <cernekee@gmail.com> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/mm/sc-mips.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/mips/mm/sc-mips.c b/arch/mips/mm/sc-mips.c
index b55c2d1b998f..5ab5fa8c1d82 100644
--- a/arch/mips/mm/sc-mips.c
+++ b/arch/mips/mm/sc-mips.c
@@ -32,6 +32,11 @@ static void mips_sc_wback_inv(unsigned long addr, unsigned long size)
32 */ 32 */
33static void mips_sc_inv(unsigned long addr, unsigned long size) 33static void mips_sc_inv(unsigned long addr, unsigned long size)
34{ 34{
35 unsigned long lsize = cpu_scache_line_size();
36 unsigned long almask = ~(lsize - 1);
37
38 cache_op(Hit_Writeback_Inv_SD, addr & almask);
39 cache_op(Hit_Writeback_Inv_SD, (addr + size - 1) & almask);
35 blast_inv_scache_range(addr, addr + size); 40 blast_inv_scache_range(addr, addr + size);
36} 41}
37 42