aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/mm/cache-sh7705.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/mm/cache-sh7705.c')
-rw-r--r--arch/sh/mm/cache-sh7705.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/sh/mm/cache-sh7705.c b/arch/sh/mm/cache-sh7705.c
index 9dc38660e3de..6293f57fa888 100644
--- a/arch/sh/mm/cache-sh7705.c
+++ b/arch/sh/mm/cache-sh7705.c
@@ -81,6 +81,7 @@ static void sh7705_flush_icache_range(void *args)
81static void __flush_dcache_page(unsigned long phys) 81static void __flush_dcache_page(unsigned long phys)
82{ 82{
83 unsigned long ways, waysize, addrstart; 83 unsigned long ways, waysize, addrstart;
84 unsigned long flags;
84 85
85 phys |= SH_CACHE_VALID; 86 phys |= SH_CACHE_VALID;
86 87
@@ -97,6 +98,7 @@ static void __flush_dcache_page(unsigned long phys)
97 * potential cache aliasing, therefore the optimisation is probably not 98 * potential cache aliasing, therefore the optimisation is probably not
98 * possible. 99 * possible.
99 */ 100 */
101 local_irq_save(flags);
100 jump_to_uncached(); 102 jump_to_uncached();
101 103
102 ways = current_cpu_data.dcache.ways; 104 ways = current_cpu_data.dcache.ways;
@@ -124,6 +126,7 @@ static void __flush_dcache_page(unsigned long phys)
124 } while (--ways); 126 } while (--ways);
125 127
126 back_to_cached(); 128 back_to_cached();
129 local_irq_restore(flags);
127} 130}
128 131
129/* 132/*
@@ -142,9 +145,14 @@ static void sh7705_flush_dcache_page(void *page)
142 145
143static void sh7705_flush_cache_all(void *args) 146static void sh7705_flush_cache_all(void *args)
144{ 147{
148 unsigned long flags;
149
150 local_irq_save(flags);
145 jump_to_uncached(); 151 jump_to_uncached();
152
146 cache_wback_all(); 153 cache_wback_all();
147 back_to_cached(); 154 back_to_cached();
155 local_irq_restore(flags);
148} 156}
149 157
150/* 158/*