diff options
author | Andrea Arcangeli <aarcange@redhat.com> | 2011-01-13 18:47:09 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-13 20:32:45 -0500 |
commit | 4b7167b9ff9b7f3f528cbc4c7d02ebd275b9b10c (patch) | |
tree | ad2c23c28b9dea009daf3719aefeb79103e2c152 /arch/x86 | |
parent | 94fcc585fb85ad7b059c70872489b50044d401f3 (diff) |
thp: don't allow transparent hugepage support without PSE
Archs implementing Transparent Hugepage Support must implement a function
called has_transparent_hugepage to be sure the virtual or physical CPU
supports Transparent Hugepages.
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/include/asm/pgtable.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index c48ba055f693..18601c86fab1 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h | |||
@@ -160,6 +160,11 @@ static inline int pmd_trans_huge(pmd_t pmd) | |||
160 | { | 160 | { |
161 | return pmd_val(pmd) & _PAGE_PSE; | 161 | return pmd_val(pmd) & _PAGE_PSE; |
162 | } | 162 | } |
163 | |||
164 | static inline int has_transparent_hugepage(void) | ||
165 | { | ||
166 | return cpu_has_pse; | ||
167 | } | ||
163 | #endif /* CONFIG_TRANSPARENT_HUGEPAGE */ | 168 | #endif /* CONFIG_TRANSPARENT_HUGEPAGE */ |
164 | 169 | ||
165 | static inline pte_t pte_set_flags(pte_t pte, pteval_t set) | 170 | static inline pte_t pte_set_flags(pte_t pte, pteval_t set) |