Revert "sh: Kill off now redundant local irq disabling."

This reverts commit 64a6d72213.

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>
This commit is contained in:
Paul Mundt
2009-09-01 21:12:55 +09:00
parent ade315d83c
commit 983f4c514c
4 changed files with 67 additions and 29 deletions

View File

@@ -102,10 +102,12 @@ static void sh2a_flush_icache_range(void *args)
struct flusher_data *data = args;
unsigned long start, end;
unsigned long v;
unsigned long flags;
start = data->addr1 & ~(L1_CACHE_BYTES-1);
end = (data->addr2 + L1_CACHE_BYTES-1) & ~(L1_CACHE_BYTES-1);
local_irq_save(flags);
jump_to_uncached();
for (v = start; v < end; v+=L1_CACHE_BYTES) {
@@ -120,10 +122,12 @@ static void sh2a_flush_icache_range(void *args)
}
}
/* I-Cache invalidate */
ctrl_outl(addr, CACHE_IC_ADDRESS_ARRAY | addr | 0x00000008);
ctrl_outl(addr,
CACHE_IC_ADDRESS_ARRAY | addr | 0x00000008);
}
back_to_cached();
local_irq_restore(flags);
}
void __init sh2a_cache_init(void)