提交 49fcc7b1 编写于 作者: G Graf Yang 提交者: Mike Frysinger

Blackfin: bf561: fix mem_map.h SMP overrides

The BF561 mem_map.h header has the __ASSEMBLY__/CONFIG_SMP checks out
of order which leads to build errors for assembly code that happens to
include this file.
Signed-off-by: NGraf Yang <graf.yang@analog.com>
Signed-off-by: NMike Frysinger <vapier@gentoo.org>
上级 75734e66
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
#define COREA_L1_SCRATCH_START 0xFFB00000 #define COREA_L1_SCRATCH_START 0xFFB00000
#define COREB_L1_SCRATCH_START 0xFF700000 #define COREB_L1_SCRATCH_START 0xFF700000
#ifdef __ASSEMBLY__ #ifdef CONFIG_SMP
/* /*
* The following macros both return the address of the PDA for the * The following macros both return the address of the PDA for the
...@@ -121,8 +121,7 @@ ...@@ -121,8 +121,7 @@
* is allowed to use the specified Dreg for determining the PDA * is allowed to use the specified Dreg for determining the PDA
* address to be returned into Preg. * address to be returned into Preg.
*/ */
#ifdef CONFIG_SMP # define GET_PDA_SAFE(preg) \
#define GET_PDA_SAFE(preg) \
preg.l = lo(DSPID); \ preg.l = lo(DSPID); \
preg.h = hi(DSPID); \ preg.h = hi(DSPID); \
preg = [preg]; \ preg = [preg]; \
...@@ -158,7 +157,7 @@ ...@@ -158,7 +157,7 @@
preg = [preg]; \ preg = [preg]; \
4: 4:
#define GET_PDA(preg, dreg) \ # define GET_PDA(preg, dreg) \
preg.l = lo(DSPID); \ preg.l = lo(DSPID); \
preg.h = hi(DSPID); \ preg.h = hi(DSPID); \
dreg = [preg]; \ dreg = [preg]; \
...@@ -169,13 +168,17 @@ ...@@ -169,13 +168,17 @@
preg = [preg]; \ preg = [preg]; \
1: \ 1: \
#define GET_CPUID(preg, dreg) \ # define GET_CPUID(preg, dreg) \
preg.l = lo(DSPID); \ preg.l = lo(DSPID); \
preg.h = hi(DSPID); \ preg.h = hi(DSPID); \
dreg = [preg]; \ dreg = [preg]; \
dreg = ROT dreg BY -1; \ dreg = ROT dreg BY -1; \
dreg = CC; dreg = CC;
# ifndef __ASSEMBLY__
# include <asm/processor.h>
static inline unsigned long get_l1_scratch_start_cpu(int cpu) static inline unsigned long get_l1_scratch_start_cpu(int cpu)
{ {
return cpu ? COREB_L1_SCRATCH_START : COREA_L1_SCRATCH_START; 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,8 +213,7 @@ static inline unsigned long get_l1_data_b_start(void)
return get_l1_data_b_start_cpu(blackfin_core_id()); return get_l1_data_b_start_cpu(blackfin_core_id());
} }
# endif /* __ASSEMBLY__ */
#endif /* CONFIG_SMP */ #endif /* CONFIG_SMP */
#endif /* __ASSEMBLY__ */
#endif #endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册