summaryrefslogtreecommitdiffstats
path: root/arch/sh/mm/cache-sh2a.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-08-21 17:23:14 +0900
committerPaul Mundt <lethal@linux-sh.org>2009-08-21 17:23:14 +0900
commitf26b2a562b46ab186c8383993ab1332673ac4a47 (patch)
tree5cf52089da5ca762c07cf6c1364a6aa411fb3038 /arch/sh/mm/cache-sh2a.c
parentf9bd71f255b4349c4f9f596863161fd5182f67fa (diff)
downloadlinux-f26b2a562b46ab186c8383993ab1332673ac4a47.tar.gz
linux-f26b2a562b46ab186c8383993ab1332673ac4a47.tar.bz2
linux-f26b2a562b46ab186c8383993ab1332673ac4a47.zip
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.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/sh/mm/cache-sh2a.c b/arch/sh/mm/cache-sh2a.c
index 96a41872dfd3..975899d83564 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;