diff options
| author | Chris Metcalf <cmetcalf@tilera.com> | 2012-04-01 14:01:34 -0400 |
|---|---|---|
| committer | Chris Metcalf <cmetcalf@tilera.com> | 2012-05-25 12:48:26 -0400 |
| commit | d9ed9faac283a3be73f0e11a2ef49ee55aece4db (patch) | |
| tree | 49ec312cc1a066d23d602838d58a1723ec9331e8 /include/linux | |
| parent | fc0c49f5db640b9dfc7bb801892b5cbb7508a76a (diff) | |
mm: add new arch_make_huge_pte() method for tile support
The tile support for multiple-size huge pages requires tagging
the hugetlb PTE with a "super" bit for PTEs that are multiples of
the basic size of a pagetable span. To set that bit properly
we need to tweak the PTe in make_huge_pte() based on the vma.
This change provides the API for a subsequent tile-specific
change to use.
Reviewed-by: Hillf Danton <dhillf@gmail.com>
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/hugetlb.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 000837e126e6..d5d6bbe2259e 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
| @@ -284,6 +284,14 @@ static inline unsigned int blocks_per_huge_page(struct hstate *h) | |||
| 284 | 284 | ||
| 285 | #include <asm/hugetlb.h> | 285 | #include <asm/hugetlb.h> |
| 286 | 286 | ||
| 287 | #ifndef arch_make_huge_pte | ||
| 288 | static inline pte_t arch_make_huge_pte(pte_t entry, struct vm_area_struct *vma, | ||
| 289 | struct page *page, int writable) | ||
| 290 | { | ||
| 291 | return entry; | ||
| 292 | } | ||
| 293 | #endif | ||
| 294 | |||
| 287 | static inline struct hstate *page_hstate(struct page *page) | 295 | static inline struct hstate *page_hstate(struct page *page) |
| 288 | { | 296 | { |
| 289 | return size_to_hstate(PAGE_SIZE << compound_order(page)); | 297 | return size_to_hstate(PAGE_SIZE << compound_order(page)); |
