@@ -173,9 +173,8 @@
* when we detect at runtime that we're running on a CPU that doesn't need
* them.
*/
-#ifdef CONFIG_CPU_HAS_SYNC
# define ____SYNC(_type, _reason, _else) \
- .if (( _type ) != -1) && ( _reason ); \
+ ((_type) != -1) && (_reason); \
.set push; \
.set MIPS_ISA_LEVEL_RAW; \
.rept __SYNC_rpt(_type); \
@@ -185,21 +184,28 @@
.else; \
_else; \
.endif
-#else
-# define ____SYNC(_type, _reason, _else)
-#endif
/*
* Preprocessor magic to expand macros used as arguments before we insert them
* into assembly code.
+ * In addition,'if' cannot be enabled.
*/
+#ifdef CONFIG_CPU_HAS_SYNC
#ifdef __ASSEMBLY__
# define ___SYNC(type, reason, else) \
- ____SYNC(type, reason, else)
+ .if ____SYNC(type, reason, else)
+#else
+# define ___SYNC(type, reason, else) \
+ ".if" __stringify(____SYNC(type, reason, else))
+#endif
+#else /* CONFIG_CPU_HAS_SYNC */
+#ifdef __ASSEMBLY__
+# define ___SYNC(type, reason, else)
#else
# define ___SYNC(type, reason, else) \
- __stringify(____SYNC(type, reason, else))
+ __stringify()
#endif
+#endif /* CONFIG_CPU_HAS_SYNC */
#define __SYNC(type, reason) \
___SYNC(__SYNC_##type, __SYNC_##reason, )