diff options
author | Andrea Arcangeli <aarcange@redhat.com> | 2011-01-13 18:46:40 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-13 20:32:40 -0500 |
commit | 5f6e8da70a289d403975907371ce5738c726ad3f (patch) | |
tree | c44705a17d4133a8d4a8d02dae9bb5487c3bc2a6 /include/asm-generic/pgtable.h | |
parent | 4c76d9d1fb9b21fa10c9e4c1fab2875018a88aa1 (diff) |
thp: special pmd_trans_* functions
These returns 0 at compile time when the config option is disabled, to
allow gcc to eliminate the transparent hugepage function calls at compile
time without additional #ifdefs (only the export of those functions have
to be visible to gcc but they won't be required at link time and
huge_memory.o can be not built at all).
_PAGE_BIT_UNUSED1 is never used for pmd, only on pte.
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Acked-by: Rik van Riel <riel@redhat.com>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-generic/pgtable.h')
-rw-r--r-- | include/asm-generic/pgtable.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h index 6f3c6ae4fe03..0ab2cd27c60f 100644 --- a/include/asm-generic/pgtable.h +++ b/include/asm-generic/pgtable.h | |||
@@ -348,6 +348,17 @@ extern void untrack_pfn_vma(struct vm_area_struct *vma, unsigned long pfn, | |||
348 | unsigned long size); | 348 | unsigned long size); |
349 | #endif | 349 | #endif |
350 | 350 | ||
351 | #ifndef CONFIG_TRANSPARENT_HUGEPAGE | ||
352 | static inline int pmd_trans_huge(pmd_t pmd) | ||
353 | { | ||
354 | return 0; | ||
355 | } | ||
356 | static inline int pmd_trans_splitting(pmd_t pmd) | ||
357 | { | ||
358 | return 0; | ||
359 | } | ||
360 | #endif | ||
361 | |||
351 | #endif /* !__ASSEMBLY__ */ | 362 | #endif /* !__ASSEMBLY__ */ |
352 | 363 | ||
353 | #endif /* _ASM_GENERIC_PGTABLE_H */ | 364 | #endif /* _ASM_GENERIC_PGTABLE_H */ |