diff options
Diffstat (limited to 'arch/blackfin/include/asm')
-rw-r--r-- | arch/blackfin/include/asm/mem_map.h | 75 | ||||
-rw-r--r-- | arch/blackfin/include/asm/smp.h | 2 | ||||
-rw-r--r-- | arch/blackfin/include/asm/system.h | 6 |
3 files changed, 81 insertions, 2 deletions
diff --git a/arch/blackfin/include/asm/mem_map.h b/arch/blackfin/include/asm/mem_map.h index 88d04a70770..e92b31051bb 100644 --- a/arch/blackfin/include/asm/mem_map.h +++ b/arch/blackfin/include/asm/mem_map.h | |||
@@ -9,4 +9,79 @@ | |||
9 | 9 | ||
10 | #include <mach/mem_map.h> | 10 | #include <mach/mem_map.h> |
11 | 11 | ||
12 | #ifndef __ASSEMBLY__ | ||
13 | |||
14 | #ifdef CONFIG_SMP | ||
15 | static inline ulong get_l1_scratch_start_cpu(int cpu) | ||
16 | { | ||
17 | return (cpu) ? COREB_L1_SCRATCH_START : COREA_L1_SCRATCH_START; | ||
18 | } | ||
19 | static inline ulong get_l1_code_start_cpu(int cpu) | ||
20 | { | ||
21 | return (cpu) ? COREB_L1_CODE_START : COREA_L1_CODE_START; | ||
22 | } | ||
23 | static inline ulong get_l1_data_a_start_cpu(int cpu) | ||
24 | { | ||
25 | return (cpu) ? COREB_L1_DATA_A_START : COREA_L1_DATA_A_START; | ||
26 | } | ||
27 | static inline ulong get_l1_data_b_start_cpu(int cpu) | ||
28 | { | ||
29 | return (cpu) ? COREB_L1_DATA_B_START : COREA_L1_DATA_B_START; | ||
30 | } | ||
31 | |||
32 | static inline ulong get_l1_scratch_start(void) | ||
33 | { | ||
34 | return get_l1_scratch_start_cpu(blackfin_core_id()); | ||
35 | } | ||
36 | static inline ulong get_l1_code_start(void) | ||
37 | { | ||
38 | return get_l1_code_start_cpu(blackfin_core_id()); | ||
39 | } | ||
40 | static inline ulong get_l1_data_a_start(void) | ||
41 | { | ||
42 | return get_l1_data_a_start_cpu(blackfin_core_id()); | ||
43 | } | ||
44 | static inline ulong get_l1_data_b_start(void) | ||
45 | { | ||
46 | return get_l1_data_b_start_cpu(blackfin_core_id()); | ||
47 | } | ||
48 | |||
49 | #else /* !CONFIG_SMP */ | ||
50 | |||
51 | static inline ulong get_l1_scratch_start_cpu(int cpu) | ||
52 | { | ||
53 | return L1_SCRATCH_START; | ||
54 | } | ||
55 | static inline ulong get_l1_code_start_cpu(int cpu) | ||
56 | { | ||
57 | return L1_CODE_START; | ||
58 | } | ||
59 | static inline ulong get_l1_data_a_start_cpu(int cpu) | ||
60 | { | ||
61 | return L1_DATA_A_START; | ||
62 | } | ||
63 | static inline ulong get_l1_data_b_start_cpu(int cpu) | ||
64 | { | ||
65 | return L1_DATA_B_START; | ||
66 | } | ||
67 | static inline ulong get_l1_scratch_start(void) | ||
68 | { | ||
69 | return get_l1_scratch_start_cpu(0); | ||
70 | } | ||
71 | static inline ulong get_l1_code_start(void) | ||
72 | { | ||
73 | return get_l1_code_start_cpu(0); | ||
74 | } | ||
75 | static inline ulong get_l1_data_a_start(void) | ||
76 | { | ||
77 | return get_l1_data_a_start_cpu(0); | ||
78 | } | ||
79 | static inline ulong get_l1_data_b_start(void) | ||
80 | { | ||
81 | return get_l1_data_b_start_cpu(0); | ||
82 | } | ||
83 | |||
84 | #endif /* CONFIG_SMP */ | ||
85 | #endif /* __ASSEMBLY__ */ | ||
86 | |||
12 | #endif /* _MEM_MAP_H_ */ | 87 | #endif /* _MEM_MAP_H_ */ |
diff --git a/arch/blackfin/include/asm/smp.h b/arch/blackfin/include/asm/smp.h index 233cb8c3cfb..118deeeae7c 100644 --- a/arch/blackfin/include/asm/smp.h +++ b/arch/blackfin/include/asm/smp.h | |||
@@ -32,6 +32,8 @@ | |||
32 | 32 | ||
33 | #define raw_smp_processor_id() blackfin_core_id() | 33 | #define raw_smp_processor_id() blackfin_core_id() |
34 | 34 | ||
35 | extern char coreb_trampoline_start, coreb_trampoline_end; | ||
36 | |||
35 | struct corelock_slot { | 37 | struct corelock_slot { |
36 | int lock; | 38 | int lock; |
37 | }; | 39 | }; |
diff --git a/arch/blackfin/include/asm/system.h b/arch/blackfin/include/asm/system.h index e8bcfa4ee5c..dea92037dff 100644 --- a/arch/blackfin/include/asm/system.h +++ b/arch/blackfin/include/asm/system.h | |||
@@ -66,10 +66,13 @@ asmlinkage unsigned long __raw_cmpxchg_4_asm(volatile void *ptr, | |||
66 | # define smp_mb() do { barrier(); smp_check_barrier(); smp_mark_barrier(); } while (0) | 66 | # define smp_mb() do { barrier(); smp_check_barrier(); smp_mark_barrier(); } while (0) |
67 | # define smp_rmb() do { barrier(); smp_check_barrier(); } while (0) | 67 | # define smp_rmb() do { barrier(); smp_check_barrier(); } while (0) |
68 | # define smp_wmb() do { barrier(); smp_mark_barrier(); } while (0) | 68 | # define smp_wmb() do { barrier(); smp_mark_barrier(); } while (0) |
69 | #define smp_read_barrier_depends() do { barrier(); smp_check_barrier(); } while (0) | ||
70 | |||
69 | #else | 71 | #else |
70 | # define smp_mb() barrier() | 72 | # define smp_mb() barrier() |
71 | # define smp_rmb() barrier() | 73 | # define smp_rmb() barrier() |
72 | # define smp_wmb() barrier() | 74 | # define smp_wmb() barrier() |
75 | #define smp_read_barrier_depends() barrier() | ||
73 | #endif | 76 | #endif |
74 | 77 | ||
75 | static inline unsigned long __xchg(unsigned long x, volatile void *ptr, | 78 | static inline unsigned long __xchg(unsigned long x, volatile void *ptr, |
@@ -120,8 +123,6 @@ static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old, | |||
120 | ((__typeof__(*(ptr)))__cmpxchg((ptr), (unsigned long)(o), \ | 123 | ((__typeof__(*(ptr)))__cmpxchg((ptr), (unsigned long)(o), \ |
121 | (unsigned long)(n), sizeof(*(ptr)))) | 124 | (unsigned long)(n), sizeof(*(ptr)))) |
122 | 125 | ||
123 | #define smp_read_barrier_depends() smp_check_barrier() | ||
124 | |||
125 | #else /* !CONFIG_SMP */ | 126 | #else /* !CONFIG_SMP */ |
126 | 127 | ||
127 | #define smp_mb() barrier() | 128 | #define smp_mb() barrier() |
@@ -192,6 +193,7 @@ static inline unsigned long __xchg(unsigned long x, volatile void *ptr, | |||
192 | */ | 193 | */ |
193 | 194 | ||
194 | #include <asm/l1layout.h> | 195 | #include <asm/l1layout.h> |
196 | #include <asm/mem_map.h> | ||
195 | 197 | ||
196 | asmlinkage struct task_struct *resume(struct task_struct *prev, struct task_struct *next); | 198 | asmlinkage struct task_struct *resume(struct task_struct *prev, struct task_struct *next); |
197 | 199 | ||