diff options
author | Sonic Zhang <sonic.zhang@analog.com> | 2009-06-10 04:57:08 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2009-06-13 07:20:07 -0400 |
commit | 47e9dedb720364e0adff0e99960fa294c6161f71 (patch) | |
tree | fa5bcb532023a89fa11995e5ceca5ed5dfeabbba /arch/blackfin/include | |
parent | 2466ac65560ee8b7506eea3987aba9519355fd02 (diff) |
Blackfin: add blackfin_invalidate_entire_icache for SMP systems
The KGDB code uses this when switching processors to make sure the icache
is in a valid state.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin/include')
-rw-r--r-- | arch/blackfin/include/asm/cache.h | 11 | ||||
-rw-r--r-- | arch/blackfin/include/asm/cacheflush.h | 1 | ||||
-rw-r--r-- | arch/blackfin/include/asm/cpu.h | 1 |
3 files changed, 10 insertions, 3 deletions
diff --git a/arch/blackfin/include/asm/cache.h b/arch/blackfin/include/asm/cache.h index 86637814cf25..2ef669ed9222 100644 --- a/arch/blackfin/include/asm/cache.h +++ b/arch/blackfin/include/asm/cache.h | |||
@@ -34,9 +34,13 @@ | |||
34 | #define L1_CACHE_SHIFT_MAX 5 | 34 | #define L1_CACHE_SHIFT_MAX 5 |
35 | 35 | ||
36 | #if defined(CONFIG_SMP) && \ | 36 | #if defined(CONFIG_SMP) && \ |
37 | !defined(CONFIG_BFIN_CACHE_COHERENT) && \ | 37 | !defined(CONFIG_BFIN_CACHE_COHERENT) |
38 | defined(CONFIG_BFIN_DCACHE) | 38 | # if defined(CONFIG_BFIN_ICACHE) |
39 | #define __ARCH_SYNC_CORE_DCACHE | 39 | # define __ARCH_SYNC_CORE_ICACHE |
40 | # endif | ||
41 | # if defined(CONFIG_BFIN_DCACHE) | ||
42 | # define __ARCH_SYNC_CORE_DCACHE | ||
43 | # endif | ||
40 | #ifndef __ASSEMBLY__ | 44 | #ifndef __ASSEMBLY__ |
41 | asmlinkage void __raw_smp_mark_barrier_asm(void); | 45 | asmlinkage void __raw_smp_mark_barrier_asm(void); |
42 | asmlinkage void __raw_smp_check_barrier_asm(void); | 46 | asmlinkage void __raw_smp_check_barrier_asm(void); |
@@ -51,6 +55,7 @@ static inline void smp_check_barrier(void) | |||
51 | } | 55 | } |
52 | 56 | ||
53 | void resync_core_dcache(void); | 57 | void resync_core_dcache(void); |
58 | void resync_core_icache(void); | ||
54 | #endif | 59 | #endif |
55 | #endif | 60 | #endif |
56 | 61 | ||
diff --git a/arch/blackfin/include/asm/cacheflush.h b/arch/blackfin/include/asm/cacheflush.h index 18bc4f71fe2c..5c17dee53b5d 100644 --- a/arch/blackfin/include/asm/cacheflush.h +++ b/arch/blackfin/include/asm/cacheflush.h | |||
@@ -37,6 +37,7 @@ extern void blackfin_dcache_flush_range(unsigned long start_address, unsigned lo | |||
37 | extern void blackfin_dcache_invalidate_range(unsigned long start_address, unsigned long end_address); | 37 | extern void blackfin_dcache_invalidate_range(unsigned long start_address, unsigned long end_address); |
38 | extern void blackfin_dflush_page(void *page); | 38 | extern void blackfin_dflush_page(void *page); |
39 | extern void blackfin_invalidate_entire_dcache(void); | 39 | extern void blackfin_invalidate_entire_dcache(void); |
40 | extern void blackfin_invalidate_entire_icache(void); | ||
40 | 41 | ||
41 | #define flush_dcache_mmap_lock(mapping) do { } while (0) | 42 | #define flush_dcache_mmap_lock(mapping) do { } while (0) |
42 | #define flush_dcache_mmap_unlock(mapping) do { } while (0) | 43 | #define flush_dcache_mmap_unlock(mapping) do { } while (0) |
diff --git a/arch/blackfin/include/asm/cpu.h b/arch/blackfin/include/asm/cpu.h index c2594ef877f6..565b8136855e 100644 --- a/arch/blackfin/include/asm/cpu.h +++ b/arch/blackfin/include/asm/cpu.h | |||
@@ -34,6 +34,7 @@ struct blackfin_cpudata { | |||
34 | unsigned int dmemctl; | 34 | unsigned int dmemctl; |
35 | unsigned long loops_per_jiffy; | 35 | unsigned long loops_per_jiffy; |
36 | unsigned long dcache_invld_count; | 36 | unsigned long dcache_invld_count; |
37 | unsigned long icache_invld_count; | ||
37 | }; | 38 | }; |
38 | 39 | ||
39 | DECLARE_PER_CPU(struct blackfin_cpudata, cpu_data); | 40 | DECLARE_PER_CPU(struct blackfin_cpudata, cpu_data); |