aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/hugetlb.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/hugetlb.h')
-rw-r--r--include/linux/hugetlb.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index 5e35379f58a5..685c262e0be8 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -483,6 +483,17 @@ static inline spinlock_t *huge_pte_lockptr(struct hstate *h,
483#define hugepages_supported() (HPAGE_SHIFT != 0) 483#define hugepages_supported() (HPAGE_SHIFT != 0)
484#endif 484#endif
485 485
486void hugetlb_report_usage(struct seq_file *m, struct mm_struct *mm);
487
488static inline void hugetlb_count_add(long l, struct mm_struct *mm)
489{
490 atomic_long_add(l, &mm->hugetlb_usage);
491}
492
493static inline void hugetlb_count_sub(long l, struct mm_struct *mm)
494{
495 atomic_long_sub(l, &mm->hugetlb_usage);
496}
486#else /* CONFIG_HUGETLB_PAGE */ 497#else /* CONFIG_HUGETLB_PAGE */
487struct hstate {}; 498struct hstate {};
488#define alloc_huge_page(v, a, r) NULL 499#define alloc_huge_page(v, a, r) NULL
@@ -519,6 +530,14 @@ static inline spinlock_t *huge_pte_lockptr(struct hstate *h,
519{ 530{
520 return &mm->page_table_lock; 531 return &mm->page_table_lock;
521} 532}
533
534static inline void hugetlb_report_usage(struct seq_file *f, struct mm_struct *m)
535{
536}
537
538static inline void hugetlb_count_sub(long l, struct mm_struct *mm)
539{
540}
522#endif /* CONFIG_HUGETLB_PAGE */ 541#endif /* CONFIG_HUGETLB_PAGE */
523 542
524static inline spinlock_t *huge_pte_lock(struct hstate *h, 543static inline spinlock_t *huge_pte_lock(struct hstate *h,