aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-05-24 18:53:11 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2020-09-30 16:25:42 +0200
commit58d4fb961436e227168d60812e8b5d023f6eead7 (patch)
tree391673fe5af59d4c6cbec0b1ab02e35b0e58be57
parentmm: pass in correct zero gup_flags argument (diff)
downloadrhel7-kernel-misery-58d4fb961436e227168d60812e8b5d023f6eead7.tar.xz
rhel7-kernel-misery-58d4fb961436e227168d60812e8b5d023f6eead7.zip
x86: do not evaluate sometimes-undefined _PAGE_BIT_SWP_SOFT_DIRTY
In certain configurations, _PAGE_BIT_SWP_SOFT_DIRTY is undefined, resulting in preprocessor warnings. Fix this by checking whether it's defined first. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r--arch/x86/include/asm/pgtable_types.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/include/asm/pgtable_types.h b/arch/x86/include/asm/pgtable_types.h
index e857a2c2600..c47e99e1be9 100644
--- a/arch/x86/include/asm/pgtable_types.h
+++ b/arch/x86/include/asm/pgtable_types.h
@@ -133,7 +133,7 @@
* Do compile-time checks for all the bits that may be set on
* non-present PTEs
*/
-#if _PAGE_BIT_FILE == _PAGE_BIT_SWP_SOFT_DIRTY
+#if defined(_PAGE_BIT_SWP_SOFT_DIRTY) && _PAGE_BIT_FILE == _PAGE_BIT_SWP_SOFT_DIRTY
#error conflicting _PAGE_BIT_FILE
#endif
#if _PAGE_BIT_FILE == _PAGE_BIT_PROTNONE