diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-09-01 08:12:55 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-09-01 08:12:55 -0400 |
commit | 983f4c514c4c9ddac1077a2c805fd16cbe3f7487 (patch) | |
tree | c0fac3c691139178c545ebe7a8f8eb642937f163 /arch/sh/mm/cache-sh2a.c | |
parent | ade315d83c1d53b3c6b820134cb16601351810fe (diff) |
Revert "sh: Kill off now redundant local irq disabling."
This reverts commit 64a6d72213dd810dd55bd0a503c36150af41c3c3.
Unfortunately we can't use on_each_cpu() for all of the cache ops, as
some of them only require preempt disabling. This seems to be the same
issue that impacts the mips r4k caches, where this code was based on.
This fixes up a deadlock that showed up in some IRQ context cases.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
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) |