[linux-yocto] [PATCH 10/15] arch/powerpc: fixed NO_SMP compile failure

Daniel Dragomir daniel.dragomir at windriver.com
Tue Jun 27 08:41:10 PDT 2017


From: Charlie Paul <cpaul.windriver at gmail.com>

This patch fixes the compile bug when CONFIG_SMP is turned off.

Signed-off-by: Charlie Paul <cpaul.windriver at gmail.com>
---
 arch/powerpc/include/asm/dcr-native.h | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/include/asm/dcr-native.h b/arch/powerpc/include/asm/dcr-native.h
index 4efc11d..bbc2fd3 100644
--- a/arch/powerpc/include/asm/dcr-native.h
+++ b/arch/powerpc/include/asm/dcr-native.h
@@ -64,8 +64,7 @@ static inline void mtdcrx(unsigned int reg, unsigned int val)
 #define mfdcr(rn)						\
 	({unsigned int rval;					\
 	if (__builtin_constant_p(rn) && rn < 1024)		\
-		asm volatile("mfdcr %0," __stringify(rn)	\
-		              : "=r" (rval));			\
+		asm volatile("mfdcr %0,%1" : "=r"(rval) : "i"(rn)); \
 	else if (likely(cpu_has_feature(CPU_FTR_INDEXED_DCR)))	\
 		rval = mfdcrx(rn);				\
 	else							\
@@ -75,8 +74,7 @@ static inline void mtdcrx(unsigned int reg, unsigned int val)
 #define mtdcr(rn, v)						\
 do {								\
 	if (__builtin_constant_p(rn) && rn < 1024)		\
-		asm volatile("mtdcr " __stringify(rn) ",%0"	\
-			      : : "r" (v)); 			\
+		asm volatile("mtdcr %0,%1" : : "i"(rn), "r"(v)); \
 	else if (likely(cpu_has_feature(CPU_FTR_INDEXED_DCR)))	\
 		mtdcrx(rn, v);					\
 	else							\
-- 
2.7.4



More information about the linux-yocto mailing list