[CRIU] [RFC 05/11] Complain about missing CONFIG_ARMV*

Christopher Covington cov at codeaurora.org
Fri Feb 7 09:04:39 PST 2014


Without this a user may encounter the following error.

arch/arm/include/asm/atomic.h:38:2: error: implicit declaration of function ‘smp_mb’

With the #error pragma a user is a least pointed to the specific
section in the file that's causing the problem

arch/arm/include/asm/atomic.h:21:2: error: #error ARM architecture version (CONFIG_ARMV*) not set or unsupported.
---
 arch/arm/include/asm/atomic.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/include/asm/atomic.h b/arch/arm/include/asm/atomic.h
index 7bee004..bb79493 100644
--- a/arch/arm/include/asm/atomic.h
+++ b/arch/arm/include/asm/atomic.h
@@ -16,6 +16,10 @@ typedef struct {
 
 #define smp_mb() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5"	: : "r" (0) : "memory")
 
+#else
+
+#error ARM architecture version (CONFIG_ARMV*) not set or unsupported.
+
 #endif
 
 static inline int atomic_read(const atomic_t *v)
-- 
Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by the Linux Foundation.



More information about the CRIU mailing list