Merge branch 'linux-next' of git://git.infradead.org/ubi-2.6
[firefly-linux-kernel-4.4.55.git] / arch / powerpc / include / asm / feature-fixups.h
index 921a8470e18a591b70c88ad6796a08ee0c6a588c..9a67a38bf7b94a3b443dc0b1428bf64b40b544aa 100644 (file)
@@ -49,7 +49,7 @@ label##5:                                                     \
        FTR_ENTRY_OFFSET label##2b-label##5b;                   \
        FTR_ENTRY_OFFSET label##3b-label##5b;                   \
        FTR_ENTRY_OFFSET label##4b-label##5b;                   \
-       .ifgt (label##4b-label##3b)-(label##2b-label##1b);      \
+       .ifgt (label##4b- label##3b)-(label##2b- label##1b);    \
        .error "Feature section else case larger than body";    \
        .endif;                                                 \
        .popsection;
@@ -146,6 +146,19 @@ label##5:                                                  \
 
 #ifndef __ASSEMBLY__
 
+#define ASM_FTR_IF(section_if, section_else, msk, val) \
+       stringify_in_c(BEGIN_FTR_SECTION)                       \
+       section_if "; "                                         \
+       stringify_in_c(FTR_SECTION_ELSE)                        \
+       section_else "; "                                       \
+       stringify_in_c(ALT_FTR_SECTION_END((msk), (val)))
+
+#define ASM_FTR_IFSET(section_if, section_else, msk)   \
+       ASM_FTR_IF(section_if, section_else, (msk), (msk))
+
+#define ASM_FTR_IFCLR(section_if, section_else, msk)   \
+       ASM_FTR_IF(section_if, section_else, (msk), 0)
+
 #define ASM_MMU_FTR_IF(section_if, section_else, msk, val)     \
        stringify_in_c(BEGIN_MMU_FTR_SECTION)                   \
        section_if "; "                                         \