diff options
Diffstat (limited to 'arch/sh/mm/cache-sh4.c')
-rw-r--r-- | arch/sh/mm/cache-sh4.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/sh/mm/cache-sh4.c b/arch/sh/mm/cache-sh4.c index 519e2d16cd06..b7f235c74d66 100644 --- a/arch/sh/mm/cache-sh4.c +++ b/arch/sh/mm/cache-sh4.c | |||
@@ -72,6 +72,7 @@ static void __uses_jump_to_uncached sh4_flush_icache_range(void *args) | |||
72 | 72 | ||
73 | for (v = start; v < end; v += L1_CACHE_BYTES) { | 73 | for (v = start; v < end; v += L1_CACHE_BYTES) { |
74 | unsigned long icacheaddr; | 74 | unsigned long icacheaddr; |
75 | int j, n; | ||
75 | 76 | ||
76 | __ocbwb(v); | 77 | __ocbwb(v); |
77 | 78 | ||
@@ -79,8 +80,10 @@ static void __uses_jump_to_uncached sh4_flush_icache_range(void *args) | |||
79 | cpu_data->icache.entry_mask); | 80 | cpu_data->icache.entry_mask); |
80 | 81 | ||
81 | /* Clear i-cache line valid-bit */ | 82 | /* Clear i-cache line valid-bit */ |
83 | n = boot_cpu_data.icache.n_aliases; | ||
82 | for (i = 0; i < cpu_data->icache.ways; i++) { | 84 | for (i = 0; i < cpu_data->icache.ways; i++) { |
83 | __raw_writel(0, icacheaddr); | 85 | for (j = 0; j < n; j++) |
86 | __raw_writel(0, icacheaddr + (j * PAGE_SIZE)); | ||
84 | icacheaddr += cpu_data->icache.way_incr; | 87 | icacheaddr += cpu_data->icache.way_incr; |
85 | } | 88 | } |
86 | } | 89 | } |