diff options
author | Gerald Schaefer <gerald.schaefer@de.ibm.com> | 2012-10-08 19:30:07 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-09 03:22:29 -0400 |
commit | e3ebcf64381188a2744a9829a4eb5c2b60f1974c (patch) | |
tree | 6c2bc18729bd6fc12b93d82403fad6afec319c3b /include/asm-generic | |
parent | 15626062f4a98279c59a2a5208c496cf65cbf8c0 (diff) |
thp: remove assumptions on pgtable_t type
The thp page table pre-allocation code currently assumes that pgtable_t is
of type "struct page *". This may not be true for all architectures, so
this patch removes that assumption by replacing the functions
prepare_pmd_huge_pte() and get_pmd_huge_pte() with two new functions that
can be defined architecture-specific.
It also removes two VM_BUG_ON checks for page_count() and page_mapcount()
operating on a pgtable_t. Apart from the VM_BUG_ON removal, there will be
no functional change introduced by this patch.
Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Hillf Danton <dhillf@gmail.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/pgtable.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h index c9a612069c8e..044939f21c16 100644 --- a/include/asm-generic/pgtable.h +++ b/include/asm-generic/pgtable.h | |||
@@ -162,6 +162,14 @@ extern void pmdp_splitting_flush(struct vm_area_struct *vma, | |||
162 | unsigned long address, pmd_t *pmdp); | 162 | unsigned long address, pmd_t *pmdp); |
163 | #endif | 163 | #endif |
164 | 164 | ||
165 | #ifndef __HAVE_ARCH_PGTABLE_DEPOSIT | ||
166 | extern void pgtable_trans_huge_deposit(struct mm_struct *mm, pgtable_t pgtable); | ||
167 | #endif | ||
168 | |||
169 | #ifndef __HAVE_ARCH_PGTABLE_WITHDRAW | ||
170 | extern pgtable_t pgtable_trans_huge_withdraw(struct mm_struct *mm); | ||
171 | #endif | ||
172 | |||
165 | #ifndef __HAVE_ARCH_PTE_SAME | 173 | #ifndef __HAVE_ARCH_PTE_SAME |
166 | static inline int pte_same(pte_t pte_a, pte_t pte_b) | 174 | static inline int pte_same(pte_t pte_a, pte_t pte_b) |
167 | { | 175 | { |