diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-08-21 08:23:14 (GMT) |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-08-21 08:23:14 (GMT) |
commit | f26b2a562b46ab186c8383993ab1332673ac4a47 (patch) | |
tree | 5cf52089da5ca762c07cf6c1364a6aa411fb3038 /arch/sh/mm/cache-sh2a.c | |
parent | f9bd71f255b4349c4f9f596863161fd5182f67fa (diff) | |
download | linux-fsl-qoriq-f26b2a562b46ab186c8383993ab1332673ac4a47.tar.xz |
sh: Make cache flushers SMP-aware.
This does a bit of rework for making the cache flushers SMP-aware. The
function pointer-based flushers are renamed to local variants with the
exported interface being commonly implemented and wrapping as necessary.
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 | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/sh/mm/cache-sh2a.c b/arch/sh/mm/cache-sh2a.c index 96a4187..975899d 100644 --- a/arch/sh/mm/cache-sh2a.c +++ b/arch/sh/mm/cache-sh2a.c @@ -97,13 +97,15 @@ static void sh2a__flush_invalidate_region(void *start, int size) } /* WBack O-Cache and flush I-Cache */ -static void sh2a_flush_icache_range(unsigned long start, unsigned long end) +static void sh2a_flush_icache_range(void *args) { + struct flusher_data *data = args; + unsigned long start, end; unsigned long v; unsigned long flags; - start = start & ~(L1_CACHE_BYTES-1); - end = (end + L1_CACHE_BYTES-1) & ~(L1_CACHE_BYTES-1); + 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(); @@ -130,7 +132,7 @@ static void sh2a_flush_icache_range(unsigned long start, unsigned long end) void __init sh2a_cache_init(void) { - flush_icache_range = sh2a_flush_icache_range; + local_flush_icache_range = sh2a_flush_icache_range; __flush_wback_region = sh2a__flush_wback_region; __flush_purge_region = sh2a__flush_purge_region; |