aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorGraf Yang <graf.yang@analog.com>2009-01-07 10:14:39 -0500
committerBryan Wu <cooloney@kernel.org>2009-01-07 10:14:39 -0500
commitdbc895f95500a73ebf1ff12fe85f2e2b3790f52f (patch)
tree8b60024a7725c559767295b2b3ef143a39111f8b /arch
parentf994607a2e118aedf1116a58ecd16126dbb83d28 (diff)
Blackfin arch: smp patch cleanup from LKML review
1. Use inline get_l1_... functions instead of macro 2. Fix compile issue about smp barrier functions Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/blackfin/include/asm/mem_map.h75
-rw-r--r--arch/blackfin/include/asm/smp.h2
-rw-r--r--arch/blackfin/include/asm/system.h6
-rw-r--r--arch/blackfin/kernel/bfin_ksyms.c2
-rw-r--r--arch/blackfin/kernel/cplb-mpu/cplbinit.c1
-rw-r--r--arch/blackfin/kernel/cplb-nompu/cplbinit.c1
-rw-r--r--arch/blackfin/kernel/process.c1
-rw-r--r--arch/blackfin/kernel/ptrace.c1
-rw-r--r--arch/blackfin/mach-bf518/include/mach/mem_map.h9
-rw-r--r--arch/blackfin/mach-bf527/include/mach/mem_map.h9
-rw-r--r--arch/blackfin/mach-bf533/include/mach/mem_map.h9
-rw-r--r--arch/blackfin/mach-bf537/include/mach/mem_map.h9
-rw-r--r--arch/blackfin/mach-bf538/include/mach/mem_map.h9
-rw-r--r--arch/blackfin/mach-bf548/include/mach/mem_map.h9
-rw-r--r--arch/blackfin/mach-bf561/include/mach/mem_map.h42
-rw-r--r--arch/blackfin/mach-bf561/smp.c11
-rw-r--r--arch/blackfin/mm/sram-alloc.c1
17 files changed, 92 insertions, 105 deletions
diff --git a/arch/blackfin/include/asm/mem_map.h b/arch/blackfin/include/asm/mem_map.h
index 88d04a707708..e92b31051bb7 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
15static inline ulong get_l1_scratch_start_cpu(int cpu)
16{
17 return (cpu) ? COREB_L1_SCRATCH_START : COREA_L1_SCRATCH_START;
18}
19static inline ulong get_l1_code_start_cpu(int cpu)
20{
21 return (cpu) ? COREB_L1_CODE_START : COREA_L1_CODE_START;
22}
23static 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}
27static 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
32static inline ulong get_l1_scratch_start(void)
33{
34 return get_l1_scratch_start_cpu(blackfin_core_id());
35}
36static inline ulong get_l1_code_start(void)
37{
38 return get_l1_code_start_cpu(blackfin_core_id());
39}
40static inline ulong get_l1_data_a_start(void)
41{
42 return get_l1_data_a_start_cpu(blackfin_core_id());
43}
44static 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
51static inline ulong get_l1_scratch_start_cpu(int cpu)
52{
53 return L1_SCRATCH_START;
54}
55static inline ulong get_l1_code_start_cpu(int cpu)
56{
57 return L1_CODE_START;
58}
59static inline ulong get_l1_data_a_start_cpu(int cpu)
60{
61 return L1_DATA_A_START;
62}
63static inline ulong get_l1_data_b_start_cpu(int cpu)
64{
65 return L1_DATA_B_START;
66}
67static inline ulong get_l1_scratch_start(void)
68{
69 return get_l1_scratch_start_cpu(0);
70}
71static inline ulong get_l1_code_start(void)
72{
73 return get_l1_code_start_cpu(0);
74}
75static inline ulong get_l1_data_a_start(void)
76{
77 return get_l1_data_a_start_cpu(0);
78}
79static 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 233cb8c3cfb7..118deeeae7c0 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
35extern char coreb_trampoline_start, coreb_trampoline_end;
36
35struct corelock_slot { 37struct 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 e8bcfa4ee5c0..dea92037dff5 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
75static inline unsigned long __xchg(unsigned long x, volatile void *ptr, 78static 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
196asmlinkage struct task_struct *resume(struct task_struct *prev, struct task_struct *next); 198asmlinkage struct task_struct *resume(struct task_struct *prev, struct task_struct *next);
197 199
diff --git a/arch/blackfin/kernel/bfin_ksyms.c b/arch/blackfin/kernel/bfin_ksyms.c
index 763c31531e9e..01f917d58b59 100644
--- a/arch/blackfin/kernel/bfin_ksyms.c
+++ b/arch/blackfin/kernel/bfin_ksyms.c
@@ -99,6 +99,8 @@ EXPORT_SYMBOL(__raw_bit_test_set_asm);
99EXPORT_SYMBOL(__raw_bit_test_clear_asm); 99EXPORT_SYMBOL(__raw_bit_test_clear_asm);
100EXPORT_SYMBOL(__raw_bit_test_toggle_asm); 100EXPORT_SYMBOL(__raw_bit_test_toggle_asm);
101EXPORT_SYMBOL(__raw_uncached_fetch_asm); 101EXPORT_SYMBOL(__raw_uncached_fetch_asm);
102#ifdef __ARCH_SYNC_CORE_DCACHE
102EXPORT_SYMBOL(__raw_smp_mark_barrier_asm); 103EXPORT_SYMBOL(__raw_smp_mark_barrier_asm);
103EXPORT_SYMBOL(__raw_smp_check_barrier_asm); 104EXPORT_SYMBOL(__raw_smp_check_barrier_asm);
104#endif 105#endif
106#endif
diff --git a/arch/blackfin/kernel/cplb-mpu/cplbinit.c b/arch/blackfin/kernel/cplb-mpu/cplbinit.c
index 269d2a3530a6..1ea7c18435ae 100644
--- a/arch/blackfin/kernel/cplb-mpu/cplbinit.c
+++ b/arch/blackfin/kernel/cplb-mpu/cplbinit.c
@@ -25,6 +25,7 @@
25#include <asm/blackfin.h> 25#include <asm/blackfin.h>
26#include <asm/cplb.h> 26#include <asm/cplb.h>
27#include <asm/cplbinit.h> 27#include <asm/cplbinit.h>
28#include <asm/mem_map.h>
28 29
29#if ANOMALY_05000263 30#if ANOMALY_05000263
30# error the MPU will not function safely while Anomaly 05000263 applies 31# error the MPU will not function safely while Anomaly 05000263 applies
diff --git a/arch/blackfin/kernel/cplb-nompu/cplbinit.c b/arch/blackfin/kernel/cplb-nompu/cplbinit.c
index 735413d2c228..4c010ba50a80 100644
--- a/arch/blackfin/kernel/cplb-nompu/cplbinit.c
+++ b/arch/blackfin/kernel/cplb-nompu/cplbinit.c
@@ -27,6 +27,7 @@
27#include <asm/cacheflush.h> 27#include <asm/cacheflush.h>
28#include <asm/cplb.h> 28#include <asm/cplb.h>
29#include <asm/cplbinit.h> 29#include <asm/cplbinit.h>
30#include <asm/mem_map.h>
30 31
31u_long icplb_tables[NR_CPUS][CPLB_TBL_ENTRIES+1]; 32u_long icplb_tables[NR_CPUS][CPLB_TBL_ENTRIES+1];
32u_long dcplb_tables[NR_CPUS][CPLB_TBL_ENTRIES+1]; 33u_long dcplb_tables[NR_CPUS][CPLB_TBL_ENTRIES+1];
diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c
index 4359ea253010..1ec0faa8c68d 100644
--- a/arch/blackfin/kernel/process.c
+++ b/arch/blackfin/kernel/process.c
@@ -39,6 +39,7 @@
39 39
40#include <asm/blackfin.h> 40#include <asm/blackfin.h>
41#include <asm/fixed_code.h> 41#include <asm/fixed_code.h>
42#include <asm/mem_map.h>
42 43
43asmlinkage void ret_from_fork(void); 44asmlinkage void ret_from_fork(void);
44 45
diff --git a/arch/blackfin/kernel/ptrace.c b/arch/blackfin/kernel/ptrace.c
index d5e6be2d5ed8..d2d388536630 100644
--- a/arch/blackfin/kernel/ptrace.c
+++ b/arch/blackfin/kernel/ptrace.c
@@ -45,6 +45,7 @@
45#include <asm/asm-offsets.h> 45#include <asm/asm-offsets.h>
46#include <asm/dma.h> 46#include <asm/dma.h>
47#include <asm/fixed_code.h> 47#include <asm/fixed_code.h>
48#include <asm/mem_map.h>
48 49
49#define TEXT_OFFSET 0 50#define TEXT_OFFSET 0
50/* 51/*
diff --git a/arch/blackfin/mach-bf518/include/mach/mem_map.h b/arch/blackfin/mach-bf518/include/mach/mem_map.h
index ac95d334d082..62bcc781bfaa 100644
--- a/arch/blackfin/mach-bf518/include/mach/mem_map.h
+++ b/arch/blackfin/mach-bf518/include/mach/mem_map.h
@@ -99,15 +99,6 @@
99#define L1_SCRATCH_START 0xFFB00000 99#define L1_SCRATCH_START 0xFFB00000
100#define L1_SCRATCH_LENGTH 0x1000 100#define L1_SCRATCH_LENGTH 0x1000
101 101
102#define get_l1_scratch_start_cpu(cpu) L1_SCRATCH_START
103#define get_l1_code_start_cpu(cpu) L1_CODE_START
104#define get_l1_data_a_start_cpu(cpu) L1_DATA_A_START
105#define get_l1_data_b_start_cpu(cpu) L1_DATA_B_START
106#define get_l1_scratch_start() L1_SCRATCH_START
107#define get_l1_code_start() L1_CODE_START
108#define get_l1_data_a_start() L1_DATA_A_START
109#define get_l1_data_b_start() L1_DATA_B_START
110
111#define GET_PDA_SAFE(preg) \ 102#define GET_PDA_SAFE(preg) \
112 preg.l = _cpu_pda; \ 103 preg.l = _cpu_pda; \
113 preg.h = _cpu_pda; 104 preg.h = _cpu_pda;
diff --git a/arch/blackfin/mach-bf527/include/mach/mem_map.h b/arch/blackfin/mach-bf527/include/mach/mem_map.h
index bd7fe0fda9e8..019e0017ad81 100644
--- a/arch/blackfin/mach-bf527/include/mach/mem_map.h
+++ b/arch/blackfin/mach-bf527/include/mach/mem_map.h
@@ -99,15 +99,6 @@
99#define L1_SCRATCH_START 0xFFB00000 99#define L1_SCRATCH_START 0xFFB00000
100#define L1_SCRATCH_LENGTH 0x1000 100#define L1_SCRATCH_LENGTH 0x1000
101 101
102#define get_l1_scratch_start_cpu(cpu) L1_SCRATCH_START
103#define get_l1_code_start_cpu(cpu) L1_CODE_START
104#define get_l1_data_a_start_cpu(cpu) L1_DATA_A_START
105#define get_l1_data_b_start_cpu(cpu) L1_DATA_B_START
106#define get_l1_scratch_start() L1_SCRATCH_START
107#define get_l1_code_start() L1_CODE_START
108#define get_l1_data_a_start() L1_DATA_A_START
109#define get_l1_data_b_start() L1_DATA_B_START
110
111#define GET_PDA_SAFE(preg) \ 102#define GET_PDA_SAFE(preg) \
112 preg.l = _cpu_pda; \ 103 preg.l = _cpu_pda; \
113 preg.h = _cpu_pda; 104 preg.h = _cpu_pda;
diff --git a/arch/blackfin/mach-bf533/include/mach/mem_map.h b/arch/blackfin/mach-bf533/include/mach/mem_map.h
index d5eaef21edb7..fc33b7cb9937 100644
--- a/arch/blackfin/mach-bf533/include/mach/mem_map.h
+++ b/arch/blackfin/mach-bf533/include/mach/mem_map.h
@@ -168,15 +168,6 @@
168#define L1_SCRATCH_START 0xFFB00000 168#define L1_SCRATCH_START 0xFFB00000
169#define L1_SCRATCH_LENGTH 0x1000 169#define L1_SCRATCH_LENGTH 0x1000
170 170
171#define get_l1_scratch_start_cpu(cpu) L1_SCRATCH_START
172#define get_l1_code_start_cpu(cpu) L1_CODE_START
173#define get_l1_data_a_start_cpu(cpu) L1_DATA_A_START
174#define get_l1_data_b_start_cpu(cpu) L1_DATA_B_START
175#define get_l1_scratch_start() L1_SCRATCH_START
176#define get_l1_code_start() L1_CODE_START
177#define get_l1_data_a_start() L1_DATA_A_START
178#define get_l1_data_b_start() L1_DATA_B_START
179
180#define GET_PDA_SAFE(preg) \ 171#define GET_PDA_SAFE(preg) \
181 preg.l = _cpu_pda; \ 172 preg.l = _cpu_pda; \
182 preg.h = _cpu_pda; 173 preg.h = _cpu_pda;
diff --git a/arch/blackfin/mach-bf537/include/mach/mem_map.h b/arch/blackfin/mach-bf537/include/mach/mem_map.h
index be4de761be96..f9010c4b4bf3 100644
--- a/arch/blackfin/mach-bf537/include/mach/mem_map.h
+++ b/arch/blackfin/mach-bf537/include/mach/mem_map.h
@@ -176,15 +176,6 @@
176#define L1_SCRATCH_START 0xFFB00000 176#define L1_SCRATCH_START 0xFFB00000
177#define L1_SCRATCH_LENGTH 0x1000 177#define L1_SCRATCH_LENGTH 0x1000
178 178
179#define get_l1_scratch_start_cpu(cpu) L1_SCRATCH_START
180#define get_l1_code_start_cpu(cpu) L1_CODE_START
181#define get_l1_data_a_start_cpu(cpu) L1_DATA_A_START
182#define get_l1_data_b_start_cpu(cpu) L1_DATA_B_START
183#define get_l1_scratch_start() L1_SCRATCH_START
184#define get_l1_code_start() L1_CODE_START
185#define get_l1_data_a_start() L1_DATA_A_START
186#define get_l1_data_b_start() L1_DATA_B_START
187
188#define GET_PDA_SAFE(preg) \ 179#define GET_PDA_SAFE(preg) \
189 preg.l = _cpu_pda; \ 180 preg.l = _cpu_pda; \
190 preg.h = _cpu_pda; 181 preg.h = _cpu_pda;
diff --git a/arch/blackfin/mach-bf538/include/mach/mem_map.h b/arch/blackfin/mach-bf538/include/mach/mem_map.h
index c134057c91ff..76811966690e 100644
--- a/arch/blackfin/mach-bf538/include/mach/mem_map.h
+++ b/arch/blackfin/mach-bf538/include/mach/mem_map.h
@@ -104,15 +104,6 @@
104#define L1_SCRATCH_START 0xFFB00000 104#define L1_SCRATCH_START 0xFFB00000
105#define L1_SCRATCH_LENGTH 0x1000 105#define L1_SCRATCH_LENGTH 0x1000
106 106
107#define get_l1_scratch_start_cpu(cpu) L1_SCRATCH_START
108#define get_l1_code_start_cpu(cpu) L1_CODE_START
109#define get_l1_data_a_start_cpu(cpu) L1_DATA_A_START
110#define get_l1_data_b_start_cpu(cpu) L1_DATA_B_START
111#define get_l1_scratch_start() L1_SCRATCH_START
112#define get_l1_code_start() L1_CODE_START
113#define get_l1_data_a_start() L1_DATA_A_START
114#define get_l1_data_b_start() L1_DATA_B_START
115
116#define GET_PDA_SAFE(preg) \ 107#define GET_PDA_SAFE(preg) \
117 preg.l = _cpu_pda; \ 108 preg.l = _cpu_pda; \
118 preg.h = _cpu_pda; 109 preg.h = _cpu_pda;
diff --git a/arch/blackfin/mach-bf548/include/mach/mem_map.h b/arch/blackfin/mach-bf548/include/mach/mem_map.h
index 361eb0e85bc0..70b9c1194024 100644
--- a/arch/blackfin/mach-bf548/include/mach/mem_map.h
+++ b/arch/blackfin/mach-bf548/include/mach/mem_map.h
@@ -108,15 +108,6 @@
108#define L1_SCRATCH_START 0xFFB00000 108#define L1_SCRATCH_START 0xFFB00000
109#define L1_SCRATCH_LENGTH 0x1000 109#define L1_SCRATCH_LENGTH 0x1000
110 110
111#define get_l1_scratch_start_cpu(cpu) L1_SCRATCH_START
112#define get_l1_code_start_cpu(cpu) L1_CODE_START
113#define get_l1_data_a_start_cpu(cpu) L1_DATA_A_START
114#define get_l1_data_b_start_cpu(cpu) L1_DATA_B_START
115#define get_l1_scratch_start() L1_SCRATCH_START
116#define get_l1_code_start() L1_CODE_START
117#define get_l1_data_a_start() L1_DATA_A_START
118#define get_l1_data_b_start() L1_DATA_B_START
119
120#define GET_PDA_SAFE(preg) \ 111#define GET_PDA_SAFE(preg) \
121 preg.l = _cpu_pda; \ 112 preg.l = _cpu_pda; \
122 preg.h = _cpu_pda; 113 preg.h = _cpu_pda;
diff --git a/arch/blackfin/mach-bf561/include/mach/mem_map.h b/arch/blackfin/mach-bf561/include/mach/mem_map.h
index 488c3bda65bf..419dffdc96eb 100644
--- a/arch/blackfin/mach-bf561/include/mach/mem_map.h
+++ b/arch/blackfin/mach-bf561/include/mach/mem_map.h
@@ -85,47 +85,7 @@
85#define L1_SCRATCH_START COREA_L1_SCRATCH_START 85#define L1_SCRATCH_START COREA_L1_SCRATCH_START
86#define L1_SCRATCH_LENGTH 0x1000 86#define L1_SCRATCH_LENGTH 0x1000
87 87
88#ifndef __ASSEMBLY__ 88#ifdef __ASSEMBLY__
89
90#ifdef CONFIG_SMP
91
92#define get_l1_scratch_start_cpu(cpu) \
93 ({ unsigned long __addr; \
94 __addr = (cpu) ? COREB_L1_SCRATCH_START : COREA_L1_SCRATCH_START;\
95 __addr; })
96
97#define get_l1_code_start_cpu(cpu) \
98 ({ unsigned long __addr; \
99 __addr = (cpu) ? COREB_L1_CODE_START : COREA_L1_CODE_START; \
100 __addr; })
101
102#define get_l1_data_a_start_cpu(cpu) \
103 ({ unsigned long __addr; \
104 __addr = (cpu) ? COREB_L1_DATA_A_START : COREA_L1_DATA_A_START;\
105 __addr; })
106
107#define get_l1_data_b_start_cpu(cpu) \
108 ({ unsigned long __addr; \
109 __addr = (cpu) ? COREB_L1_DATA_B_START : COREA_L1_DATA_B_START;\
110 __addr; })
111
112#define get_l1_scratch_start() get_l1_scratch_start_cpu(blackfin_core_id())
113#define get_l1_code_start() get_l1_code_start_cpu(blackfin_core_id())
114#define get_l1_data_a_start() get_l1_data_a_start_cpu(blackfin_core_id())
115#define get_l1_data_b_start() get_l1_data_b_start_cpu(blackfin_core_id())
116
117#else /* !CONFIG_SMP */
118#define get_l1_scratch_start_cpu(cpu) L1_SCRATCH_START
119#define get_l1_code_start_cpu(cpu) L1_CODE_START
120#define get_l1_data_a_start_cpu(cpu) L1_DATA_A_START
121#define get_l1_data_b_start_cpu(cpu) L1_DATA_B_START
122#define get_l1_scratch_start() L1_SCRATCH_START
123#define get_l1_code_start() L1_CODE_START
124#define get_l1_data_a_start() L1_DATA_A_START
125#define get_l1_data_b_start() L1_DATA_B_START
126#endif /* !CONFIG_SMP */
127
128#else /* __ASSEMBLY__ */
129 89
130/* 90/*
131 * The following macros both return the address of the PDA for the 91 * The following macros both return the address of the PDA for the
diff --git a/arch/blackfin/mach-bf561/smp.c b/arch/blackfin/mach-bf561/smp.c
index 23fd4c13897f..9b27e698c0b2 100644
--- a/arch/blackfin/mach-bf561/smp.c
+++ b/arch/blackfin/mach-bf561/smp.c
@@ -27,11 +27,6 @@
27#include <asm/smp.h> 27#include <asm/smp.h>
28#include <asm/dma.h> 28#include <asm/dma.h>
29 29
30#define COREB_SRAM_BASE 0xff600000
31#define COREB_SRAM_SIZE 0x4000
32
33extern char coreb_trampoline_start, coreb_trampoline_end;
34
35static DEFINE_SPINLOCK(boot_lock); 30static DEFINE_SPINLOCK(boot_lock);
36 31
37static cpumask_t cpu_callin_map; 32static cpumask_t cpu_callin_map;
@@ -54,15 +49,15 @@ void __init platform_prepare_cpus(unsigned int max_cpus)
54 int len; 49 int len;
55 50
56 len = &coreb_trampoline_end - &coreb_trampoline_start + 1; 51 len = &coreb_trampoline_end - &coreb_trampoline_start + 1;
57 BUG_ON(len > COREB_SRAM_SIZE); 52 BUG_ON(len > L1_CODE_LENGTH);
58 53
59 dma_memcpy((void *)COREB_SRAM_BASE, &coreb_trampoline_start, len); 54 dma_memcpy((void *)COREB_L1_CODE_START, &coreb_trampoline_start, len);
60 55
61 /* Both cores ought to be present on a bf561! */ 56 /* Both cores ought to be present on a bf561! */
62 cpu_set(0, cpu_present_map); /* CoreA */ 57 cpu_set(0, cpu_present_map); /* CoreA */
63 cpu_set(1, cpu_present_map); /* CoreB */ 58 cpu_set(1, cpu_present_map); /* CoreB */
64 59
65 printk(KERN_INFO "CoreB bootstrap code to SRAM %p via DMA.\n", (void *)COREB_SRAM_BASE); 60 printk(KERN_INFO "CoreB bootstrap code to SRAM %p via DMA.\n", (void *)COREB_L1_CODE_START);
66} 61}
67 62
68int __init setup_profiling_timer(unsigned int multiplier) /* not supported */ 63int __init setup_profiling_timer(unsigned int multiplier) /* not supported */
diff --git a/arch/blackfin/mm/sram-alloc.c b/arch/blackfin/mm/sram-alloc.c
index 1ca5deb7934b..834cab7438a8 100644
--- a/arch/blackfin/mm/sram-alloc.c
+++ b/arch/blackfin/mm/sram-alloc.c
@@ -39,6 +39,7 @@
39#include <linux/spinlock.h> 39#include <linux/spinlock.h>
40#include <linux/rtc.h> 40#include <linux/rtc.h>
41#include <asm/blackfin.h> 41#include <asm/blackfin.h>
42#include <asm/mem_map.h>
42#include "blackfin_sram.h" 43#include "blackfin_sram.h"
43 44
44static DEFINE_PER_CPU(spinlock_t, l1sram_lock) ____cacheline_aligned_in_smp; 45static DEFINE_PER_CPU(spinlock_t, l1sram_lock) ____cacheline_aligned_in_smp;