diff options
author | Johannes Weiner <hannes@cmpxchg.org> | 2011-01-13 15:47:01 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-13 17:32:44 -0800 |
commit | f2d6bfe9ff0acec30b713614260e78b03d20e909 (patch) | |
tree | 835dd9f4167513d94ae542cf92347ea98bff5ddc /arch/x86/include/asm/pgtable-2level.h | |
parent | 5f24ce5fd34c3ca1b3d10d30da754732da64d5c0 (diff) | |
download | linux-f2d6bfe9ff0acec30b713614260e78b03d20e909.tar.gz linux-f2d6bfe9ff0acec30b713614260e78b03d20e909.tar.bz2 linux-f2d6bfe9ff0acec30b713614260e78b03d20e909.zip |
thp: add x86 32bit support
Add support for transparent hugepages to x86 32bit.
Share the same VM_ bitflag for VM_MAPPED_COPY. mm/nommu.c will never
support transparent hugepages.
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Reviewed-by: Rik van Riel <riel@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/include/asm/pgtable-2level.h')
-rw-r--r-- | arch/x86/include/asm/pgtable-2level.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86/include/asm/pgtable-2level.h b/arch/x86/include/asm/pgtable-2level.h index 2334982b339e..98391db840c6 100644 --- a/arch/x86/include/asm/pgtable-2level.h +++ b/arch/x86/include/asm/pgtable-2level.h @@ -46,6 +46,15 @@ static inline pte_t native_ptep_get_and_clear(pte_t *xp) #define native_ptep_get_and_clear(xp) native_local_ptep_get_and_clear(xp) #endif +#ifdef CONFIG_SMP +static inline pmd_t native_pmdp_get_and_clear(pmd_t *xp) +{ + return __pmd(xchg((pmdval_t *)xp, 0)); +} +#else +#define native_pmdp_get_and_clear(xp) native_local_pmdp_get_and_clear(xp) +#endif + /* * Bits _PAGE_BIT_PRESENT, _PAGE_BIT_FILE and _PAGE_BIT_PROTNONE are taken, * split up the 29 bits of offset into this range: |