diff options
-rw-r--r-- | arch/blackfin/mach-bf561/include/mach/mem_map.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/arch/blackfin/mach-bf561/include/mach/mem_map.h b/arch/blackfin/mach-bf561/include/mach/mem_map.h index 5b96ea549a04..4cc91995f781 100644 --- a/arch/blackfin/mach-bf561/include/mach/mem_map.h +++ b/arch/blackfin/mach-bf561/include/mach/mem_map.h | |||
@@ -106,7 +106,7 @@ | |||
106 | #define COREA_L1_SCRATCH_START 0xFFB00000 | 106 | #define COREA_L1_SCRATCH_START 0xFFB00000 |
107 | #define COREB_L1_SCRATCH_START 0xFF700000 | 107 | #define COREB_L1_SCRATCH_START 0xFF700000 |
108 | 108 | ||
109 | #ifdef __ASSEMBLY__ | 109 | #ifdef CONFIG_SMP |
110 | 110 | ||
111 | /* | 111 | /* |
112 | * The following macros both return the address of the PDA for the | 112 | * The following macros both return the address of the PDA for the |
@@ -121,8 +121,7 @@ | |||
121 | * is allowed to use the specified Dreg for determining the PDA | 121 | * is allowed to use the specified Dreg for determining the PDA |
122 | * address to be returned into Preg. | 122 | * address to be returned into Preg. |
123 | */ | 123 | */ |
124 | #ifdef CONFIG_SMP | 124 | # define GET_PDA_SAFE(preg) \ |
125 | #define GET_PDA_SAFE(preg) \ | ||
126 | preg.l = lo(DSPID); \ | 125 | preg.l = lo(DSPID); \ |
127 | preg.h = hi(DSPID); \ | 126 | preg.h = hi(DSPID); \ |
128 | preg = [preg]; \ | 127 | preg = [preg]; \ |
@@ -158,7 +157,7 @@ | |||
158 | preg = [preg]; \ | 157 | preg = [preg]; \ |
159 | 4: | 158 | 4: |
160 | 159 | ||
161 | #define GET_PDA(preg, dreg) \ | 160 | # define GET_PDA(preg, dreg) \ |
162 | preg.l = lo(DSPID); \ | 161 | preg.l = lo(DSPID); \ |
163 | preg.h = hi(DSPID); \ | 162 | preg.h = hi(DSPID); \ |
164 | dreg = [preg]; \ | 163 | dreg = [preg]; \ |
@@ -169,13 +168,17 @@ | |||
169 | preg = [preg]; \ | 168 | preg = [preg]; \ |
170 | 1: \ | 169 | 1: \ |
171 | 170 | ||
172 | #define GET_CPUID(preg, dreg) \ | 171 | # define GET_CPUID(preg, dreg) \ |
173 | preg.l = lo(DSPID); \ | 172 | preg.l = lo(DSPID); \ |
174 | preg.h = hi(DSPID); \ | 173 | preg.h = hi(DSPID); \ |
175 | dreg = [preg]; \ | 174 | dreg = [preg]; \ |
176 | dreg = ROT dreg BY -1; \ | 175 | dreg = ROT dreg BY -1; \ |
177 | dreg = CC; | 176 | dreg = CC; |
178 | 177 | ||
178 | # ifndef __ASSEMBLY__ | ||
179 | |||
180 | # include <asm/processor.h> | ||
181 | |||
179 | static inline unsigned long get_l1_scratch_start_cpu(int cpu) | 182 | static inline unsigned long get_l1_scratch_start_cpu(int cpu) |
180 | { | 183 | { |
181 | return cpu ? COREB_L1_SCRATCH_START : COREA_L1_SCRATCH_START; | 184 | return cpu ? COREB_L1_SCRATCH_START : COREA_L1_SCRATCH_START; |
@@ -210,8 +213,7 @@ static inline unsigned long get_l1_data_b_start(void) | |||
210 | return get_l1_data_b_start_cpu(blackfin_core_id()); | 213 | return get_l1_data_b_start_cpu(blackfin_core_id()); |
211 | } | 214 | } |
212 | 215 | ||
216 | # endif /* __ASSEMBLY__ */ | ||
213 | #endif /* CONFIG_SMP */ | 217 | #endif /* CONFIG_SMP */ |
214 | 218 | ||
215 | #endif /* __ASSEMBLY__ */ | ||
216 | |||
217 | #endif | 219 | #endif |