aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mm.h24
-rw-r--r--include/linux/mm_types.h3
2 files changed, 26 insertions, 1 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index c6bf813a6b3d..644990b83cda 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1438,8 +1438,32 @@ static inline int __pmd_alloc(struct mm_struct *mm, pud_t *pud,
1438{ 1438{
1439 return 0; 1439 return 0;
1440} 1440}
1441
1442static inline unsigned long mm_nr_pmds(struct mm_struct *mm)
1443{
1444 return 0;
1445}
1446
1447static inline void mm_inc_nr_pmds(struct mm_struct *mm) {}
1448static inline void mm_dec_nr_pmds(struct mm_struct *mm) {}
1449
1441#else 1450#else
1442int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address); 1451int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address);
1452
1453static inline unsigned long mm_nr_pmds(struct mm_struct *mm)
1454{
1455 return atomic_long_read(&mm->nr_pmds);
1456}
1457
1458static inline void mm_inc_nr_pmds(struct mm_struct *mm)
1459{
1460 atomic_long_inc(&mm->nr_pmds);
1461}
1462
1463static inline void mm_dec_nr_pmds(struct mm_struct *mm)
1464{
1465 atomic_long_dec(&mm->nr_pmds);
1466}
1443#endif 1467#endif
1444 1468
1445int __pte_alloc(struct mm_struct *mm, struct vm_area_struct *vma, 1469int __pte_alloc(struct mm_struct *mm, struct vm_area_struct *vma,
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 20ff2105b564..199a03aab8dc 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -363,7 +363,8 @@ struct mm_struct {
363 pgd_t * pgd; 363 pgd_t * pgd;
364 atomic_t mm_users; /* How many users with user space? */ 364 atomic_t mm_users; /* How many users with user space? */
365 atomic_t mm_count; /* How many references to "struct mm_struct" (users count as 1) */ 365 atomic_t mm_count; /* How many references to "struct mm_struct" (users count as 1) */
366 atomic_long_t nr_ptes; /* Page table pages */ 366 atomic_long_t nr_ptes; /* PTE page table pages */
367 atomic_long_t nr_pmds; /* PMD page table pages */
367 int map_count; /* number of VMAs */ 368 int map_count; /* number of VMAs */
368 369
369 spinlock_t page_table_lock; /* Protects page tables and some counters */ 370 spinlock_t page_table_lock; /* Protects page tables and some counters */