Commit 2099597401c7710c00b0d7c32b24a44a193836e1
Committed by
Linus Torvalds
1 parent
e30d539b3f
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
mm: move is_vma_temporary_stack() declaration to huge_mm.h
When transparent_hugepage_enabled() is used outside mm/, such as in arch/x86/xx/tlb.c: + if (!cpu_has_invlpg || vma->vm_flags & VM_HUGETLB + || transparent_hugepage_enabled(vma)) { + flush_tlb_mm(vma->vm_mm); is_vma_temporary_stack() isn't referenced in huge_mm.h, so it has compile errors: arch/x86/mm/tlb.c: In function `flush_tlb_range': arch/x86/mm/tlb.c:324:4: error: implicit declaration of function `is_vma_temporary_stack' [-Werror=implicit-function-declaration] Since is_vma_temporay_stack() is just used in rmap.c and huge_memory.c, it is better to move it to huge_mm.h from rmap.h to avoid such errors. Signed-off-by: Alex Shi <alex.shi@intel.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 2 changed files with 2 additions and 2 deletions Side-by-side Diff
include/linux/huge_mm.h
... | ... | @@ -59,6 +59,8 @@ |
59 | 59 | #define HPAGE_PMD_MASK HPAGE_MASK |
60 | 60 | #define HPAGE_PMD_SIZE HPAGE_SIZE |
61 | 61 | |
62 | +extern bool is_vma_temporary_stack(struct vm_area_struct *vma); | |
63 | + | |
62 | 64 | #define transparent_hugepage_enabled(__vma) \ |
63 | 65 | ((transparent_hugepage_flags & \ |
64 | 66 | (1<<TRANSPARENT_HUGEPAGE_FLAG) || \ |
include/linux/rmap.h
... | ... | @@ -173,8 +173,6 @@ |
173 | 173 | }; |
174 | 174 | #define TTU_ACTION(x) ((x) & TTU_ACTION_MASK) |
175 | 175 | |
176 | -bool is_vma_temporary_stack(struct vm_area_struct *vma); | |
177 | - | |
178 | 176 | int try_to_unmap(struct page *, enum ttu_flags flags); |
179 | 177 | int try_to_unmap_one(struct page *, struct vm_area_struct *, |
180 | 178 | unsigned long address, enum ttu_flags flags); |