diff options
Diffstat (limited to 'arch/sh/mm/cache-sh2a.c')
-rw-r--r-- | arch/sh/mm/cache-sh2a.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/sh/mm/cache-sh2a.c b/arch/sh/mm/cache-sh2a.c index d783361e3f0a..975899d83564 100644 --- a/arch/sh/mm/cache-sh2a.c +++ b/arch/sh/mm/cache-sh2a.c | |||
@@ -102,10 +102,12 @@ static void sh2a_flush_icache_range(void *args) | |||
102 | struct flusher_data *data = args; | 102 | struct flusher_data *data = args; |
103 | unsigned long start, end; | 103 | unsigned long start, end; |
104 | unsigned long v; | 104 | unsigned long v; |
105 | unsigned long flags; | ||
105 | 106 | ||
106 | start = data->addr1 & ~(L1_CACHE_BYTES-1); | 107 | start = data->addr1 & ~(L1_CACHE_BYTES-1); |
107 | end = (data->addr2 + L1_CACHE_BYTES-1) & ~(L1_CACHE_BYTES-1); | 108 | end = (data->addr2 + L1_CACHE_BYTES-1) & ~(L1_CACHE_BYTES-1); |
108 | 109 | ||
110 | local_irq_save(flags); | ||
109 | jump_to_uncached(); | 111 | jump_to_uncached(); |
110 | 112 | ||
111 | for (v = start; v < end; v+=L1_CACHE_BYTES) { | 113 | for (v = start; v < end; v+=L1_CACHE_BYTES) { |
@@ -120,10 +122,12 @@ static void sh2a_flush_icache_range(void *args) | |||
120 | } | 122 | } |
121 | } | 123 | } |
122 | /* I-Cache invalidate */ | 124 | /* I-Cache invalidate */ |
123 | ctrl_outl(addr, CACHE_IC_ADDRESS_ARRAY | addr | 0x00000008); | 125 | ctrl_outl(addr, |
126 | CACHE_IC_ADDRESS_ARRAY | addr | 0x00000008); | ||
124 | } | 127 | } |
125 | 128 | ||
126 | back_to_cached(); | 129 | back_to_cached(); |
130 | local_irq_restore(flags); | ||
127 | } | 131 | } |
128 | 132 | ||
129 | void __init sh2a_cache_init(void) | 133 | void __init sh2a_cache_init(void) |