aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/include/asm/cacheflush.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/include/asm/cacheflush.h')
-rw-r--r--arch/blackfin/include/asm/cacheflush.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/arch/blackfin/include/asm/cacheflush.h b/arch/blackfin/include/asm/cacheflush.h
index 4403415583fa..1b040f5b4feb 100644
--- a/arch/blackfin/include/asm/cacheflush.h
+++ b/arch/blackfin/include/asm/cacheflush.h
@@ -35,6 +35,7 @@ extern void blackfin_icache_flush_range(unsigned long start_address, unsigned lo
35extern void blackfin_dcache_flush_range(unsigned long start_address, unsigned long end_address); 35extern void blackfin_dcache_flush_range(unsigned long start_address, unsigned long end_address);
36extern void blackfin_dcache_invalidate_range(unsigned long start_address, unsigned long end_address); 36extern void blackfin_dcache_invalidate_range(unsigned long start_address, unsigned long end_address);
37extern void blackfin_dflush_page(void *page); 37extern void blackfin_dflush_page(void *page);
38extern void blackfin_invalidate_entire_dcache(void);
38 39
39#define flush_dcache_mmap_lock(mapping) do { } while (0) 40#define flush_dcache_mmap_lock(mapping) do { } while (0)
40#define flush_dcache_mmap_unlock(mapping) do { } while (0) 41#define flush_dcache_mmap_unlock(mapping) do { } while (0)
@@ -44,12 +45,20 @@ extern void blackfin_dflush_page(void *page);
44#define flush_cache_vmap(start, end) do { } while (0) 45#define flush_cache_vmap(start, end) do { } while (0)
45#define flush_cache_vunmap(start, end) do { } while (0) 46#define flush_cache_vunmap(start, end) do { } while (0)
46 47
48#ifdef CONFIG_SMP
49#define flush_icache_range_others(start, end) \
50 smp_icache_flush_range_others((start), (end))
51#else
52#define flush_icache_range_others(start, end) do { } while (0)
53#endif
54
47static inline void flush_icache_range(unsigned start, unsigned end) 55static inline void flush_icache_range(unsigned start, unsigned end)
48{ 56{
49#if defined(CONFIG_BFIN_DCACHE) && defined(CONFIG_BFIN_ICACHE) 57#if defined(CONFIG_BFIN_DCACHE) && defined(CONFIG_BFIN_ICACHE)
50 58
51# if defined(CONFIG_BFIN_WT) 59# if defined(CONFIG_BFIN_WT)
52 blackfin_icache_flush_range((start), (end)); 60 blackfin_icache_flush_range((start), (end));
61 flush_icache_range_others(start, end);
53# else 62# else
54 blackfin_icache_dcache_flush_range((start), (end)); 63 blackfin_icache_dcache_flush_range((start), (end));
55# endif 64# endif
@@ -58,6 +67,7 @@ static inline void flush_icache_range(unsigned start, unsigned end)
58 67
59# if defined(CONFIG_BFIN_ICACHE) 68# if defined(CONFIG_BFIN_ICACHE)
60 blackfin_icache_flush_range((start), (end)); 69 blackfin_icache_flush_range((start), (end));
70 flush_icache_range_others(start, end);
61# endif 71# endif
62# if defined(CONFIG_BFIN_DCACHE) 72# if defined(CONFIG_BFIN_DCACHE)
63 blackfin_dcache_flush_range((start), (end)); 73 blackfin_dcache_flush_range((start), (end));
@@ -66,10 +76,12 @@ static inline void flush_icache_range(unsigned start, unsigned end)
66#endif 76#endif
67} 77}
68 78
69#define copy_to_user_page(vma, page, vaddr, dst, src, len) \ 79#define copy_to_user_page(vma, page, vaddr, dst, src, len) \
70do { memcpy(dst, src, len); \ 80do { memcpy(dst, src, len); \
71 flush_icache_range ((unsigned) (dst), (unsigned) (dst) + (len)); \ 81 flush_icache_range((unsigned) (dst), (unsigned) (dst) + (len)); \
82 flush_icache_range_others((unsigned long) (dst), (unsigned long) (dst) + (len));\
72} while (0) 83} while (0)
84
73#define copy_from_user_page(vma, page, vaddr, dst, src, len) memcpy(dst, src, len) 85#define copy_from_user_page(vma, page, vaddr, dst, src, len) memcpy(dst, src, len)
74 86
75#if defined(CONFIG_BFIN_DCACHE) 87#if defined(CONFIG_BFIN_DCACHE)
@@ -82,7 +94,7 @@ do { memcpy(dst, src, len); \
82# define flush_dcache_page(page) blackfin_dflush_page(page_address(page)) 94# define flush_dcache_page(page) blackfin_dflush_page(page_address(page))
83#else 95#else
84# define flush_dcache_range(start,end) do { } while (0) 96# define flush_dcache_range(start,end) do { } while (0)
85# define flush_dcache_page(page) do { } while (0) 97# define flush_dcache_page(page) do { } while (0)
86#endif 98#endif
87 99
88extern unsigned long reserved_mem_dcache_on; 100extern unsigned long reserved_mem_dcache_on;