From: Sung-hun Kim Date: Wed, 8 Sep 2021 08:18:37 +0000 (+0900) Subject: mm: THP: workaround: only allow including specific headers for FINEGRAINED_THP config... X-Git-Tag: accepted/tizen/unified/20210909.101207^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F99%2F263699%2F1;p=platform%2Fkernel%2Flinux-rpi.git mm: THP: workaround: only allow including specific headers for FINEGRAINED_THP configured cases asm/huge_mm.h and asm/finegrained_thp.h are only used for FINEGRAINED_THP-enabled kernel. Otherwise, such as arm which does not support contiguous PTE bit, disallow including them. Fixes: 7d5372737d34 ("mm: THP: introducing a fine-grained transparent hugepage technique for ARM64 architecture") Change-Id: I37c2bc46106711f4b7ee33a6838d87e929e13247 Signed-off-by: Sung-hun Kim --- diff --git a/mm/khugepaged.c b/mm/khugepaged.c index aa96e8e..34f0c40 100644 --- a/mm/khugepaged.c +++ b/mm/khugepaged.c @@ -21,8 +21,10 @@ #include #include +#ifdef CONFIG_FINEGRAINED_THP #include #include +#endif #include "internal.h" enum scan_result { diff --git a/mm/memory.c b/mm/memory.c index 08336046..bdf18e9 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -82,8 +82,13 @@ #include #include #include +#ifdef CONFIG_FINEGRAINED_THP #include #include +#else +#include +#include +#endif #include "pgalloc-track.h" #include "internal.h" diff --git a/mm/mmap.c b/mm/mmap.c index 02eb014..cca7268 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -52,7 +52,11 @@ #include #include #include +#ifdef CONFIG_FINEGRAINED_THP #include +#else +#include +#endif #define CREATE_TRACE_POINTS #include