diff options
| author | Andrew Morton <akpm@osdl.org> | 2004-04-11 23:41:36 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-04-11 23:41:36 -0700 |
| commit | c8b976af1af10de3d92968bf7d4bd5415e8a3778 (patch) | |
| tree | 94c82175e2c952f5cfa9d8c6945808d6232bf3a7 /include/linux | |
| parent | 618e7f449ebbd72f5d2c0e7fce05319d058a0700 (diff) | |
[PATCH] hugetlb consolidation
From: William Lee Irwin III <wli@holomorphy.com>
The following patch consolidates redundant code in various hugetlb
implementations. I took the liberty of renaming a few things, since the
code was all moved anyway, and it has the benefit of helping to catch
missed conversions and/or consolidations.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/hugetlb.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index da3fc826a0de..b0e98cfe15f9 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -28,8 +28,11 @@ struct page *follow_huge_pmd(struct mm_struct *mm, unsigned long address, pmd_t *pmd, int write); int is_aligned_hugepage_range(unsigned long addr, unsigned long len); int pmd_huge(pmd_t pmd); +struct page *alloc_huge_page(void); +void free_huge_page(struct page *); -extern int htlbpage_max; +extern unsigned long max_huge_pages; +extern const unsigned long hugetlb_zero, hugetlb_infinity; static inline void mark_mm_hugetlb(struct mm_struct *mm, struct vm_area_struct *vma) @@ -78,6 +81,8 @@ static inline unsigned long hugetlb_total_pages(void) #define pmd_huge(x) 0 #define is_hugepage_only_range(addr, len) 0 #define hugetlb_free_pgtables(tlb, prev, start, end) do { } while (0) +#define alloc_huge_page() ({ NULL; }) +#define free_huge_page(p) ({ (void)(p); BUG(); }) #ifndef HPAGE_MASK #define HPAGE_MASK 0 /* Keep the compiler happy */ |
