diff options
Diffstat (limited to 'arch/blackfin/include/asm/cache.h')
-rw-r--r-- | arch/blackfin/include/asm/cache.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/arch/blackfin/include/asm/cache.h b/arch/blackfin/include/asm/cache.h index 023d72133b5a..86637814cf25 100644 --- a/arch/blackfin/include/asm/cache.h +++ b/arch/blackfin/include/asm/cache.h | |||
@@ -12,6 +12,11 @@ | |||
12 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) | 12 | #define L1_CACHE_BYTES (1 << L1_CACHE_SHIFT) |
13 | #define SMP_CACHE_BYTES L1_CACHE_BYTES | 13 | #define SMP_CACHE_BYTES L1_CACHE_BYTES |
14 | 14 | ||
15 | #ifdef CONFIG_SMP | ||
16 | #define __cacheline_aligned | ||
17 | #else | ||
18 | #define ____cacheline_aligned | ||
19 | |||
15 | /* | 20 | /* |
16 | * Put cacheline_aliged data to L1 data memory | 21 | * Put cacheline_aliged data to L1 data memory |
17 | */ | 22 | */ |
@@ -21,9 +26,33 @@ | |||
21 | __section__(".data_l1.cacheline_aligned"))) | 26 | __section__(".data_l1.cacheline_aligned"))) |
22 | #endif | 27 | #endif |
23 | 28 | ||
29 | #endif | ||
30 | |||
24 | /* | 31 | /* |
25 | * largest L1 which this arch supports | 32 | * largest L1 which this arch supports |
26 | */ | 33 | */ |
27 | #define L1_CACHE_SHIFT_MAX 5 | 34 | #define L1_CACHE_SHIFT_MAX 5 |
28 | 35 | ||
36 | #if defined(CONFIG_SMP) && \ | ||
37 | !defined(CONFIG_BFIN_CACHE_COHERENT) && \ | ||
38 | defined(CONFIG_BFIN_DCACHE) | ||
39 | #define __ARCH_SYNC_CORE_DCACHE | ||
40 | #ifndef __ASSEMBLY__ | ||
41 | asmlinkage void __raw_smp_mark_barrier_asm(void); | ||
42 | asmlinkage void __raw_smp_check_barrier_asm(void); | ||
43 | |||
44 | static inline void smp_mark_barrier(void) | ||
45 | { | ||
46 | __raw_smp_mark_barrier_asm(); | ||
47 | } | ||
48 | static inline void smp_check_barrier(void) | ||
49 | { | ||
50 | __raw_smp_check_barrier_asm(); | ||
51 | } | ||
52 | |||
53 | void resync_core_dcache(void); | ||
54 | #endif | ||
55 | #endif | ||
56 | |||
57 | |||
29 | #endif | 58 | #endif |